Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Apparently this preloader cannot be scripted .... its impossible? or is it? :(

New Here ,
Jul 27, 2013 Jul 27, 2013

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?

TOPICS
ActionScript
733
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2013 Jul 27, 2013

From the help documentation:  "The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files. ..."

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 27, 2013 Jul 27, 2013

Can you advise then what script i can use to make this work with an F4V file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2013 Jul 27, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 27, 2013 Jul 27, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 28, 2013 Jul 28, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines