Copy link to clipboard
Copied
i cannot get this preloader to work at all i have tried many types and forms but yet still it will not work. I have reverted back to the built in flash template sampler file , preloader for external file. What i want to do is use a preloader for a movie which is an F4V file placed on my server. I specifically want it to be an F4V file so the movie is of high quality which is important, and i know flash recognises this file. I am using the very latest version of flash CC.
Here is the standard code( and i replace the load content URL with the HTTP address of my F4V file) the preloader runs as normal and the progress bar works so it is finding my movie, however when the progress bar finishes it stops and stays static of the bar filled up 100% and it will not load or display my F4V file at all and gives an output error of unknown file type.
var contentLoader:Loader;
loadContent("http://www. my URL address");
function loadContent(url:String):void {
contentLoader = new Loader();
contentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
contentLoader.load(new URLRequest(url));
}
function contentLoaded(evt:Event):void {
//Optionally change to a clip holder and set progressbar visibility.
addChild(contentLoader);
}
function loading(evt:ProgressEvent):void {
var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
setBarProgress(loaded);
}
function setBarProgress(value:Number) {
progressbar.bar.scaleX = value;
}
Please can somebody help me?
Copy link to clipboard
Copied
From the help documentation: "The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files. ..."
Copy link to clipboard
Copied
Can you advise then what script i can use to make this work with an F4V file?
Copy link to clipboard
Copied
If you search Google using terms like "AS3 preload F4V" you should find some potentially useful information. Here is a link that falls out of following one result of that search:
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000421.html
Copy link to clipboard
Copied
thanks but the link you give is as2 and does not work. i have tried to search google but there doesnt seem a way to do this . If anyone can help me with this i am willing to pay you for a working script as i am all out of ideas thinking its impossible.
Copy link to clipboard
Copied
In order to play video you need to make NetConnection, NetStream and Video work together.
Here is documentation for NetStream. Scroll all the way down for an example of establishing video playback:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html
Find more inspiration, events, and resources on the new Adobe Community
Explore Now