Jump to content
Search Community

danno

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by danno

  1. i'm looking to have each dynamic clip have it's own dynamic, unique transformmanager and it's own unique transformitem as well. so a way to be able to reference those , uniquely. thanks!
  2. i'm looking to create unique TransformManagers for dynamically created and loaded MC's on the stage and am wanting to know the best way to go about setting up a way to do that. thanks!
  3. ok cool. just wanted to make sure before i test it out if there was any problems with that. thanks again for the fast response!
  4. quick follow up/addition: let's say that i have a MC on the stage, and i would normally reference it like this: largeHolderMC.mediumHolderMC.itemToBeTransformItemMC i will be wanting to have itemToBeTransformItemMC be the movieclip that i add to a TransformManager. but i will want to have bounds set for the manager that controls itemToBeTransformItemMC. the issue i want to know is how do i ensure that if i have itemToBeTransformItemMC still with the correct bounds inside mediumHolderMC(which is inside of largeHolderMC) and i scale largeHolderMC to 50% of it's original size, that the itemToBeTransformItemMC has the bounds still in place, even though it's new size will be 50% of it's original size. i hope that you understand what i mean. let me know if you need more explanation. thanks!
  5. i was misunderstanding how the "select" aspect worked. i was confused thinking that it's meaning was "when you have selected a MC by clicking on it...". i've corrected that issue. i guess this is where an example of the best practices on how to use getSelectionBounds() correctly would really help; from defining of the manager, to adding a transformItem, and with a getSelectionBounds(). would that be possible? thanks!
  6. think i've made a bit of progress, as i think my thinking was wrong before. here's what i have now: manager.addEventListener(TransformEvent.SELECTION_CHANGE, onManagerSelect); function onManagerSelect($e:TransformEvent):void { manager.selectItem($e.items[0].targetObject, true); trace (manager.getSelectionBounds()); } but now that i am able to trace out the getSelectionBounds() , it seems to not behave very good. if i click on the MC on my stage that has the TransformManager applied to it, all of a sudden everything on the stage disappears and the stage looks like it is entirely blank. the same results happen if i just click and drag the MC around a lot... *POOF* everything's gone. if i resize the .swf the items on my stage reappear. very very strange. granted, it could be that i'm not doing something correctly, what ya think? **update** this problem seems to only happening when i'm inside flash cs4 and am testing the movie ( control menu > test movie ). when uploaded to my server, this odd disappearing act isn't happening at all inside a browser.
  7. i think i'm a bit confused actually. here's what i've got so far, maybe you can try and point me again correctly or correct what i've got here to fix my broken logic: var manager:TransformManager = new TransformManager(); manager.addEventListener(TransformEvent.SELECT, onManagerSelect); function onManagerSelect($e:TransformEvent):void { for(var i=0; i<$e.items.length; i++) { var d:DisplayObject = $e.items[i].targetObject; trace ("selection bounds are : " + d.getSelectionBounds()); } } which is of course throwing an error. thanks for your patience in helping me with this issue, i appreciate it.
  8. does the getSelectionBounds get applied to a TransformManager or to a TransformItem? i believe that it's to a TransformManager, but i just can't get it correct. here's what i have for when an item is scaled: manager.addEventListener(TransformEvent.SCALE, managerScaled); function managerScaled($e:TransformEvent):void { trace("width is : " + myMCname.width); } two part question. a) is there a better way to get the selected MC better than calling it by name above? ( ie : trace("width is : " +$e.items.width); if there's a better way, or with what i have above, any instruction on how to use the getSelectionBounds function? thanks so much
  9. updated above to reflect correct example awesome, thanks!
  10. just to make sure, something like this: var managerOne:TransformManager = new TransformManager({ bounds: new Rectangle(0, 0, 50, 50) }) var itemOne:TransformItem = managerOne.addItem(mcOne); var managerTwo:TransformManager = new TransformManager({ bounds: new Rectangle(0, 0, 100, 100) }) var itemTwo:TransformItem = managerTwo.addItem(mcTwo); and so on for any remaining ones. correct? thanks!
  11. have an example of how to get those values? ( the for loop needed to get them ) thanks!
  12. how would i add a transform item, with its own set of unique set of bounds for movement, to a dynamically created MC on the stage. i'll have multiple sets of dynamically created MC's, but just need to know how i would go about: a) limiting it's movement to a certain rectangle boundaries ( don't care about the scale or rotation though ) adding those restrictions for each MC on stage, which each MC will need to have its own set of bounds, which will be different than the other MC's on the stage. what would be the best way to accomplish this? thanks!
  13. wanted to follow up and say that the updated code fixed the problem. thanks again!
  14. thanks for the reply. didn't actually see a link in your reply... maybe i'm missing it in the PM. thanks!
  15. i actually have them set at .5 , my code: var clip1Item:TransformItem = manager.addItem(getChildByName("Item0")); clip1Item.setScaleConstraints(0.5, 1, 0.5, 1); and it's doing it currently.
  16. hey guys, i've gotten TransformManager for AS3 and i've initialized it ( using TransformItem ) on a dynamically created clip on the stage. i've got setScaleContstraints on the item as well. after doing so and scaling the image, if i drag the handles further, it actually will mirror the image, almost into the negative-x and negative-y space. any help would be appreciated in stopping this from happening. thanks!
×
×
  • Create New...