Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Movie play ontop of itself?
From: Dave Broz
Date: Wed, 2 Feb 2000 21:26:04 GMT

>Mark Goodman Wrote:



>I am sort of new at flash and have a question. I would
>like
>to have a button start a movie clip that has about 100
>frames in it.
>Here is the tricky part...
>I would like it (if possible) for the movie to
>continue playing and
>if the user hits the button again the movie will start
>on frame 1
>again but still play through the first button push.

Just quickly off the top of my head here is one very rough and ready
solution. Basically the way it works is that it duplicates an instance of a
movie clip when you press the button and then tells that new duplicate to
play. I added a set property script to shift the duplicate 40 pixels to the
right so you could see the new duplicates. The "x" variable is the stepper
variable for the the naming of the new movie clip. I used the "i" variable
to check if the movie clip is the original movie clip or not. (Hence the if
statement).

1) create your 100 frame movie clip by placing an empty keyframe with a
"stop" action in it on the first frame. on the second frame place a "play"
action and the first frame of your 100 frame content. your 100 frame movie
clip is now 101 frames. place a "stop" action on the last frame to stop
your movie looping

2) on the main timeline (_level0) create two layers.

In one layer put this action:

Set Variable: "x" = 1
Set Variable: "i" = 0
Stop

In the other layer place your movie clip (I named the instance "movie0") and
start button.

3) Place this script on your button.

On (Release)
If (_level0:i=0)
Begin Tell Target ("/movie0")
Play
Set Variable: "_level0:i" = 1
End Tell Target
Else
Duplicate Movie Clip ("/movie0", "movie"&_level0:x, _level0:x)
Set Property ("/movie"&_level0:x, X Position) = GetProperty
("/movie"&(_level0:x-1),_x ) + 40
Begin Tell Target ("/movie"&_level0:x)
Go to and Play (2)
Set Variable: "_level0:x" = _level0:x+1
End Tell Target
End If
End On

4) Try it out, it works!! You should be able to adapt this for what you
need.

5) If you want the fla just email me for it.

Dave Broz
eleven1 interactive media
email: flashateleven1 [dot] com
www.eleven1.com




flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World’s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Movie play ontop of itself?, Mark Goodman

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]