A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Ok this is REALLY killing me!!! PLZ HELP!

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    10

    Ok this is REALLY killing me!!! PLZ HELP!

    I'm using Flash MX....Ok so this is a simple example of what I'm trying to do...I have my main time line and I added a circle...I converted the circle to a movie clip...I double clicked it. In the movie clip I double clicked the same circle and converted it into a button....Ok so in the movie clip I click actions for the button that i've created and did a on release goto and stop on frame one of scene two script....I added a scene 2 to the file with a stop action in frame one....when I load up the movie and click the button it DOESN'T goto scene 2. I believe it's because I don't know how to script nested things can someone PLEEEASE help me? What is the syntax for nexted things like this????

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    just add _parent. to your code eg:

    _parent.gotoAndStop("scene2");

    sorry i don't use scenes so not sure about that part, but _parent is your solution
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Aug 2007
    Posts
    10
    Didn't work it doesn't have to be scenes it can be frame but that didnt' work either

  4. #4
    Junior Member
    Join Date
    Jun 2007
    Posts
    26
    Try putting all your code on the main timeline:

    mc.btn.onRelease=function() {
    gotoAndStop(2);
    }

    Also make sure you gave the movieclip and button instance names.

  5. #5
    Instructional Designer
    Join Date
    Feb 2005
    Location
    Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
    Posts
    299

    There might still be a few gaps...

    OK. You are new and I'm new too. Been new for far too long, so I'll spell it out for you.

    1. Name level one actions.
    2. Put a stop on the fames needing a stop.
    3. Name level two "stops"
    4. Put your content on this layer, and name the frame (just in case)
    5. Name level three "button"
    6. Place your button on the first frame of the button layer.
    7. Click on the button (to select), select Modify>convert to symbol.
    8. With the button still selected, open the properties window, type myBut (or whatever makes sense to you) as an instance name. (if you see a red flag on the frame, that means you just named the frame instead of the instance)
    9. Extend the button frame to the last frame of the movie. (Makes it available to every frame)
    10. Add rag85's code to frame one row one of this movie (make a habit of giving actions a row of their own)
    11. Control>Test Movie


    If your timeline is sequential, you could use:
    Code:
    buttonInstanceName.onRelease=function() {
    nextFrame();
    }
    If your timeline is not sequential, you want to place a new instance of your button on each stop frame with:
    Code:
    UniqueButtonInstanceNameForThisInstance.onRelease=function() {
    gotoAndStop("theNameYouGavetoTheFrame");
    }
    With a stop(); on the last frame, hitting the button with nextFrame(); would take the user back to frame 1.

    Hope this helps!
    Tomas

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