SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict rikmg's Avatar
    Join Date
    Jan 2002
    Location
    South Yorkshire - UK
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    flash help: buttons & go&play

    Hi iam creating attempting an interactive flash movie where the user clicks a button & it plays another part of the movie i've had no success thus far.

    iam using the on release go&play frame no "10" for example,

    however the movie just keeps on looping, shouls it have a stop function in there ?

    also the movie has 7 buttons and i need each button to play its own little clip whats the best way to set it all up ?

    do i need to convert the clip its gonna play into a symbol ?
    how many layers do i need ?

    many thanx ,

    Richard.
    Affordable Web Design, UK
    http://www.rikmg.co.uk

  2. #2
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Richard,

    i am using the on release go&play frame no "10" for example, however the movie just keeps on looping, should it have a stop function in there ?
    No need to put a Stop action in the timeline although that would work. Just change the Play to Stop in your 'goto' statement. There is a radio button in the action panel which allows you to switch between the two. So you get...

    on (release) {
    gotoAndStop(10);
    }


    As for the other questions, like a lot of Flash there are many ways of doing this. Here's one simple way:

    First make all your little clips symbols and make sure that they are 'movie clip' symbols rather than 'graphic' or 'button' symbols.

    Then use the above actionscript on each button changing the frame it skips to (10, 20, 30 or whatever).

    On a new layer, insert a keyframe at each of the frames you chose above.

    Select the first keyframe you made (e.g. frame 10) and drag the respective movie clip symbol from your library onto the stage. Then move onto the next keyframe and insert your next movie clip symbol and so on.

    This way depending on which button you press, the user will skip to (and stop at) the appropriate frame and whichever movie clip symbol you put on the timeline at this point will play.

    As for the number of layers, I find that it's generally good housekeeping to have a couple of layers at the top (reserved for keyframe actionscript and labels respectively) then as many layers as you like. You could put all the buttons on one layer and put all the movieclips on another or you could give everything it's own layer. Just depends how neat and tidy you want to be?

    Hope this helps

  3. #3
    SitePoint Addict rikmg's Avatar
    Join Date
    Jan 2002
    Location
    South Yorkshire - UK
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers for this, should work now...
    Affordable Web Design, UK
    http://www.rikmg.co.uk

  4. #4
    SitePoint Addict rikmg's Avatar
    Join Date
    Jan 2002
    Location
    South Yorkshire - UK
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok i tried it still keeps looping back..???? my brain has rotted.


    iam missing something really simple.
    Affordable Web Design, UK
    http://www.rikmg.co.uk

  5. #5
    Non-Member Forlorn's Avatar
    Join Date
    Mar 2002
    Location
    San Diego, California
    Posts
    1,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Richard

    at the last frame (10) put a stop command in the Frame Actions. That should help

  6. #6
    Non-Member Forlorn's Avatar
    Join Date
    Mar 2002
    Location
    San Diego, California
    Posts
    1,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on (release) {
    gotoAndStop(10);
    }

    Do this


    on (release) (
    gotoAndPlay (10);
    )


    then on the frame put a Stop action. GoTo and Stop for some reason never works right for me try it the way I just showed you and it should work

  7. #7
    SitePoint Addict
    Join Date
    Jan 2002
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not a flash expert so correct me if i'm wrong.

    You can also create all your movies and use the 'tell target' command to make them play. That way you can have all the movies on differnet layers but in one frame. Just a bit neater I think.

    Qamar

  8. #8
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rikmg & I have PM'd about this and I have done a solution. So I thought I would post it just in-case anyone is interested... here

    I know that there are 100 & 1 ways of doing this but there's one way


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •