Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
09-17-2011, 05:56 AM #1
adding preview to the new SWFobject
hi, i upgraded my SWF object about 3 months ago and have been trying to find a way to add the preview back in there, but dont know how with the new process since what i had originally was ancient.
the old code was like this
so how do i add this to the new way of coding.
here is the new way of doing it and this is in the php header
<object classid="clsid: my class id went here" width="175" height="175" id="player" name="player" align="middle"> <param name="movie" value="player.swf" /> <param name="play" value="false" /> <param name="quality" value="high" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="flashvars" value="file=<?=$ROOT?>/movies/<?=$sql_array->vid_id?>.flv" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="player.swf" width="175" height="175" align="middle"> <param name="play" value="false" /> <param name="quality" value="high" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="flashvars" value="file=<?=$ROOT?>/movies/<?=$sql_array->vid_id?>.flv" /> <!--<![endif]--> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object>
i think i can add it is a param flashvar but im not sure how on this code
Just fyi i upload my vids using FFMPEG so in the dir there is a flv and associated jpg for the view for each vid.
in other words there is a 1.flv and a 1.jpg i just need to figure out how to display the jpg for each vid in the code above.
Last edited by durangod; 09-18-2011 at 03:09 PM.
09-17-2011, 09:05 AM #2
- Join Date
- Mar 2011
- Thanked 20 Times in 20 Posts
09-17-2011, 03:34 PM #3
didnt work but thanks i think this 2.+ version of swfobject differs from the 1.+ older versions because it does not allow inner content div until after its loaded. I think i have to do a call to css using the swfobject param css call but you know i really dont know, it does not seem it should be that hard. param bgcolor does not work, nor does param preview with the file link.
i also tried adding the write preview in the header js like the old one but still did not work. Some how someplace someone had to of tackled this issue of having something other than a black face video and putting an image inside the box with version 2.+ swfobject, but i have not found where anyone has done this yet. ill keep looking, any help is appreciated.
Last edited by durangod; 09-17-2011 at 03:38 PM.
09-17-2011, 08:10 PM #4
hot dang!!! 5 hours reading and searching the net and i finally figured it out. on a whim i changed this line and low and behold i now have a background image preview for the movies.
Everthing i read on swfobject site and others talked about creating a parent div and a bunch of other coding and i was like
there has to be a better way. and there is!!
sooooooooo simple but yet so ellusive lmao..
just change this line in both places and add the &image code
wooooo hooooo im a happy camper lol i hope this saves someone else the 5 hours time i spend on this, and your welcome.Code:<param name="flashvars" value="file=<?=$ROOT?>/movies/<?=$sql_array->vid_id?>.flv&image=<?=$ROOT?>/movies/<?=$sql_array->vid_id?>.jpg" />
09-17-2011, 08:13 PM #5
- Join Date
- Aug 2011
- Thanked 2 Times in 2 Posts
Thanks for this thread. I am also searching for this.