A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: gotoAndPlay stuff (not too advanced, not too newbish)

  1. #1
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216

    gotoAndPlay stuff (not too advanced, not too newbish)

    Ok I am making a jeopardy like game, and I want it so after I click on one of the prices a red X (which is the second frame in a MC would appear.

    All of the buttons are inside of a mc

    So in the button I put

    [code]

    on (release) {
    _root.gotoAndPlay (4); //not relevant
    _root.child.gotoAndPlay (2);
    }

    Now why wont the child movieclip goto its second frame?

    I just cant figure it out!

  2. #2
    Between Flash & Flashkit timothye's Avatar
    Join Date
    Dec 2003
    Location
    Sweden
    Posts
    1,666
    you have to target its instanceName .not CHILD ..
    I want to learn .
    wannabe flasher [ Actionscript 2.0 ]

  3. #3
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216
    child is the instance name!

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    All of the buttons are inside of a mc...

    What's this above mc's instance name?

    You should add it to your path of the child movie clip...
    And possibly use stop rather than play...

    on (release) {
    _root.gotoAndPlay (4); //not relevant
    _root.other_instance.child.gotoAndStop(2);
    }

  5. #5
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216
    ok now that works,

    I can see that the new MC changes for about a split second before it goes into the question. My only problem is now when I go back to the bored, it doesnt stay covered up!


    how do i do this?!

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Did you use stop as in gotoAndStop(2); , rather than gotoAndPlay(2)?

  7. #7
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216
    Yes I did exactly that!!

    I thought this woiuld be sooo simple too!

  8. #8
    Senior Member MiLo_Anderson's Avatar
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    292
    Im not sure, but it sounds like you are moving away from the frame that shows your board and then going back to it? If that is so you probably need to use a variable or something that changes when it crosses the box out. Then when it goes back it checks that variable and sees if it has been chnaged. I could be wrong, but i believe that when the timeline goes back to the movieclip it forgets stuff that has happened to it and just goes back to what it looked like before. If you check the variable and it says that it has already been changed then you can make it cross it out. I'm not really sure how to do this, but maybe that can get your wheels turning?
    "A piece of toast always lands butter side down, and a cat always lands of its feet. If one was to tie a piece of toast to the back of a cat butter side up, would it hover above the ground in perpetual indecision?"

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Best if you can't get it going, would be to attach your .fla, zipped up and in MX only format.

  10. #10
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216
    Yes MILO thats exactly what im doing.

    The FLA is very large right now (it has a lot of sound files etc.). How would I go by making it a variable or whatever??

  11. #11
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You could allways make a copy of your .fla, using Save As...., and after deleting all sounds and unused items in the Library.

    That copy should also be saved in MX only format, and zipped up.

  12. #12
    Senior Member MiLo_Anderson's Avatar
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    292
    Im sorry, im not really sure how to do it. I just remember reading someones post where they were talking about it alittle. I never really tired to figure it out. See if you can read around, or maybe someone else will be able to figure it out.
    Sorry
    "A piece of toast always lands butter side down, and a cat always lands of its feet. If one was to tie a piece of toast to the back of a cat butter side up, would it hover above the ground in perpetual indecision?"

  13. #13
    Sir solves own questions :-D
    Join Date
    May 2003
    Location
    IL
    Posts
    216
    I decided to just not include that, because its due tomorrow!

    Thanks anyways!!

    NOW IT STAYS GO FIGURE.

    ONCE AGAIN AV SOLVES HIS OWN PROBLEMS
    Last edited by antivirus; 03-22-2004 at 05:19 PM.

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