How to link pages through the timeline and with buttons in flash?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • knkweb
    New Member
    • Mar 2008
    • 1

    How to link pages through the timeline and with buttons in flash?

    Linking pages with buttons in flash?

    Hi:

    I have this problem in actionscript (flash). I was wondering if someone can help me out. I am a junior programmer, and I really needed to do this for school.

    Ok, I have a page with a graphics, and I would like to push a button that I created which will go into another page on the certain frame in flash. I would like to use the timeline in flash to link each page. So one frame has a graphic and another frame has another graphic. Basically, jumping from one frame to another frame.

    I tried using this:
    onClick () {
    gotoAndPlay("5" )
    }

    Unfortunately, it plays and goes to the next frame which is frame 5, but without me clicking on the button. Which is not what I want to do. I want to click on the button and it links to the second page of the frame.

    Not sure if it is a difficult task to do.....

    Thank you very much for you time.
    Last edited by knkweb; Mar 2 '08, 08:02 AM. Reason: Forgot to add a word
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by knkweb
    Linking pages with buttons in flash?

    Hi:

    I have this problem in actionscript (flash). I was wondering if someone can help me out. I am a junior programmer, and I really needed to do this for school.

    Ok, I have a page with a graphics, and I would like to push a button that I created which will go into another page on the certain frame in flash. I would like to use the timeline in flash to link each page. So one frame has a graphic and another frame has another graphic. Basically, jumping from one frame to another frame.

    I tried using this:
    onClick () {
    gotoAndPlay("5" )
    }

    Unfortunately, it plays and goes to the next frame which is frame 5, but without me clicking on the button. Which is not what I want to do. I want to click on the button and it links to the second page of the frame.

    Not sure if it is a difficult task to do.....

    Thank you very much for you time.

    I think I know what you need to do.
    I'm assuming you only have one scene.
    Create another layer and rename it actions this should be the top layer.
    For every image you have you need to make a new keyframe.
    ie if you have a image on frame 6 and another image on frame 12 you will need to make new keyframes on 6 and 12..
    once you have that go back to frame 6 on the action layer. Open you Actions
    and type this in on line 1
    stop ();

    repeat this on every keyframe you have.

    That should be it.
    test it, if it does not work let me know.

    nomad

    Comment

    Working...