|
-
SWF to play FLV passed as a get variable
Hi all:
I've build quite a few swf's which play video and audio, but now I need to build some which can play mp3 or flv based on a get variable, e.g.:
http://foo.com/player.swf?movie=bar.flv
So, the swf needs to be able to load the flv or mp3 dynamically based on the url, in other words.
Any clues how to start? I've done a reasonable amount of action scripting but not this particular problem.
Thanks in advance for your help.
TD
-
Well, no responses. How can I word this differently, perhaps more clearly.
I not familiar with how a swf retrieves variables from a url. For example, in PHP, all 'GET' variables (those appended to a url) are available in the $_GET[] array, post variables in $_POST, cookie vars in $_COOKIE, etc.
And, in javascript, you can set the 'src' attribute of an image. So you can simply do myimage.src="./foo.gif" to change it.
So I simply need to know how to more or less replicate those behaviours in a SWF using action script. How can I retrieve the value of a GET variable via action script, and use that value to set the stream source for an FLV object in a SWF movie.
Thanks in advance if you can help.
Best,
td
-
KoolMoves Moderator
 Originally Posted by tdromba
Hi all:
I've build quite a few swf's which play video and audio, but now I need to build some which can play mp3 or flv based on a get variable, e.g.:
http://foo.com/player.swf?movie=bar.flv
So, the swf needs to be able to load the flv or mp3 dynamically based on the url, in other words.
Any clues how to start? I've done a reasonable amount of action scripting but not this particular problem.
Thanks in advance for your help.
TD
That would work actually you that should give you a variable named movie set to equal bar.flv
-
Okies, thanks, Blanius. I'll move ahead from there.
td
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|