Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Add Preloader and or Play Button



4:57 pm on Mar 19, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

NOOB here so go easy...

Flash CS3

I created a new file Flash AcionScipt 3.0, imported a .FLV file i was given.

Went through all of the settings, no player controls at the bottom.

What i want to do is either add a pre-loader, or a play button, something like you see on YouTube... a circlular arrow play button.

in my timeline i see Frame 1 and that has the .FLV file.

when i hit "Ctrl + Enter" and test the file, it plays right away... its only 52kb, but i want the user to be able to play the file by pressing the play button.

if i create a play button, would i put that in frame 1, and on click, play frame 2? (im simplified terms?

i assume that is going to require some action scripting in the "Actions" window to do that...

any assistance is greatly appreciated.


9:19 pm on Mar 19, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

ok, i figured out how to add the play button.

i have the following layers now

vid : has the FLVPlayback component named vidPlayer
buton: has an instance of the play button named btn1

actions: btn1.addEventListener(MouseEvent.CLICK, vid1);

e.target.visible = !e.target.visible

i uploaded myMovie.flv to my server, and myMovie.swf

when i view the page, i can see the play button, and it disspears once i click it, but the video does not play...?



4:51 pm on Mar 20, 2009 (gmt 0)

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

I am not sure exactly what you're doing, but I don't see any indication of how you're setting it to play the .flv.

Generally you create a netstream object (Google for "NetConnection()") to import the video into. You can read how much data has been buffered into the netstream object and set it to start plaing when the buffer is full. This is the whole idea of video imported into Flash, to stream so you get the play- while- download experience.

Check out the various tutorials on the 'net and in the Flash help files. I try to avoid the built-in "video players" packaged with Flash, as they are a little bloated, but it's not that difficult to grow your own player.


Featured Threads

Hot Threads This Week

Hot Threads This Month