homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

Requiring click before flash downloads

10+ Year Member

Msg#: 4266583 posted 8:38 pm on Feb 13, 2011 (gmt 0)

I have an html page with several swf videos. I don't want all the videos to download on page load, instead I would like them to download only when a visitor clicks to play them.

Currently I achieve this using an I-frame with an image in it that loads another page with the movie. It's messy.

Is there a way of embedding the video on the page but requiring a click before it downloads? I know it sounds simple but I can't seem to find useful info about how to do this. Any pointers much appreciated.



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4266583 posted 1:03 am on Feb 16, 2011 (gmt 0)

If the videos are actually embedded in SWFs then you may have a problem.

The usual method is to use a "wrapper" SWF that loads an FLV video.

The SWF would have a tiny filesize and contain a button to call the (much larger) FLV file.

Any chance of re-jigging your source material to do it that way?



10+ Year Member

Msg#: 4266583 posted 6:44 pm on Feb 16, 2011 (gmt 0)

Brilliant - I have the videos in .flv format so that would be easy. I also have the FlashMX editor used to prepare the videos so could prepare the wrapper file.

How is it done roughly? Does it require additional software or scripts or can I just mess around in FlashMX with actionscript and the like? - searching for this sort of thing seemed to return application specific information.


WebmasterWorld Senior Member 5+ Year Member

Msg#: 4266583 posted 1:01 am on Feb 17, 2011 (gmt 0)

Please clarify the reference to Flash MX.

That was the name of version 6 back in 2002 (the first to incorporate video, but not well). It may not be enough, or if working with FLVs is possible at all it may be horrendously complicated (I'm sorry, I can't remember after all this time).

More recent Flash versions (8x) used a built-in FLV component (simply double-clicking an FLV wouldl launch an easy wizard). You make a "wrapper" SWF file of the correct dimensions, with extra space at the bottom if you want to load transport controls.

For multiple choice the "wrapper" SWFs can be loaded into an interface SWF as required using buttons (I generally use loadMovie into a placeholder movieClip).

Hope this helps.



10+ Year Member

Msg#: 4266583 posted 9:11 am on Feb 17, 2011 (gmt 0)

I am a bit out of date with software - FlashMX is 2002ish. Turns out it does not support .flv files. I was confused by .fla which are the project files.

Thanks for the explanation - it makes a lot of sense. Looks like the answer is to upgrade to a version that supports .flv and from there is sounds easy.


WebmasterWorld Senior Member 5+ Year Member

Msg#: 4266583 posted 5:29 pm on Feb 17, 2011 (gmt 0)

Well if what you have are videos embedded in SWFs you could still use Flash MX to make a menu interface SWF and load them into a placeholder movieClip on demand (perhaps with clickable thumbnals instead of standard buttons).

It may be 2002 vintage, but it is still a powerful tool and old-style Actionscript works fine.



10+ Year Member

Msg#: 4266583 posted 10:56 am on Feb 18, 2011 (gmt 0)

I've finally managed it!

I'm using a movie controller that came with Camtasia Studio. It loads the flash video and provides playback controls.

I've put that in the second frame of my new loader flash file. In the first frame I've added a stop action to stop the movie from playing.


Then I've put a jpeg in the first frame converted to a button and added an action to that to send it to the second frame on mouse click:

on (release) {

When it gets to the second frame it starts loading the movie. There is also a stop action in frame2 to prevent it from going back to frame 1.

Many thanks for your help - I've tried this sort of thing before but as you've probably guessed I'm not very good at Flash.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved