Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,824
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. I think there is a difference between autoPlay:false which will prevent the playhead from advancing and preventing scripts from executing on frame 1 of the loaded swf. you can you put all your code in the loaded swfs in frame 1 in an init() function, and then call the init() function from the parent swf when you want that "page" to play.
  2. Carl

    TweenProxy3D

    hmmm, I just ran a test on the latest bonus-all-v11 version and am getting an error as well. Scene 1, Layer 'Layer 1', Frame 1, Line 8 1046: Type was not found or was not a compile-time constant: TweenProxy3D. I don't know if there is a reason or just a mistake, I'm sure GreenSock will have an answer for you.
  3. I tried running your code and saw the problem with the last tween not running when the timeline repeats. very strange. I don't know why. instead of invalidating the whole timeline try invalidating just the first tween like so: public function startMove():void { if (isMoving) return; this.mouseEnabled = true; this.isMoving = true; myTimeline.getChildren()[1].invalidate(); myTimeline.restart(); } this allowed the third tween to always play. I'm not sure it it is the result you want though.
  4. Bas, Welcome to the forum. It is not good form to jump onto someone else's older posts. It is better to start your own thread in this scenario as your issue isn't very closely related to the original post. As for your problem, if you need new relative positions each time the timeline runs, it may be better to re-create the timeline from scratch each time. Alin, Have you had any luck with your problem? It is very hard to trouble-shoot such problems from a distance without being able to simulate the "processor strain". Your explanation is extremely detailed and quite good, yet the issue is a bit beyond me. Carl
  5. nice work. from what I could tell it pretty much runs as most flash animations do. it didn't look excessively choppy. you can try cranking the frame rate up to smooth it out. I'd be more worried about the huge image crossfades, but those seem to work ok. Carl
  6. hmm, not really. my gut says this is more of a Flash Player issue than a GreenSock issue. if you attach and fla or swf, perhaps one of us can verify whether or not it happens for everyone. very strange.
  7. i don't think anything is built-in to handle that. the following should work: var playCount:Number = 0;//track times played //add VIDEO_COMPLETE listener video.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying); function donePlaying(e:LoaderEvent) { playCount++; if (playCount { //play again video.gotoVideoTime(0, true); }else{ //don't play again trace("video done repeating"); } } here everytime the VIDEO_COMPLETE event fires, you can increment a variable that keeps track of how many times the video has played. you may want/need to remove the repeat:1 from the VideoLoader constructor. don't know. EDIT: lol, looks like martinella beat me nice work!
  8. hi Jimmy, Just so you know, I do not get your emails, I am not Mr. GreenSock, but I'm quite certain he does read them. have a good day Carl
  9. the timeline will play as soon as it is constructed. if there are no tweens in the timeline, it will complete immediately. adding tweens after it has completed does not make the timeline play or restart. in your case the tweens aren't added until after the assets load, that is why you need to call play(). ------ in this sort of situation i have found i best to pause timelines in the constructor and to tell them to play when everything is ready. perhaps, the tips and tricks page could benefit from noting this behavior.
  10. I'm 99% sure you would have to load the swf twice.
  11. I don't know how Rotate can be undefined and yet the trace still works. seems odd. if you code is on Frame 1 of main timeline and Rotate lives in Wheel. then your code would be: Wheel.rotate.addEventListener(MouseEvent.CLICK,shifter); if in fact the problem is that Rotate can't target Wheel here are some tips on targeting various parent clips in AS3 http://snipplr.com/view/15833/actionscr ... timelines/
  12. thank you for posting your solution. sorry I couldn't get to this sooner. Happy Tweening, Carl
  13. yes source path in CS5. please select the folder that contains your com folder.
  14. in the LoaderMax section of learning resources: http://www.greensock.com/learning/ download GreenSock's sample slideshow, it is a great starting point. also in the docs for XMLLoader, there is some great reading on how to format an xml file so that once it loads, all the assets it lists will be loaded in sequence, each of these assets can have an URL or descriptive text associated with it. http://www.greensock.com/as/docs/tween/ ... oader.html LoaderMax is exactly the tool to use for a project such as yours.
  15. replace all the code in Slideshow1219.as with: package { import com.greensock.*; import com.greensock.easing.*; import flash.display.*; import flash.utils.*; import flash.events.*; import flash.net.*; public class Slideshow1219 extends Sprite { var bars:Bars = new Bars(); var n:int = 0; var intCurrentSlide:int; var req:URLRequest; var holder:Sprite = new Sprite(); var loader:Loader; var rand:int; var nxtNum:int; var picNum:String; var slideCount:int; var xmlLoader:URLLoader;// slideshow xml loader var xmlSlideshow:XML;// slideshow xml var strXMLPath:String = "slideshow-data.xml"; var slideName:String; var history:Array = new Array(); var duration:Number = .5; var prevSlide:String; var timeline:TimelineMax; var currentSlide:Number = 0; public function Slideshow1219() { nxtNum = rand + 10000; picNum = intCurrentSlide.toString(); xmlLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete); xmlLoader.load(new URLRequest(strXMLPath)); createTimeline(); } private function onXMLLoadComplete(e:Event):void { xmlLoader.removeEventListener(Event.COMPLETE, onXMLLoadComplete); xmlSlideshow = new XML(e.target.data);// create new xml with the received data slideCount = xmlSlideshow..image.length();// get total slide count trace("slideCount "+slideCount); loadSlide(); } private function loadSlide():void { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, displaySlide); slideName = xmlSlideshow.. @ src[currentSlide].toString(); trace("slideName "+slideName); loader.load(new URLRequest(xmlSlideshow..@src[currentSlide])); if (currentSlide { currentSlide++; } else { currentSlide = 0; } } private function createTimeline():void { timeline = new TimelineMax({repeat:1,repeatDelay:2,yoyo:true,onComplete:loadSlide,paused:true}); for (var count:int = 1; count { var mc:MovieClip = bars["bar" + count]; trace("doing it"); timeline.append(TweenMax.from(mc, duration, {x:"64", alpha:0, ease:Cubic.easeOut}), -.4); } } private function displaySlide(e:Event = null):void { holder.addChild(loader); bars.cacheAsBitmap = true; holder.cacheAsBitmap = true; holder.mask = bars; addChild(holder); addChild(bars); timeline.restart(); var duration:Number = .5; loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, displaySlide); addChildAt(holder, 0); if (holder.numChildren > 1) { holder.removeChildAt(0); } bars.width = holder.width; bars.height = holder.height; // timeline.insert(TweenMax.from(mc, 2, {alpha:0, ease:Cubic.easeOut})); } } } the loadSlide() function was the only thing updated and I added a currentSlide var up top. Carl
  16. here is the fixed file all zipped up. attaboy, someone on my site just asked for tips on how to use multiple images with the mega-mask effect. i hope you don't mind them looking at your file for inspiration. Carl
  17. glad to hear you are getting closer. as for the roll over other cards while zooming issue. you may want to just disable all other card/mouse events while the animation is happening. during a zoom set a boolean like isZooming = true; and then all the cards could have if(!isZooming){ //do the tween as requested }else{ trace("zoom in progress, chill out for one sec"); }
  18. hello kburton, to create this sort of coolness slider, one would have to know the values that need to be adjusted to throw into colorMatrixFilter or colorTransform as you are seeking. to some "coolness" just might be "blue-ness". I'm sure some color theory nerds could argue at length... You may get a bit more traction for this topic in the forums over at kirupa.com as far as the general theory goes and then come back here to figure out how to make it work with the GreenSock plugins. I know something like this is a bit out of my league. Carl
  19. your sprite has an x:0 y:0 the graphics inside the sprite start at 200,200 when you scale the container (mySprite) the relative position of it's contents will appear to shift. from the code shown, that's the only thing I can imagine that is happening. change your drawRect to 0,0, 30,30 and see what happens.
  20. are you setting your class path to the parent folder of com?
  21. hmm, from what you are saying, you DON'T want my sprite to move yet your code: TweenLite.to(mySprite,1,{x:200,y:200,scaleX:.9, scaleY:.9}); is tweening the x and y properties? that probably shouldn't be in there. mySprite should have an x and y of 0 when it is added to the stage and you are telling it to move to x:200 y:200. from what you posted your tween is working as expected. what value do you get for mySprite.x + "afterX"? 200?
  22. Hi Martinella, I don't know what visualadvance did. with video / flash in general there are tons of things that can cause problems way outside of what loaderMax is doing. It could be the way the video is encoded, the version of the flash player, the speed of the computer etc. does this happen with all videos? have you experimented with different encoding settings? it would be hard to troubleshoot without seeing it. if you can upload a sample, it would greatly increase your chances of getting assistance from other people.
  23. this is 1 way of doing it with endArray, but it cycles through all the characters for the same amount of time concurrently. Also since capital and lower case letters aren't consecutive, a few non-alphanumeric characters show up if you add upper case characters. this is really rough, but it works: import com.greensock.*; import com.greensock.easing.*; trace(String.fromCharCode(97)); var word:String = "greensock"; //array to be tweened var myArray:Array = [] //array storing end values var finalArray:Array = [] //array that constantly updates for display purposes var updatedArray:Array = [] for(var i:uint=0; i //add a bunch of a chars to myArray myArray.push(97); //populate final array with numeric character codes finalArray.push(word.charCodeAt(i)); } TweenMax.to(myArray, 1, {endArray:finalArray, ease:Linear.easeNone, onUpdate:showIt}); function showIt(){ for(var i:uint=0; i updatedArray[i] = String.fromCharCode(Math.floor(myArray[i])); } trace(updatedArray.join("")); //add a dynamic textfield called display_txt to your fla display_txt.text = updatedArray.join(""); } that will generate: bdaacdcab bdaadedac bebbdedac bebbdedac bfbbefead cfbbegead cgbbfgfad chbbfhgae cibbgigae diccgjhbf djcchjhbf dkcchkibf dkccilibg elccimjbg emccjnkbh emddjnkbh enddkolbi foddlplbi fpddlpmbi fpddmqnbj fqddmrnbj greensock
  24. yes, look in the plugin explorer for the bezier plugin or bezierThrough. http://www.greensock.com/tweenmax a dirty way to achieve that arc is TweenMax.to(mc, 2, {x:100, ease:Quad.easeOut}); TweenMax.to(mc, 2, {y:100, ease:Quad.easeIn}); put your mc at a starting position of x:0 y:0
  25. http://blog.onebyonedesign.com/actionsc ... r-cycling/ the demo is at the bottom. ---- as for using endErray you could tween an array of numbers that correspond to letters in an array or do the fromCharCode trick from that tutorial I guess.
×
×
  • Create New...