View Full Version : Load flash on demand?
maclamb
09-30-2007, 04:35 PM
I have a web page with four flash files. When the page loads, all the flash files load too.
Is there a way to preven flash from loading until the play button is clicked?
page: www.zmfstudios.com/movie.html
gnomeontherun
09-30-2007, 08:43 PM
Yes, you just need some actionscript. It looks like you used the video player maker in Flash to make that, but if not what code do you have? The code would depend on how your player is set up.
I might suggest using http://www.*******************/?item=jw_media_player which allows you to have a customizable video player. That way you wouldn't have to code your own.
maclamb
09-30-2007, 09:01 PM
yes, I created this in flash - but have not written actionscript before -but am code literate.
Do you have examples of the actionscript2 code?
I'll look at the player- thanks
gnomeontherun
09-30-2007, 10:19 PM
If you are interested in making your own video player - check out www.gotoandlearn.com - it has a great set of flash video player tutorials - it would help you learn the main code associated with flash video
maclamb
09-30-2007, 11:17 PM
why do I want to create a player? Is it that hard to keep flash from loading and then have it start on a button click? there's already a player attacedh to the swf file
gnomeontherun
10-03-2007, 05:31 AM
Ok so I saw your code and didn't realize the video was actually embedded into the swf file. So the video isn't a separate .flv file? I was under the assumption you had one video player displayed four times and it loaded four different .flv (flash video) files. How did you make these .swf files exactly?
maclamb
10-03-2007, 05:44 AM
thanks Jeremy.,
I used Flash CS3 on the mac - imported a .mov file and created a flv, fla and swf.
gnomeontherun
10-03-2007, 04:28 PM
I personally like to keep my video (.flv) separate from my swf files. If you want to still have the four different screens, you can import the video through Dreamweaver into the page. There is an insert function from the menu that allows you to add flash video, and creates a simple video player which allows the option to enable or disable automatic starting for the video to play. If you don't have Dreamweaver, then to my knowledge you would need to use the media player above.
If you would be good with just one screen and a playlist, I suggest using the media player above since its very simple to use and allows you to set various parameters for how it should run.
All in all, putting video and running it in a swf file is not good practice, and making a video player would allow you to reuse the player and customize it for your needs.
I hope I'm not misunderstanding the situation, but that is why I suggest the media player or if you have Dreamweaver you could do that option too.
maclamb
10-03-2007, 04:38 PM
thanks
the issue is not keeping it from playing - I turned autostart off just fine.
The issue is keeping it from loading until I'm ready.
I downloaded the player above and read all I could - but couldn't find any setting to control loading.
gnomeontherun
10-03-2007, 09:14 PM
http://jeremywilken.com/media.html
This is an example of its usage - it doesn't load the file until it has been selected in the playlist.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.