Jump to content
Search Community

mika

Members
  • Posts

    23
  • Joined

  • Last visited

mika's Achievements

0

Reputation

  1. Great ! The demand originated from an user, and it does make sense in my scenario : User has abitilty to zoom in on the textitem, but the line thickness isn't increased, resulting in a small rollover area... For a selectable text, the noob user could indeed have trouble picking the movable area It could also be of interest for mobile use ... Thanks for the tip!
  2. Fabric.js does look nice indeed, but I back up the request
  3. Thanks for your input ! I did edited Crop.as, adding public var cropWidth:Number public var cropHeight:Number and edited protected function _calibrateBox():void { var bounds:Rectangle = _target.getBounds(_target); var g:Graphics = _mask.graphics; g.clear(); g.beginFill(0xFF0000, 1); g.drawRect(bounds.x, bounds.y, cropWidth, cropHeight); g = this.graphics; g.clear(); g.beginFill(_fillColor, 1); g.drawRect(bounds.x, bounds.y, cropWidth, cropHeight); trace("_calibrateBox") } A bit of a hack since its work in progress but that works so far
  4. Hi Jack I was wondering if you knew of an elagant way to increase the padding selection for a transformItem that has selectable text. Just the way you have it for paddingForRotation would be so handy ! Thanks
  5. Hi How can the crop size can be set same way ?
  6. I finally got over it, but the solution was strange enough for me not to remember how, and my feeling was the TM class was handling the issue in a strange way. I'll try to make a post about it when i'm back on this project.
  7. Here is the list of event that are dispatch when i click on my object (in my production code) --tmMouseDown --tmSelect --tmSeizeCursor --tmSelectionChange --tmSelectMouseDown --tmDeselect --tmSelectionChange displayed with Nothing happens when i hover it.
  8. Made a dummy ... it works ok import com.greensock.transform.TransformManager // LOAD A SWF var ldr:Loader = new Loader(); var urlReq:URLRequest = new URLRequest("loadingTest.swf"); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, AssetMapLoaded) ldr.load(urlReq); var loadedmc function AssetMapLoaded(e:Event) { var loaderInfo:LoaderInfo = e.target as LoaderInfo; loadedmc = loaderInfo.content; container.addChild(loadedmc) // APPLY TRANSFORM MANAGER var manager:TransformManager = new TransformManager( { targetObjects:[loadedmc] } ) } I'm not subloading accross domain and there shouldn't be Security domains issues, but i'm gonna double check that. I'm using the same TransformManager line than above for tests, so theres only one item in the transformManager instance. Thanks for your inputs, i keep on digging. At least I know it's something burried in my code (which is huge)
  9. Hi Im having issues with transformManager, I just can't get clips inside a loaded mc to work (transform) properly : The cursor does change, and some events are trigered, but the handles does not appear, and the item doesnt move at all, even with keyboard. If using the exact same code I target the loaded mc itself, it works without a problem. Any suggestions on what could cause this behavior ?
  10. Perfect, i was missing the queue.addEventListener(LoaderEvent.CHILD_COMPLETE, completeHandler); syntax, and trace("loadername: "+event.target.name); was returning the LoaderMax instance name (useless) Thanks a lot !
  11. Hi I'm not so used to LoaderMax yet, and i'm wondering whats the best way to do this : (pseudo code) queue = new LoaderMax() queue.append(name:"img1") queue.append(name:"img2") onCompleteHandler(e){ if(img1) ... if(img2) ... How to distinct each separate img in a single onCompleteHandler function ? Or should I use different event function ? Whats best practice ? Thanks
  12. Well deadlines are short, I'll save it for later. Thanks for you answer though.
  13. Well, I guess I have achieve something acceptable: http://bit.ly/dnhlNf Here's my class : { public class Panning { import com.greensock.TweenMax; import com.greensock.TweenLite import com.greensock.easing.* import com.greensock.plugins.* import flash.display.MovieClip; import flash.display.Sprite; import flash.events.MouseEvent import flash.events.Event import flash.display.Stage import flash.geom.Point private var _stage:Stage private var zoom:Number = 2; private var zoomSpeed:Number = 1.3 private var panSpeed:Number = 7; private var picHolder; private var viewClip:MovieClip public function Panning(__stage:Stage, _mc, _viewClip:MovieClip) { _stage = __stage picHolder = _mc viewClip = _viewClip viewClip.addEventListener(MouseEvent.ROLL_OVER, zoom_in); viewClip.addEventListener(MouseEvent.ROLL_OUT, end_zoom_pan); } // start zooming in private function zoom_in(e:MouseEvent):void { TweenPlugin.activate([TransformAroundPointPlugin, ShortRotationPlugin]); var stageCenter:Point = new Point(_stage.stageWidth / 2, _stage.stageHeight / 2); TweenMax.to(picHolder, zoomSpeed, {transformAroundPoint: { point:stageCenter, scaleY:zoom, scaleX:zoom }, ease:Quart.easeOut, onComplete:null } ); start_pan() } private function start_pan():void { viewClip.addEventListener(MouseEvent.MOUSE_MOVE, pan); } // zoom in and pan around private function pan(e:Event):void { trace(viewClip.mouseX) trace(_stage.mouseX) trace("\n") if(picHolder.x < viewClip.x - _stage.mouseX || picHolder.x > viewClip.x - _stage.mouseX || picHolder.y < viewClip.y - _stage.mouseY || picHolder.y > viewClip.y - _stage.mouseY) { var zoom2:Number = zoom - 1; TweenLite.to(picHolder, 1, {x:(viewClip.x - _stage.mouseX) * zoom2 , y:(viewClip.y - _stage.mouseY) * zoom2, ease:Quad.easeOut}) } } // end zooming in and panning around and start zooming out private function end_zoom_pan(e:MouseEvent):void { picHolder.removeEventListener(MouseEvent.MOUSE_MOVE, pan, false); TweenMax.to(picHolder, zoomSpeed/3, {x:0, y:0, scaleX:1, scaleY:1 , ease:Quad.easeOut}); } } } There's probably lot of room for improvement. I'm looking at smoother animation with transformMatrix (which I know nothing about yet) Would it be worth the try ?
  14. Hi Would one of you be kind enough to post some code (or pseudo code) about the panning ? i'm struggling with it since a few days, and i gotta admit i'm having a hard time. here's what I want to achieve : http://www.panaria.it/prd/Collection.as ... ctionId=54 Thanks
  15. I refrained to frenetically post a follow up to the autoFit and TM problem, and quite proudly figured it (so far) myself. heres a preview of what it was all about : http://blog.mikarama.fr/astest/autoFitTransform.swf you can addChild, mc* get nested in mcHolder. TransformManager Bounds are set to autoFit area (preview=true), and area is also transformable. Works quite well, exept I only mcs update bounds on button click. Gotta find how to update it on SCALE event. I coded only the SCALE event btw, don't bother moving area around. fla included, switch .swf mika
×
×
  • Create New...