I'm trying to make a preloader for an FLV within an SWF. In other words, I've placed the video in the time line. Because, like other Flash content, it takes a minute to load, I am tying to make a preloader for it. The preloader is supposed to be an animated gif over a dynamic text box which displays percentage loaded until the movie loads. Once loaded the time line should move to frame two which contains the FLV. It's not working out that way though. I've attached the SWF for clarity. Would someone mind helping me out, please? thanks

8 Years
Discussion Span
Last Post by rajarajan2017

This is the code you should write in the first frame of main timeline and second frame automatically play when your preloader complets.


addEventListener(Event.ENTER_FRAME, loading);
function loading(evt:Event) 
	var bytestotal = stage.loaderInfo.bytesTotal;
	var bytesloaded = stage.loaderInfo.bytesLoaded;
	var percentLoaded = Math.round(bytesloaded*100/bytestotal);
	preloader.gotoAndPlay(percentLoaded); // 100 frame pre-loader
	if (percentLoaded >= 100) 
		removeEventListener(Event.ENTER_FRAME, loading);

I can't able to open your file from my office, becoz I have only flash 8. So if you are not able to succeed, tell me I will go thru your source from my home and give you the solution.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.