Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by mika

  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
  16. Thanks for Clearing it up Jack !
  17. Maybe what I intended is just bad practice. I'm having acceptable results using autoFitArea. I have severals mcs positioned via TM, nested in a container. i use autoFit on that container, prop_inside, center all. For little variations of the container ratio, its ok. It get a bit nasty when switching from a square shape to a narrow rectangle (mcs become very tiny), but thats not an usual case. so autoFit suits me quite ok after all. Would like to know if the above mentioned case is possible tho (liquidStage, without stage) ? If I tickled your curiosity I'd gladly send you the project url and details in pm. Ow and I'm having troubles getting autoFit and TransformManager working together but ..; thats another story Regards mika
  18. Yep, sorry for the clumsy explanation. All the demos I tried failed miserabily, and I can't disclose my project url (pm would be ok tho) I set up a sketch explanation which will hopefully make it clear : http://blog.mikarama.fr/astest/pinAutoFit.html Can Mc 'stick' in its relative position when displayObj is resized ? Mc is positioned with transformManager, so its position isn't fixed. It sounds to me I need a mix of autoFit and liquidArea, but I myself, get lost there... EDIT : maybe the best way to put it is, is there a way to use liquidStage 'pins' without using stage, but a displayContainer as the resizing area ?
  19. Hi, I'm unclear how to achieve this : I'd like to position mcs in a displayObject via TransformManager, then when the displayObject is resized, having the mcs reposition themselves with DynamicPinPoints (ie theyr newly set center x/y after transfom operations) From the logic I understood, that should imply autoFitArea and PinPoints, as LiquidStage seems to be bound with the stage, which I dont need at all. Any pointers ?
  20. http://blog.mikarama.fr/astest/text_transform.swf Nice! fla included if anyone interested (just replace swf with fla)
  21. Great ! with a double click, I can switch to editing mode : I already have the text content and formating tools, but didnt knew how I would edit text. You just gave me the answer : double click, switch to live editing ! sharp thinking About the skewing, I thought it was include and was part of my decision buying the tool. I am nowhere disapointed because its still rocking, but I'd be please to see it in a future release. Dream on : alt click to deform an item, 4 corners handles and sides ones, just like in the authoring ... with some constraining it would even be a 3D feature, just like ... Photoshop transform tool Might be out of your scope, but daydreaming never killed nobody. Cheers mika
  22. Indeed, that seems to settle it. I guess i can live without kerning, so as far as TM is concerned, we can call it Solved. Thanks for the fast and precise answer, really appreciate it. So now i can transform my text : can you think of a way to edit the textInput inside the transformed mc ? Otherwise i can use some switch to transform the mc or the textfield, but thats quite some extra code. And at last, theres no skew method right ? i can skew with multiple items selected only. That would be a nice one. mika
  23. Hi, Im having an issue with TransformManager AS3. I'd like to transform text, not the textField bounds, the actual text. But text randomly vaporizes... I set up an example : mc is a clip, theres 3 textfield nested inside : 1 input 1 dynamic 1 static heres the code I used : import com.greensock.transform.TransformManager; var manager:TransformManager = new TransformManager({targetObjects:[mc], constrainScale:true}); heres the swf : http://blog.mikarama.fr/astest/testtransform.html and fla : http://blog.mikarama.fr/astest/testtransform.fla If I rotate the mc, and select/deselect many times, the dynamic text will disapear (I havent noticed any pattern, but it always end up disapearing). It also happens without rotating the mc. I'm confused. I seen the note about Flex textfield, but nothing describing this odd behavior. Any help greatly appreciated, thanks mika