Welcome to WebmasterWorld Guest from 54.196.244.245

Forum Moderators: open

Message Too Old, No Replies

streaming audio mp3 video flv using flashvars and html

streaming audio mp3 video flv using flashvars and html

     
11:24 pm on Dec 14, 2008 (gmt 0)

Preferred Member

5+ Year Member

joined:June 19, 2006
posts: 476
votes: 0


Hello, I am using the default streaming player included in flash and just wondering how i might could use variables passed from the html to set the video file itself and possibly the width of the player.

is there an easy way to do this? Id like to not have to specify the video file name in flash but rather in the html or javascript as I plan to use this dynamically with php and alot of different video files.

8:59 pm on Dec 21, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Using PHP, you should be able to echo the value of a "movie" flash variable in the generated HTML:

<PARAM NAME=FlashVars VALUE="movie=<?php echo $movie_name; ?>">

or within the embed:


FlashVars="movie=<?php echo $movie_name; ?>"
6:14 pm on Dec 22, 2008 (gmt 0)

Preferred Member

5+ Year Member

joined:June 19, 2006
posts:476
votes: 0


yes this part is easy and i understand it. what i need to know is how to allow this in flash. for instance i am building an mp3/flv streamer and want to inside using flash set it up to allow flash vars.
6:43 pm on Dec 23, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


You can try something like this in AS3:

var videoSource:String = root.loaderInfo.parameters.movie;
4:59 am on Jan 19, 2009 (gmt 0)

Preferred Member

5+ Year Member

joined:June 19, 2006
posts: 476
votes: 0


eelixduppy can you provide any links to such documentation?