Flasher Archive

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


Subject: Re: FLASH: playing particular scenes in a SWF file
From: Scott Rouse
Date: Mon, 6 Nov 2000 17:12:53 GMT




> I am creating a series of scenes, some of which share the same library
> items.
>
> Can a webpage instruct the Flash player to play only a particular scene
> within a SWF file?

You can pass a variable in the URL (Get method) that calls the flash Movie
and use that variable in a goto command

href= ww.yourflashmovie.swf?scene=5

Beware that you have to pass the variable between the page that is calling
the flash HTML and the flash HTML which is calling the flash movie. You can
do this a number of ways....

1) create an HTML page for every scene in order for an outside page to
call this variable then pass the variable differently within each different
flash HTML, or
2) pass the variable between the pages via some scripting language that
can pass variables such as JavaScript or even Perl....

I have gone with the first sloppier way because I didn't have the time to
learn how to pass variables the second way.

then at the begining of your movie use

Go to and Play (scene) *click "expression" to use the argument within the
paranthasises as an expression.

Scene five will then be played

Watch out for two possible errors:

1) don't use the Goto command on the first frame since Flash 4 doesn't
really have any code to tell you when data has been loaded....as long as you
have a preload movie or at least a couple seconds before the Goto is used
then the data should update your variable (also, declare your variable
beforehand)
2) I am not sure why but I have had trouble more than once trying to
pass one variable at a time.....At least in Flash 5. If it turns out that
you are getting the variable but it doesn't read correctly (in that it is
not read as a number for instance) just pass two or more variables. I don't
understand why just one variable is so problematic, but I have not had a
problem with more than one variable being passed.


> I would prefer not to publish them as separate SWFs as it would duplicate
> the shared library items. I think Flash 5 allows different SWFs to share
a
> library but I am working in Flash 4.
>
> Thanks
> Graham
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save £200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: playing particular scenes in a SW, Graham Waller

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