Hi, I have a problem concerning a simple preloader I created.
The first fla file contains a preloader on startup. This file is supposed to load another swf file using the Loader class. The second swf (loaded swf) file contains data that streams an flv file located on my server. This all works when I test it locally on my computer. However when I test it on IE from the server, the video that is streaming begins, then cuts out and restarts, as if it has finally finished loading. My code which has been pawned off from other websites, contains the following:
[COLOR=#00bfff]var myLoader:Loader = new Loader();[/COLOR]
[COLOR=#00bfff]var myPreloader: Preloader = new Preloader();[/COLOR]
[COLOR=#00bfff]myLoader.load( new URLRequest( “video/playback.swf” ));[/COLOR]
[COLOR=#00bfff]myLoader.contentLoaderInfo.addEventListener( Event.OPEN, showPreloader);[/COLOR]
[COLOR=#00bfff]myLoader.contentLoaderInfo.addEventListener( ProgressEvent.PROGRESS, showProgress );[/COLOR]
[COLOR=#00bfff]myLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, showContent ); [/COLOR]
[COLOR=#00bfff]addChild( myLoader );[/COLOR]
[COLOR=#00bfff]function showPreloader( e:Event ):void[/COLOR]
[COLOR=#00bfff]{[/COLOR]
[COLOR=#00bfff]addChild( myPreloader );[/COLOR]
[COLOR=#00bfff]myPreloader.x = 226;[/COLOR]
[COLOR=#00bfff]myPreloader.y = 149;[/COLOR]
[COLOR=#00bfff]}[/COLOR]
[COLOR=#00bfff]function showProgress( e: ProgressEvent ):void[/COLOR]
[COLOR=#00bfff]{[/COLOR]
[COLOR=#00bfff]var percent:Number = Math.floor( e.bytesLoaded * 100 / e.bytesTotal );[/COLOR]
[COLOR=#00bfff]myPreloader.myLoadText.text = percent + “%”;[/COLOR]
[COLOR=#00bfff]myPreloader.myLoadBar.width = 2 * percent;[/COLOR]
[COLOR=#00bfff]}[/COLOR]
[COLOR=#00bfff]function showContent( e:Event ):void {[/COLOR]
[COLOR=#00bfff]removeChild( myPreloader );[/COLOR]
[COLOR=#00bfff]myLoader.x = 0;[/COLOR]
[COLOR=#00bfff]myLoader.y = 0;[/COLOR]
[COLOR=#00bfff]}[/COLOR]
The following link will hopefully clarify some things:
[COLOR=#ff0000]http://www.loosecananz.com/testing.html[/COLOR]