homepage Welcome to WebmasterWorld Guest from 54.161.220.160
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

    
Add Preloader and or Play Button
tonynoriega

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3874423 posted 4:57 pm on Mar 19, 2009 (gmt 0)

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.

 

tonynoriega

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3874423 posted 9:19 pm on Mar 19, 2009 (gmt 0)

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);
vidPlayer.source="myMovie.flv"

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...?

anyone?

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3874423 posted 4:51 pm on Mar 20, 2009 (gmt 0)

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.

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