A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: REALLY REALLY SIMPLE GOTOANDPLAY FRAME() SYNTAX PROBLEM- you'll be in and out quickly

  1. #1
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    REALLY REALLY SIMPLE GOTOANDPLAY FRAME() SYNTAX PROBLEM- you'll be in and out quickly

    alright- I am no noob (well, maybe i am)-

    point being- i have a slight problem. I know how to use gotoandplay and all that jazz....

    But, for some reason it worketh not....

    I believe the problem is:

    I am trying to go to a frame that is:
    1: behind me
    and 2: a frame- that is, i'm trying to trigger it FROM AN MC

    So, i have this mc... its located on frame 4 of scene 4- on that mc is some coding:
    Code:
       _root.gotoAndPlay("Scene 2",1);
    Hmm.... I knoweth not y this worketh not.... please reply very soonly as this is so insanely easy compared to the rest of my program.... how could my great program be flaunted by something so small and insignificant as a visual graphic???

    hmm.. do i need to use something other then .root because i'm in a movie clip? i recall using this exact thing in this exact situation prior to this one, and it worked fine... the debugger hits the step right on time, it just doesnt execute it correctly... that is, the viewer sees nothing...

    BTW- i am aware that a majority of the flashing community hates scenes... well, for this purpose (a single flash puzzle game, that only requires 5 scenes- a loader, a title screen, a instruction scene, and a game scene, and a high score / "yay you won" scene) i find them quite efficient... But, I sincerely hope there is a single way to navigate between them... i know i've done this before... sometime... somewhere... hurry up and post the answer i know its somewhere.... hmm thats a song i know it... i'll remember it later...
    maximum width 300 no more maximum hieght 40 no more not interchangable

  2. #2
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    asdf

    GAH!!!!

    alright just in case anyone else here seees this, and has this problem...

    this is the answer:

    _root.gotoAndPlay(1,1);

    not ("scene 1",1)

    if your using it inside a movie clip...

    alright now people can learn from this mistake...
    maximum width 300 no more maximum hieght 40 no more not interchangable

  3. #3
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    You still have a couple of things confused. First, the gotoAndPlay("scene",frame) is a global movie method that will only work from the main timeline. The movieclip method of gotoAndPlay will work from any timeline. The difference between the methods is the movieclip method only accepts one arguement........ frame number or frame label. I suggest using frame labels as it makes understanding navigation much easier. To use the movieclip method, place a frame label on a frame you want to send the playhead to and target that frame label.......

    _root.gotoAndPlay("frameLabel");

  4. #4
    Member
    Join Date
    Sep 2005
    Location
    orange county, ca.
    Posts
    69
    i always did
    .root_gotoAndPlay('Scene 2',"2");

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