flash autoplay?

flash autoplay?

Posted by: xenatorres
Posted on: 2009-04-16 13:50:00

Hello.

I have never learned anything about flash media. I don't have any sort of program for it, and, at this time, I'm not looking to dive into it.

However, with Dreamhost I have been able to convert video to flv and have it play on my client's site.

I am wondering how to make a video so it auto plays.

The client would like to have a flash video intro, but I am only able to do this so that you have to click the 'play' button and I was wondering if it was just a case of needing some extra code in there to make it auto play.

I don't have an example at present for the homepage as we are currently revamping the site, but I am using the basic Dreamhost provided code when I convert files (you can see this here: http://natashasims.com/media)

TIA!!!

Re: flash autoplay?

Posted by: sXi
Posted on: 2009-04-17 00:46:00

<script type='text/javascript'>
var so = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','320','240','8 ');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','240');
so.addVariable('width','320');
so.addVariable('file','http://www.natashasims.com/media/videos/NatashaSims_320x240.flv');
so.addVariable('autoplay','true');
so.write('NatashaSims_320x240.flv');
</script>




How To Install PHP.INI / ionCube on DreamHost

Re: flash autoplay?

Posted by: xenatorres
Posted on: 2009-04-17 01:16:00

Thank you for answering.

I added the code "so.addVariable('autoplay','true');" but it still did not auto play (you still have to press play to view it).

The code now reads:

<script type="text/javascript" src="https://media.dreamhost.com/swfobject.js"></script>
<div id='NatashaSims_320x240.flv'><a href='http://www.macromedia.com/go/getflashplayer'>Get the Flash Player</a> to see this player.</div>
<script type='text/javascript'>
var so = new SWFObject('https://media.dreamhost.com/mediaplayer.swf','mpl','320','240','8 ');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','240');
so.addVariable('width','320');
so.addVariable('file','http://www.natashasims.com/media/videos/NatashaSims_320x240.flv');
so.addVariable('autoplay','true');
so.write('NatashaSims_320x240.flv');
</script>

Re: flash autoplay?

Posted by: sXi
Posted on: 2009-04-17 02:02:00

I took a look at the source just now and the autoplay variable still doesn't appear to be there.




How To Install PHP.INI / ionCube on DreamHost

Re: flash autoplay?

Posted by: xenatorres
Posted on: 2009-04-17 02:53:00

Oh, no. I didn't add it to the current page that is there. That's an actual, in use page, that we don't want an auto play on. But I was playing with it in my editing program.

But, here, I'll toss it up online:

http://natashasims.com/media/media2.html

This one does have the auto play command, but it's not auto playing.

Thanks so much for helping! I don't do this professionally - I just build sites for friends, so really do appreciate it!

Re: flash autoplay?

Posted by: sXi
Posted on: 2009-04-17 03:36:00

<script type="text/javascript" src="https://media.dreamhost.com/ufo.js"></script>
<p id="NatashaSims_320x240.flv">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>

<script type="text/javascript">
var FO = { movie:"https://media.dreamhost.com/mediaplayer.swf",
width:"320",height:"240",majorversion:"7",build:"0",bgcolor:"#555555",
flashvars:"file=http://www.natashasims.com/media/videos/NatashaSims_320x240.flv&autostart=true" };
UFO.create(FO,"NatashaSims_320x240.flv");
</script>




How To Install PHP.INI / ionCube on DreamHost

Re: flash autoplay?

Posted by: xenatorres
Posted on: 2009-04-17 03:58:00

It worked!!! GREAT! That's AWESOME! THANK YOU SOOOOOO MUCH!!!!

Do you know if you can remove the status bar at the bottom? (I would place a "skip intro" link insted in the HTML part).

Tags: flash mediadreamhost