Jump to content
Search Community

rob_v_5712

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by rob_v_5712

  1. OK - I see what you are saying - unfortunately - that did not work. The same results happened.
  2. I have a situation where there are several MCs on a timeline that get tweens applied to them. I then pause the timeline and based on user interaction , some of the MCs that have been tweened on the timeline get tweened again. once I unpause the timeline, it seems any MC that got tweened while it was paused, goes back to the state it was before, when I paused the timeline. forexample: myTimeline.add("step_1",10) .to(graphic_1,1,{alpha:1,tint:0xE37034},"step_1") .to(graphic_1a,1,{alpha:1},"step_1") .to(graphic_2,1,{alpha:1,tint:0xE37034},"step_1") .to(graphic_2a,1,{alpha:1},"step_1") .call(myTimeline.pause,[],20) .to(graphic_1,1,{x:100},30); graphic_1.addEventListener(MouseEvent.CLICK, buttonClick1); graphic_2.addEventListener(MouseEvent.CLICK, buttonClick2); function buttonClick1(evt:MouseEvent):void { TweenLite.to(graphic_1,1,{tint:0x003460}); TweenLite.to(graphic_1a,1,{scaleX:5,scaleY:5,alpha:0}); } function buttonClick2(evt:MouseEvent):void { TweenLite.to(graphic_2,1,{tint:0x003460}); TweenLite.to(graphic_2a,1,{scaleX:5,scaleY:5,alpha:0}); myTimeline.resume(); } In this situation - the graphic_1 & 2 are orange and graphic_1a & 2a appear using the timeline, the timeline pauses, the user clicks the grahic_1 and it turns blue and graphic_1a scales and disappears When graph_2 is clicked - it turns blue, and 2_a scales and disappears & the timeline resumes. however - when it resumes, the graphic_1 is orange again, and graphic_1a is visable, (odd thing is it is scaled X & Y to 5) (graphic_2 is blue, and 2_a scales out and disappears as expected) Can someone shed some light on why this is happening? Thanks
  3. Thanks Carl PrependURLs is exactly what I was looking for.
  4. Im just curious if there is any way to have a failover type URL for MP3loader? Here is the situation I have. My folders look like this..... deploy +-assets +-swfs +-audio In the deploy folder - I have a player.swf file that will play the swfs in the assets/swfs folder. One of those swfs loads an XML file - in that XML file there is an entry for MP3Loader that will load an audio file in deploy/assets/audio folder When I develop the swf in the IDE - the path for the audio is ../audio when I run it from the player, it see the path as ./assets/audio. I can't use full paths b/c these will eventually live on a server - so they need to be relative paths. So right now - when Im in the ide - I mod the XML to point to ../audio and when I test it in the player - I mod the XML to ./assets/audio Is there any easier way to handle this. If there was a way to define an alternate URL - that would be perfect. Just curious if anyone has run into this before and how did you handle it. Thanks
  5. The sometimeline.pause() is happening inside the player.swf file. Its actually grabbing the 1.swf timeline object and doing a pause() on it. The player.swf plays swfs in their own container (context = separate) my understanding being that the player.swf can see "items" in the 1.swf - but not the otherway around. (1.swf has no knowledge of data or detection of actions w/in player.swf) Also - lets assume for this case, I cannot modify player.swf. The end game here is this. 1.swf has a timelime object. It also loads an MP3 file and plays it. When player.swf fires, it loads 1.swf and can play it, it can also pause it. The issue I'm having is I cannot pause/resume the audio when I play/pause the 1.swf from player.swf. Looking into a few other options to do this...I noticed MP3Loader.PLAY_PROGRESS, i may try checking in there if the timeline is paused and if so - then pause the sound. Always open to suggestions. Thanks
  6. I have a swf (1.swf) where the animation is controlled using timelineLite. That swf is played inside another swf (player.swf). The player.swf can play and pause 1.swf. Inside 1.swf I create the timeline using this : myTimeline = new TimelineLite( {onUpdate:checkIfPlaying} ); So inside that checkIfPlaying function - I can tell if the timeline is playing. What Im having issues with is how can I tell when the timeline get paused? I tried testing for myTimeline.paused() inside the checkIfPlaying function - but that function is only executed while the timeline is actually playing. Is there any type of event that is fired when its paused? Thanks for any help. =Rob
  7. Thanks for the reply, that's pretty much what I was doing as a workaround. Glad to know I wasn't going crazy;)
  8. What version of IE? I just tried in IE10 and it worked w/ no problems. IE 11 - is a different beast altogether. (Don't have it installed anywhere to test)
  9. Well as luck would have it - now I have another problem - I swear, its just been one of those days! For some reason, if I use a timeline w/ frames and pause it, I have issues un-pausing it. For example: I have 2 MCs and set up a timeline like this: var tl = new TimelineLite({useFrames:true}); tl.to(mc0,0, {_alpha:0},1) .to(contuneButton,0,{_alpha:0},1) .to(mc0, 1, {_alpha:100},20) .to(contuneButton,1,{_alpha:100},20) .call(trace,['about to pause'],tl,29) .call(tl.pause,[],tl,30) .to(mc0, 1, {_alpha:0}, 31); contuneButton.onRelease = function() { trace('resuming') tl.resume(); } I have to click the continue button twice to get the timeline going again. However - If I set up the timeline w/out using frames: var tl = new TimelineMax(); It works exactly as expected. Again - this seems to just the happening in AS2 - doing it this way in AS3 works fine. Any ideas why this is?
  10. So it seems that I needed to change the scope from .call(tl.pause,[],this,13) to .call(tl.pause,[],tl,13) works like a charm AS2 makes me go argh!!
  11. Ok - I think Im losing my mind I asked this question a while ago here : http://forums.greensock.com/topic/7886-adding-a-pause-during-timelinelite/ and its been working exactly as expected. However, I had to do a project in AS2, and it does not seem to work. I need to pause the timeline at a specific frame, wait for user feedback, then resume. Normally I just add this to my timeline where I want the pause : AS3 .call(tl.pause,[],13) in AS2 - I have to add the scope so its like this: .call(tl.pause,[],this,13) But for some reason, in AS2 it just ignores it. Here is exactly what Im doing : var tl = new TimelineLite(); tl.to(mc, 1, {_x:100},5) .from(mc, 1, {_y:-100}, 10) .call(trace,['here'],this,12) .call(tl.pause,[],this,13) .call(trace,['here 2'],this,14) .to(mc1, 1, {_alpha:0}, 15); Here is the output, never pausing: here here 2 Im sure Im just missing something stupid here! Any help please Thanks -Rob
  12. Yup - that did it. This is the first time I'm using the timeline in an AS2 project - I did not realize that difference in there. Thanks for the help!
  13. Hello all, I'm hoping someone can explain this one to me. I have make this as simple as possible to show the issue I'm seeing. I have a timeline that starts a tween at frame 15 and goes for 30 frames. I then call a function on frame 100. When I run this in AS3 it performs as expected. The first tween happens 15, then at 100 the function executes. myTimeline.totalDuration() reports 100 frames Now when I run this in AS2 - The first tween happens at 15, then at 45 (when the tween ends) the function theEnd is called and myTimeline.totalDuration() reports 45 frames If I add a "dummy" tween at 100 for the AS2 version - it then reports it as 100 (the dummy tween being : .to(titleTop,0,{},100) ) Its as if AS2 does not see time to execute the .call as being part of the timeline. Also for another test - I added it between 2 tweens and the .call executed directly after the tween before it finished, ignoring the time I gave it to execute. Here is the code below : AS3 code: myTimeline = new TimelineMax({useFrames:true,onUpdate:checkFrame}); myTimeline.add("titleBar", 15) .fromTo(titleTop,30,{alpha:0,y:titleTop.y - 100},{alpha:1,y.titleTop.y},"titleBar") .call(theEnd,['slide 1'],100); AS2 code: var myTimeline = new TimelineMax({useFrames:true,onUpdate:checkFrame}); myTimeline.add("titleBar", 15) .fromTo(titleTop,30,{_alpha:0,_y:titleTop._y - 100},{_alpha:100,_y:titleTop._y},"titleBar") .call(theEnd,['slide 1'],100); AS2 Code with "dummy" tween myTimeline.add("titleBar", 15) .fromTo(titleTop,30,{_alpha:0,_y:titleTop._y - 100},{_alpha:100,_y:titleTop._y},"titleBar") .call(theEnd,['slide 22'],50) .to(titleTop,0,{},100) .call(theEnd,['slide 1'],100); the 2 functions function checkFrame() { var currentTime = myTimeline.time(); var theTotalDur = myTimeline.totalDuration();; trace('this._currentFrame : '+currentTime +'/'+theTotalDur ); } function theEnd(_slide:String) { trace('the end : '+_slide); } Any help on this one would be great!! Thanks -Rob
  14. Ahh yup - I see what you are saying. Thanks for the explanation.
  15. Thanks for getting back to me Carl. One more question - is there a way to tween them all from/to distance relative to their starting point? ie - if the MCs were at x= 100,200,300 and I want to tween them all from (their current position -100), to their current position. (so start them all off at X-100 and tween them all to X ) I tried something like this but cant seem to figure out how to get them back to their initial X .staggerFromTo(mcArray,30,{x:"-=100", alpha:0},{x:"+=0",alpha:1},5, 45) If I change the "To" x to +=300 , that seems to do it. I guess I'm wondering what is going on when I use the += syntax in that situation. Thanks
  16. Hello all, I have been experimenting using the staggerFromTo method in my timelines and was curious if there was a way I can reference an MCs starting point in the from/to part of the tween. For example, I have several figures in various positions on the stage. I want to tween these figures in from the left side and I set up a timeline to do it. The other caveat is, when this timeline runs, I want to MCs to always start the tweens from their original positions, regardless of what happens them while the swf is running. I currently handle it like this. On the start, I have an object that stores the initial x & y of the MCs on the stage. (lets call it xyObject) I then have my timeline : myTimeline = new TimelineLite( {useFrames:true} ); myTimeline.add("start", 15) .fromTo(fig_0,30,{x:xy.fig_0.x - 100, alpha:0},{x:xy.fig_0.x, alpha:1}, 25) .fromTo(fig_1,30,{x:xy.fig_1.x - 100, alpha:0},{x:xy.fig_1.x, alpha:1}, 30) .fromTo(fig_2,30,{x:xy.fig_2.x - 100, alpha:0},{x:xy.fig_2.x, alpha:1}, 35); This works fine. But there are sometimes when Im dealing w/ a lot of MCs, and having them all in an array just makes thing easier. Is there a way I can do something like this using the staggerFromTo method? Thanks in advance -Rob
  17. I'm sure this has been address before, but for some reason I just cant find it. Here is the situation - I have 3 MCs on the stage - mc1, mc2, mc3 All are initially sitting on the stage at Y=100 & X= 100,300, & 500 I create 2 timelines. the first I want to run immediately. (frame 100 for this example) The 2nd I want to run on a button click. myTimeline_1 = new TimelineLite( {useFrames:true} ); myTimeline_1 .fromTo(mc1,30,{_y:100, _alpha:0},{_y:500, _alpha:100},100) .fromTo(mc2,30,{_y:100, _alpha:0},{_y:500, _alpha:100},200) .fromTo(mc3,30,{_y:100, _alpha:0},{_y:500, _alpha:100},300); myTimeline_2 = new TimelineLite( {paused:true, useFrames:true} ); myTimeline_2 .fromTo(mc1,30,{_y:500, _alpha:100},{_y:200, _alpha:50},100) .fromTo(mc2,30,{_y:500, _alpha:100},{_y:200, _alpha:50},300) .fromTo(mc3,30,{_y:500, _alpha:100},{_y:200, _alpha:50},500); myBtn.onRelease = function() { myTimeline_2.play(); } When I run this, and remove myTimeline_2, the MC start at Y=100 with alpha 0 and tween to Y=500 with alpha 100 When I run this with myTimeline_2 in place the MCs all start at Y=500 with and alpha 100 then at frame 100 myTimeline_1 starts and they go as expected. What do I need to do to have myTimeline_2 not evaluated until It actually runs? I have a feeling it has to do w/ using either the OverwriteManager or using Invalidate(). I have been messing w/ both of them and cannot seem to figure it out. Any help would be appreciated. (BTW - this is used AS2 and v12) Thanks
  18. Just a quick question - is there any way during Runtime I can print out what version of greensock is being used? I'm having some issues using some syntax in TimelineLite and want to be sure things are pointing to V12. Just to be sure - this is valid for as2 w/ v12 correct? var tl:TimelineLite = new TimelineLite(); tl.to(instructions,1,{_alpha:0}, 1) Thanks in advance. -Rob
  19. Invalidate what exactly what I was after! Changed it to this and it worked like a charm : rotateTimeline.add('rotate',0) .to(circle_1,15,{rotation:"+=15"},"rotate") .to(circle_2,15,{rotation:"-=15"},"rotate") .call(rotateTimeline.invalidate,[],15); Zync, Yours would work as well, but for my needs it needs to live in a timeline. I appreciate the info. Thanks
  20. I have a feeling that I'm just missing something here, but here it goes. I have 2 circle of arrows one inside another. I want one to rotate 15 degrees and wait 1 second then rotate another 15 degrees... I want the to other to do the same but in the opposite direction... var rotateTimeline = new TimelineMax( {useFrames:true,repeat:-1,repeatDelay:60} ); rotateTimeline.add('rotate',0) .to(circle_1,15,{rotation:circle_1.rotation + 15},"rotate") .to(circle_2,15,{rotation:circle_2.rotation - 15},"rotate"); What seems to happen is that it rotates 15 degrees then on the repeat, it goes back to the original position and rotates again. Is there a way to just keep adding (or subtracting) 15 degrees each iteration? Thanks
  21. Thanks Carl I figured their had to be an easier way. I actually build the array upfront - so I already have it which is perfect! Thanks again -Rob
  22. Here is a suggestion - not sure if it would work or not - but maybe worth a shot. You could try putting a mask over the vector art - then just alpha tween the mask. Probably a lot less CPU intensive to alpha a simple box vs vector art. I have not done it in a while - but I think when you alpha a mask - you have to set cacheAsBitmap flag to true for the MC as well as the MaskMC. Good luck. -R
  23. Kind of an odd question here but I have a series of swfs that I'm building that use sequential MCs names such as fig_1,fig_2,fig_3,fig_4..etc in some cases, it can go up to 15 or so. In a simple example, lets say I want to fade all 15 figures in, and later in the timeline move them across the screen. To do that - I create a timeline for my swf like this : myTimeline = new TimelineLite( {useFrames:true} ); Then I add the tweens to the timeline : .add("fig_fade_in",10) .to(fig_1,30,{alpha:1},"fig_fade_in") .to(fig_2,30,{alpha:1},"fig_fade_in") .to(fig_3,30,{alpha:1},"fig_fade_in") ... until I get to fig_15. then I add the move : .add("fig_move",60) .to(fig_1,30,{x:200},"fig_move") .to(fig_2,30,{x:200},"fig_move") .to(fig_3,30,{x:200},"fig_move") .... again until I get to fig_15 I'm just curious if there is an easier and/or cleaner way to do that? Thanks -Rob
  24. Well of course I mess w/ it a bunch and cant get it to work - make the post...keep messing w/ it and then figure it out. Changed this line : var folderTimeline = new TimelineLite( {useFrames:true}); or this var folderTimeline = new TimelineLite( {useFrames:true,paused:true}); Then changed the how I added the timelines. Changed this .add(folderTimeline,65) to this .add(folderTimeline.play,65) and this: .call(folderTimeline.reverse,[],"folders") to this .add(folderTimeline.reverse,1) Now it works as expected.
×
×
  • Create New...