A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: F8 Please help urgent for work.

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    4

    F8 Please help urgent for work.

    Hi,
    I'm working on a project for work, and I CAN'T get this to work.
    I have a page that has action script on the button it says...

    on(release) {
    gotoAndPlay("zvue");
    }

    On the first click...it goes to the right place, but if you hit a SECOND time...it goes somewhere totally unexpectedly. What to do? Please help.

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    hmm.. are you using scenes in your flash piece?
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    4
    no...just one scene. I've labled the frames.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    also specify a timeline. Assuming you want the main timeline to go to that label:

    Code:
    on(release) {
    _level0.gotoAndPlay("zvue");
    }
    gparis

  5. #5
    Junior Member
    Join Date
    Jun 2007
    Posts
    4
    Where do I put that actionscript code? on the button or on the frame?

    The button spans over 7 key frames and works the rest of the time EXCEPT when you're on the "zvue" frame itself. If you're ont he ZVUE frame, and you hit the ZVUE button it goes to a different part of the main timeline.

    Does this make sense?

  6. #6
    Senior Member layerburn's Avatar
    Join Date
    Jul 2006
    Location
    USA
    Posts
    542
    Two options, you could either change your gotoAndPlay to gotoAndStop like so

    Code:
    on (release) {
        gotoAndStop("zvue");
    }
    or you could have it check to see if it's on the frame like this (15 is the frame number the label 'zvue' is on so you would need to change this) so if it is on 15 (or zvue) it won't do anything, otherwise it will gotoAndPlay label zvue.


    Code:
    on (release) {
    	if (_level0._currentframe == 15) {
    	} else {
    		gotoAndPlay("zvue");
    	}
    }
    This is your brain. This is your brain on script.

  7. #7
    Junior Member
    Join Date
    Jun 2007
    Posts
    4
    THANK YOU SO MUCH!!!

    That worked.

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