I want to pass a variable which will represent a filename to a swf file from a
hypertext link in an HTML document.
When the user clicks on the link which has ?variablename=filename_to_use
appended to a "normal" link to a page,
this variablename will be passed to the swf file.
I've already created this target swf file to have an actionscript with a
FLVPlayComponent with the filename hard-coded in the actionscript. I want the
actionscript to use the variable representing the filename_to_use that was
passed to from the URL line.
The following is the actionscript that plays the flv file taken from the Flash
Help: Creating an Application with an FLVComponent
ORIGINAL VERSION:
import mx.video.*;
this.attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:320, height:240,
x:100, y:100});
my_FLVPlybk.skin = "file:///install_drive|/Program Files/Macromedia/Flash
8/en/Configuration/Skins/ClearOverPlaySeekMute.swf"
my_FLVPlybk.contentPath = "<a target=_blank class=ftalternatingbarlinklarge
href="
http://www.helpexamples.com/flash/video/water.flv"; VERSION">
http://www.helpexamples.com/flash/video/water.flv"; VERSION</a> USING THE FILENAME FROM THE PASSED VARIABLE INSTEAD OF WATER.FLV
import mx.video.*;
this.attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:320, height:240,
x:100, y:100});
my_FLVPlybk.skin = "file:///install_drive|/Program Files/Macromedia/Flash
8/en/Configuration/Skins/ClearOverPlaySeekMute.swf"
my_FLVPlybk.contentPath = "<a target=_blank class=ftalternatingbarlinklarge
href="
http://www.helpexamples.com/flash/video/variable"; I">
http://www.helpexamples.com/flash/video/variable"; I</a> currently can play videos with this actionscript at my school website
but must make a separate swf for each video.
I want to be able to have one swf file that will play which video was passed
from the link in the HTML page.
I am using HTML page to lower the bandwidth so that users won't have to load a
swf file to see curricular material and then perhaps choose a video on the
topic.
<a target=_blank class=ftalternatingbarlinklarge
href="
http://www.wearekennedy.com/kent/whatsup.htm click">
http://www.wearekennedy.com/kent/whatsup.htm click</a> the link to the Spring curriculum map with resources and then click
on e.g. The_Food_Web video
Thank you,
Kevin Kent
Educator, John F. Kennedy H.S., Bronx, NY