Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Dcoo

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Dcoo

  1. I'm not sure how to change the TransformItem's properties since there dynamically created clones? and also not sure how to use the updateSelection method, but I'm defiantly not doing it right here: ( I've used the name of my Transfommanager ) for (var i: int = 0; i < items.length; i++) {TweenLite.to(items[i].target, 0.75,{x:picCenter_x,, width:myw, height:mph}); manager.updateSelection(); }
  2. It seems I can use "manager.selectedTargetObjects" to change dropShadowFilter, color, opacity and so many other things. but I cant seem to get it to resize an item. when i click my button, the bitmap inside the holder resizes and snaps back when you click on the item again. but if i was to put a drop shadow on the same way it works on the holder.. Any help would be most appreciated. fit_in.buttonMode = true; fit_in.addEventListener(MouseEvent.CLICK, fitwindow); function fitwindow(e: MouseEvent): void { var myh = stage.stageHeight - 57.7; var myw = stage.stageWidth; var items: Array = manager.selectedTargetObjects; var stageCenter_x:Number = stage.stageWidth/2; var stageCenter_y:Number = stage.stageHeight/2; var picCenter_x:Number = items.width/2; var picCenter_y:Number = items.height/2; items.x = stageCenter_x - picCenter_x; items.y = stageCenter_y - picCenter_y; for (var i: int = 0; i < items.length; i++) { TweenLite.to(items.target, 0.75,{x:picCenter_x, y:picCenter_y, width:myw, height:myh}); } }
  3. Thanks Diaco, i did not get your code to work for me, and it could be that Im trying to get it to work in Wordpress. the only code I can get to work is in Wordpress is from an example on this page <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script> <script> jQuery(document).ready(function(){ TweenMax.set('#slide3', {opacity: 0.5}); }); </script> and to further complicate things, i need to add to spin a div when the user rolls over a link, so I add an id to the div that will spin and to the link that will trigger it. but I did get this workaround to work, but without an array. ( and runs under Wordpress) <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script><script> jQuery(document).ready(function() { document.getElementById("spinit1").addEventListener('mouseover', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin1", 1, { scale: 1.2, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit1").addEventListener('mouseout', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin1", .25, { scale: 1, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit2").addEventListener('mouseover', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin2", 1, { scale: 1.2, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit2").addEventListener('mouseout', btnHandler, false); var rotation = 0; Ω function btnHandler(e) { TweenMax.to("#spin2", .25, { scale: 1, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit3").addEventListener('mouseover', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin3", 1, { scale: 1.2, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit3").addEventListener('mouseout', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin3", .25, { scale: 1, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit4").addEventListener('mouseover', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin4", 1, { scale: 1.2, ease: Power4.easeOut}); } }); jQuery(document).ready(function() { document.getElementById("spinit4").addEventListener('mouseout', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("#spin4", .25, { scale: 1, ease: Power4.easeOut}); } }); </script>
  4. I'm used to using flash to create an array, but I cant get my head around this. so far I have this working ( I finaly have tweenmax working in wordpress, but thats conversation for another day ) any help would be greatly appreciated ! thanks <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script><script> jQuery(document).ready(function() { var whorolls = ["#movmystuff1", "#movmystuff2", "#movmystuff3", "#movmystuff4"]; document.getElementById("whorolls").addEventListener('mouseover', btnHandler, false); var rotation = 0; function btnHandler(e) { TweenMax.to("whorolls", 2, { scale: 1.2, ease: Power4.easeOut}); } }); </script>
  5. well I'm not looking for a particular DisplayObject I'm looking for all DisplayObject that have been added to my manager and only them, so it seems like I should be able to access that list somehow, but if not, oh well cheers
  6. Spoke too soon, it listens for any object on stage still
  7. So I pushed all manager objects into a holder_mc and add listen_for_manager - holder_mc.stage and it works! oh so happy now! listen_for_manager('add', holder_mc.stage); function listen_for_manager(action:String, target:IEventDispatcher):void { if (action == 'add'){ //do something}
  8. I want to know if an object on stage is has been added to a particular manager, if so preform function listen_for_manager using action:String this code below obviously does not work, but something like this is what I'm trying to do listen_for_manager('add', stage.manager); function listen_for_manager(action:String, target:IEventDispatcher):void { if (action == 'add'){ //do something}
  9. The user will be adding objects and images to the stage, but I only want to trigger actions when items that have been added to the manager are selected. Like this. that way its the only parameter I need to listen for. trace( "Synchronous media promise." );imageLoader.loadFilePromise( imagePromise ); this.addChild( imageLoader ); manager.addItem(imageLoader);
  10. Ok let me ask you this then, is there a way to see if an object has been add to the manager ? I want to trigger something but only if the selection has been added to the manager.
  11. In my last post on this subject, everything was going swimmingly with the "myImage.load(true);" being introduced to the scenario, when the user gets to the "take a picture" part of the app it works perfectly, they can retake the picture over and over and it loads the new image right away using " Object(root).faceW.myImage.load(true); " from my Camara MC. now my new problem is if they (the user)want to go back and retake the picture after clicking finished(the app at this point has moved the play head to the next frame), the retake button takes back to the frame with the Camara loader but the image is no longer updated after taking any new pictures, only f you quit and restart does the new image load. any ideas on whats happening ? import com.greensock.*;import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import flash.filesystem.*; LoaderMax.activate([ImageLoader]); var file:String = "IMG_happy.jpg"; var mypic:File = File.applicationStorageDirectory.resolvePath("Photos/"+file); var myImage:ImageLoader = new ImageLoader(mypic.url,{container:this,x:0,y:0,width:414,height:309,onComplete:onImageLoad}); myImage.load(true); function onImageLoad(event:LoaderEvent):void { TweenLite.from(event.target.content, 1, {alpha:0}); }
  12. let me try and explain it better, I have objects that are dynamically added to my managaer and something like 40 other possible items add by the user from the library, so I'm thinking if there was a way to add a listener for anything that comes on the stage thats has already been added to my manager,and if the user clicks it bingo! kinda like "manager.deleteSelection(); "
  13. I would like to trigger an event when the user clicks no an item in my TransformManager list, but I cant figure out what to listen for? here are some things I've tried: listener('add', manager); listener('add', manager.selectedItems); ====== So this works but obviously it heres all the other objects on stage if the user clicks them listener('add', this.stage); ========
  14. Hi guys, I'm loving the new site, much easier to use, nice work! so what do you think? can it be done? TweenMax.to(gfall, 1, {shortRotation:{rotation:98 }, motionBlur :true, delay:9 });
  15. I don't think its has any thing to do with IOS, I cant get it to work in a browser But you say you don't see me call it again? Is it really the easy? I just call it again? Oh dang it is! it works!! I called it from my camera on save, Object(root).faceW.myImage.load(true); So cool!
  16. when a new picture is taken, it overwites IMG_happy.jpg in the photos folder, but doesn't update until the app is restarted import com.greensock.*;import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import flash.filesystem.*; LoaderMax.activate([ImageLoader]); var file:String = "IMG_happy.jpg"; var mypic:File = File.applicationStorageDirectory.resolvePath("Photos/"+file); var myImage:ImageLoader = new ImageLoader(mypic.url,{container:this,x:0,y:0,width:414,height:309,onComplete:onImageLoad}); myImage.load(true); function onImageLoad(event:LoaderEvent):void { TweenLite.from(event.target.content, 1, {alpha:0}); }
  17. I cant seem to get flushContent to work I have something missing from my code but not sure what. in my example below I'm not using xml, just loading one jpg import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import flash.filesystem.*; LoaderMax.activate ([ImageLoader]); var file:String = "IMG_happy.jpg"; var mypic:File = File.applicationStorageDirectory.resolvePath("Photos/"+file); var myImage:ImageLoader = new ImageLoader(mypic.url,{container:this,x:0,y:0,width:414,height:309}); myImage.load(true); by the way, this code works in air on iOS to load a saved image from applicationStorageDirectory, if anyones interested
  18. Good lord, you make it look so easy, I have been pulling I hair out over this one! I thank you and my hair thanks you!
  19. Sorry I'm not that advanced at as3, so this could sound really dumb, but, how would I find the target of the selected object if I don't know its name? It's added from the Camara?
  20. So it looks like I'm only changing the alpha of the crop mask? is there a way to get at the image underneath?
  21. One more crop qustion, After adding images to the crop crop = new Crop(imageLoader,manager); I can no longer tween their alpha, if I set alpha to 1 it turns black TweenMax.to(manager.selectedTargetObjects,.75,{alpha:1}); Is it possible to have both?
×