I have flash actionscript 3 project that on the second frame (after the welcome screen) loads external flv into FLVPlayback component or external mp3 for player.
I'm trying to find code for preloader to the entire project - that will show before the first screen and will preload also the external files so when the user moving to the frame with the player the flv/mp3 will be shown immediately.
is it possible to load the flv into some object and then assign it to FLVPlayBack component as source?
Any help will be much appreciated!
Thanks.
You can do this by checking getBytesLoaded against getBytesTotal and creating your own loading bar, but I'd recommend using Greensocks LoaderMax library.
http://www.greensock.com/loadermax/
Lots of info and examples for you to get started.
Related
I am unable to get embedded video working in the HTML wrapper, whereas it works fine in the SWF file itself. The video plays instantly when opening the SWF, but when I open the HTML only the video player skin shows and no actual video, almost as if it can't find the video file.
Here is the exact process I went through to get to this point:
Starting from a blank ActionScript 3 document, I import a video and select the "Load external video with playback component" option. The video file is in the same directory as the project file, and the video file is referred to in FLVPlayback source as 'movie.flv'. From here I publish the project to SWF and also with a HTML wrapper. Upon opening the .SWF the video plays, however when I open the .HTML no video plays, although the video player skin shows up.
I have tried several different methods of getting this video to work, I have tried embedding the video solely with ActionScript, but the results are the same.
Is it possible to have the video load both in the .SWF and in the .HTML? The .SWF itself loads, but the video embedded in the .SWF does not. I have also tried using .mp4 files but have the same results. This is for a school project, so I am limited to using ActionScript, and the final project must be published to HTML/SWF/EXE.
I have an .swf file which loads several external MP3s, I want to make a preloader with an animated progress bar to ensure all of the Mp3s are loaded before the user can interact with the timeline. I have seen some people embed the MP3s in the flash file and then preload that .swf into another loader .swf.
I dont want to embed the MP3s, but would consider using a lader movie to load the main movie, will this method still work with external mp3s?
I have used AS3
A loaded SWF will maintain it's AS3 code no matter if it's from the document class, on timeline or both.
If you have a Main SWF that loads an External SWF and External SWF is loading an MP3 file there is no problem with it what so ever.
Be careful with the loading security standards and the External SWFs loading sequence. Since it's a loaded SWF it will not have access to stage instantly (even in document class), in stead it will get it after it is added to stage (use ADDED_TO_STAGE event listener). It shouldn't be a problem if you're frame-scripting.
You might want to make a method in the External SWF that starts loading the MP3.
I'm having to change a video from an ollllddd project. It was built using the AS3 FLVPlayback Component. The video back then were FLV and streamed fine from out limelight server.
The new videos I received are h264 MP4s and are NOT streaming. Has anyone been able to successfully STREAM mp4 files using the FLVPlayback component?
I never use this component anymore. I have since moved onto OSMF player and I can stream MP4s no problem
Edit: This program is rather large and is highly dependent on the FLVPlayback component so swapping it out isn't an option right now.
I've figured it out. The URL is way different. Should have known because its the same format as the OSMF player. The URL has to be formatted like so:
rtmp://youserver.llnwd.net/xxxx/mp4:xxx/u/clients/xxxx/vov/vov_low_version2'
note the location of mp4: rather than in front of or after just the filename
I'm using the flvplayback component in an AS3 movieclip. I do have the source defined in the compontents properties to a video hosted on Amazon s3.
Now the problem is as soon as the swf loads in a browser it starts downloading/buffering the video even though it's not set to autoplay.
Is it possible to only have it start downloading if the play button is clicked (I do have a custom play button hooked up to player via AS3)? I have 3 separate video players in the swf each with fairly large videos and I don't really want to burn through a ton of bandwidth especially if the user only plays one video.
Thanks!
I haven't used the flvplaybackcomponent, but I'm assuming as soon as you specify a url, it'll start downloading. Try either not setting that until it's been interacted with, or -- do what everyone else does -- place an clickable image on top, then once that's done, create your video player.
What am I missing here because my video doesn't have any controls? Is there a special parameter I need or do I need to encode the SWF file in a special way? I just used a MPEG to SWF converter provided by Blaze Media Pro.
Wow. I was thinking this was much easier than it is. In order to get playback controls, you needs to either use some boilerplate Flash code to wrap your Flash movie or you need to script it out in ActionScript. Basially, there is no toggle or anything to just turn controls on for a SWF movie. You'll want to look into some sort of the Flash editor/IDE to build controls into a .fla file.
Try FlowPlayer.
Flowplayer is an Open Source video player for your website.
For site owners, developers, hobbyists, businesses and programmers.