time delay question

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   time delay question
acchow
CZ Newbie
acchow has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 08, 2004
0.00 posts per day
Posts: 3
Points: 156
   
hello. i have a question regarding setting up some kind of time delay function in flash 5. i don't know if it's even possible, since i haven't been using flash for very long. what i'd like to do is set up a button that will go to a specific url on release. but prior to going to that url, i want it to play an animation first. so i need to set up a time delay so that the animation can finish before the page loads the destination url. any kind of help anyone can offer will be greatly appreciated, as i've been pulling my hair out trying to figure this out for the last couple of days. thanks.



Back to top Reply with quote
#2   
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Hi Acc

Make movie with your button on scene 1 and have its a/c gotoandplay scene 2 frame 1

on scene 2 put your animation

In last frame of the animation put the a/c geturl to call in new window



Back to top Reply with quote
#3   re: time delay question
acchow
CZ Newbie
acchow has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 08, 2004
0.00 posts per day
Posts: 3
Points: 156
   
goddsego - thanks. i tried that and it works. however, i noticed that everytime i add a new scene, it increases the size of the file/movie. is there any way to do it with just action commands?



Back to top Reply with quote
#4   re: time delay question
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
I am not quite sure what you are attempting to do but to answer the question...


Yes you can make a delay in action using a/s

If you create a button then select the button and attach this a/s to it, Once the button in pushed there will be a 10sec delay before the window opens to site requested


on (press) {
    function wait() {
        getURL("http://www.codezwiz.com/ftopict-4308.html", "_blank");
        clearInterval(myTimer);
    }
    myTimer = setInterval(wait, 10000);
}



Back to top Reply with quote
#5   re: time delay question
acchow
CZ Newbie
acchow has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 08, 2004
0.00 posts per day
Posts: 3
Points: 156
   
goddsego. that was EXACTLY what i needed!!! thank you so much! you see, what i simply needed this for was so that after i pressed a particular button, the rest of the scene's animation would play out before it jumped to the destination url. but there's a chance that i would have upwards of 10+ of these buttons, so you can imagine that if i added another scene to play out the rest of the animation for each and every button, the size of my file would jump exponentially (and i didn't want that). but the code you provided did the trick. thanks again!



Back to top Reply with quote
#6   re: time delay question
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Yw what you might think about doing in future projects is using the loadmovie a/s for your post button animation.

By using the loadmovie a/s, the main movie with its buttons on it will be all that has to load, then the other smaller movies will only be called upon if their particular button is pushed.


Thus you could have a main with 100 buttons on it that have animation associated with each button (but in a dif swf file) that is quite small



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum