dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Delay Help pls.

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    12

    Delay Help pls.

    Good day guys..

    i just want to ask if anyone knows how to code this on a button

    onrelease
    gotoandplay(10); // i need delay here before activating the next code below//
    gotoandplay(80);

    the trick is.. i want the button to play frame 10 to 40 then after playing from frame 10-40 the movie stops and then play frame 80 to 100

    sorry for the bad english

    ill attach a file if needed.. i need help badly.

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    You could use the setInterval function or you could put some actionscript on frame 40 that says gotoAndPlay(80)
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    12
    thanks but im having mutiple button/navigation

    1st button
    on(release){
    this.navigation.gotoAndPlay(10); //delay should be here before activating the next code below to give time for the main nav to fade out
    this.mininav1.gotoAndPlay(80); //mini navigation 1 fades in

    2nd button
    on(release){
    this.navigation.gotoAndPlay(10); //Main navigation fades out
    this.mininav2.gotoAndPlay(80); //mini navigation 2 fades in

    3rd button
    on(release){
    this.navigation.gotoAndPlay(10); //Main navigation fades out
    this.mininav3.gotoAndPlay(80); //mini navigation 3 fades in

    i want an action script delay on each button that makes the main nav play for about 30-40 frames before loading the mini navigation.
    Last edited by id00bi; 07-06-2010 at 12:47 AM.

  4. #4
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    Try to use the formatting tags for your code. It makes it easier to read.

    Also, it's considered bad practice to put code on the actual objects themselves. It's better to keep your code on the main timeline or in class files.

    My suggestion could still work. Your buttons could set a variable which dictated with movie is to be faded in and the last fram of the main nav faded out could check that variable and fade in the appropriate movie.

    If that still bothers you, try reading the docs on the setInterval function.
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  5. #5
    Junior Member
    Join Date
    Jul 2007
    Posts
    12
    Thnks for the tips.. im reading setinterval articles now.. great help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center