Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Best Practices

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-30-2007, 04:34 AM   #1
h4x0r404
Registered User
 
Join Date: Apr 2007
Posts: 131
Arrow swf preloading method efficiency

Say I'm loading a swf in an empty movie clip. When using a preloader, it actually loads the elements on the first frame of the swf. Am I right? Are there any methods of loading multiple frames at once?
And, if I already have an instance of a movie clip on the stage on frame 1 (so it's preloaded) and the second frame contains the same movie clip, does it need to load again or it's been already loaded?

Thanks.
h4x0r404 is offline   Reply With Quote
Old 02-24-2008, 08:39 PM   #2
acolyte
>> RRRRAWR !! <<
 
acolyte's Avatar
 
Join Date: Feb 2005
Posts: 489
Default

Hi h4x0r404,

to ensure that everything is loaded in your external .swf you can use a scene preloader
emagine preparing your external swf with a preload scene and a content scene on the content scene you place a variable loadStatus = true
where in the preload scene you do something like :

ActionScript Code:
total_bytes = this.getBytesTotal(); loaded_bytes = this.getBytesLoaded(); remaining_bytes = total_bytes-loaded_bytes; percent_done = int((loaded_bytes/total_bytes)*100); bar.gotoAndStop(percent_done); ifFrameLoaded ("content",1) {     gotoAndStop("content",1); } _root.loadStatus = false;

you can also use MovieClipLoader for this , i dont know what codestandart you are trying to use


hope this helps
__________________
>>I know my english sucks, ... but I speak german.
(this Signature was stolen from some french guy)
BTW i am no religiouse Buddy i just played to much Warcraft

Last edited by acolyte; 02-24-2008 at 08:51 PM..
acolyte is offline   Reply With Quote
Old 02-27-2008, 05:05 PM   #3
rpoy
Member
 
Join Date: Nov 2007
Location: Minnesota, USA
Posts: 91
Default advantages / disadvantages

Hi!

I have been using this basic method for a preloader:
ActionScript Code:
total_bytes = this.getBytesTotal(); loaded_bytes = this.getBytesLoaded(); remaining_bytes = total_bytes-loaded_bytes; percent_done = int((loaded_bytes/total_bytes)*100); bar.gotoAndStop(percent_done); ifFrameLoaded ("content",1) {     gotoAndStop("content",1); } _root.loadStatus = false;

Which works well I think, but from what I understand the newer way is using the MovieClipLoader.

I read somewhere on this site that there may be issues with the MovieClipLoader. So I was just wondering what you guys thought the advantages / disadvantages are for each method. It seems like the MovieClipLoader, in theory at least, is better and offers more flexibility.

I thought these articles were really good...
http://www.sitepoint.com/article/structure-flash-site
http://www.sitepoint.com/article/steps-faster-flash
__________________
Thanks!

Padora.com ROCKS!!
rpoy is offline   Reply With Quote
Old 02-27-2008, 05:07 PM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,075
Default

Ask Xxneon about it!
atomic is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FLVPlayback - any type of preloading method??! moondust_82 Components 3 08-14-2009 10:09 AM
Preloading external swf pero ActionScript 2.0 1 11-11-2007 09:44 PM
control swf from a swf loaded inside that swf dftho1 Simple Stuff (Newbies) 1 07-26-2007 02:05 PM
AS3 loads AS2 swf. AS2 swf not displayed darbar ActionScript 3.0 0 07-20-2007 10:12 PM
Detecting if an externally loaded swf has finished playing veg1 ActionScript 2.0 1 02-04-2007 06:55 AM


All times are GMT. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.