ActionScript 3.0 :: Flash Preloader That's Aware Of Multiple External File Sizes?

Aug 14, 2010

I have an AS3 .fla that loads an external XML file of image names, and then iteratively loads the images into the .fla. All this works great. What I want is to create a preloader that is aware of the size of all these external images. As far as I can tell there's no way to do this, but I'm hoping someone here is smarter than I am.

I tried Lee Brimelow's method of having a separate SWF whose only job is to load another SWF in its place. This doesn't work because the preloader's call to .bytesTotal only reads the bytes of the main SWF, not of the external XML or JPGs that are dynamically loaded into it. So the result is the preloader reaches 100% when the main SWF is loaded, but that happens really quickly and the bulk of the load time comes after the 100% mark, when the main SWF starts loading in images.

The more I think about this, the more it seems that you can never access the .bytesTotal property until you've already instantiated the loader and called the .load() method. Am I wrong? Is there a way to fetch just the SIZE of an external file without actually initiating the act of loading the file into memory?

View 4 Replies


Similar Posts:


IDE :: CS4 SWF File Sizes Different On External Drive

Jan 3, 2011

I'm running Flash CS4/AS 2.0 on Mac OS X. I keep my work files on a flash drive. One of these FLA files is a parent (container) movie that, when compiled, results in a SWF that is 6,983 bytes.

I saved a copy of the FLA source file to the Desktop, recompiled, and the SWF size was only 1,773 bytes (much better, since the movie only has a static preloader and some ActionScript).

I'm guessing this is because Flash has to copy some default class information(?) to compile the movie because the source file and Flash CS4 are on different drives.

Do I need to copy the class files to the external drive and map to that path in Preferences?

View 1 Replies

ActionScript 2.0 :: Upload Multiple Files (with The Specified Max Sizes, And File Types) To A Server?

Feb 22, 2007

Does any one have a working fla. and php script to upload multiple files (with the specified max sizes, and file types) to a server? In addition, when there is an image being uploaded, it would be luxurious to have a thumbnail of the image being uploaded displayed.There is clearly not a simple issue. Scores of designers and developers encountered problems and headaches trying to upload multiple files with and image display (if an image is being uploaded). Even my web designer has a slight problem, although he tweaked some of the code to get a simple upload. Adobe needs to address this issue because it seems that sscores of designers and developers are having difficulty with uploading multitple files.

View 3 Replies

Flash :: Manage Multiple Sizes (dimensions) Of Bitmaps?

Jul 22, 2010

I have a custom Image class that I am using to store individual image information for a gallery application:

package mtm.test
{
public class Image extends Object
{

[Code]....

This is how I would implement the above:

var image:Image = new Image();
//I would be loading external bitmaps but for the example I'll just create new ones:
image[BitmapThumbnail] = new BitmapThumbnail(new BitmapData(65,65,false,0x000000));

[Code]....

Is there a simpler way to do this? I feel that there is a lot of repeated code within the BitmapType sub-classes.

At the least, this helps to avoid a bunch of for loops trying to find the requested size, and it seems portable to situations where more or less sizes of Bitmaps are required.

View 1 Replies

Actionscript 3 :: Flash External Preloader To Load A Swf Thats Loading Another File?

Jun 10, 2010

I have my preloader loading my main swf where I'm loading another swf that contains a background.

When my preloader is done it shows my main swf but it takes a while after that for the background to load.

Whats the easiest way to get my preloader to wait until the background swf is done loading?

View 1 Replies

ActionScript 3.0 :: Flash Preloader Pause After External File Loaded?

Aug 24, 2010

I have a preloader.swf that loads another swf (main.swf). It all works fine, however I would like the loading bar to stay on 100 (once it gets there) for 2-3 seconds before the main.swf opens, currently as expected from the code below, as soon as it gets to 100% it flicks straight over to the main.swf.

I am using tweener, and I could achieve this easily using the onComplete code to call this.addChild(loader);, however, the problem is, both my preloader and my main swf are liquid layouts, and if I were to call the this.addChild(loader); at the end in its own function, then it throws a

TypeError: Error #1009: Cannot access a property or method of a null object reference.

. The only way to get around this error is to put the this.addChild(loader); so that it loads upfront. After a bit of google research, i found this error occurs due to the stage properties already been set in the preloader.swf (from liquid layout)then once the main.swf loads it tries to set them again...So is there another way i can cause a delay for 2-3 seconds once my preloader hits 100?

Below is my preloader code with liquid layout settings

Code:
//LIQUID LAYOUT
stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandlerLoading);

[Code]....

1. using my tweener onComplete method and fixing the error caused by preexisting stage properties

2. Thinking of an alternate way to delay the main.swf from opening straight away (keeping in mind that this.addChild(loader); would need to stay where it is...

PS - here is a link to a person who was getting the #1009 error with preloader and liquid layout, their solution works, but won't allow me to use a tweener delay...[URL]

View 2 Replies

IDE :: Looking For A Preloader For Multiple External SWFS?

Nov 6, 2009

I was wondering if someone could help me. I've spent months looking for an AS2 preloader that does the following:

1. Preloads multiple external swf files into a single movie holder.
2. Starts automatically preloading once the parent file is launched.
3. Contains a progress bar with % downloaded.
4. Can be placed on a "Preload" scene.

Working on the file in Flash CS3, AS2. I've looked at tutorials, scanned the web, etc. And I still can't find the right one, or even how to make one.

View 4 Replies

ActionScript 3.0 :: Preloader For Multiple External Images At Once?

Apr 10, 2009

I am experimenting with AS3 and I created a page that loads around 35 images to the screen from XML and randomly scatters them on the stage. I know how to use the ProgressEvent to show the loading for each individual image, but I am trying to figure out a way to show it as a whole. The one think ive tried & acheived is to have total number of loaded images divided by total number of images. So when 15 of 30 images are loaded its 50 %, etc.... But Id like to have a more effcient preloader that shows the actually loading.

View 3 Replies

ActionScript 1/2 :: Preloader For Multiple External Images

Jun 19, 2009

I'm creating a 360 turn by importing .png files into each movie clip. I wanted the preloader bar to increase in size as each one loads. Once the preloader is completed on frame one, I have it go and stop on frame 2, but there is a blank screen for a view seconds. I think the images were still loading after the preloader was completed.

[Code]...

View 16 Replies

ActionScript 2.0 :: One Main Preloader For Multiple External SWF

May 2, 2005

I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded. I thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:

Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
[Code] .....

The clip contains a loadbar, static text (which just says 'Loading'), dynamic text (which tells the percentage), and a 'stop' in the actions layer. In the actions layer within my main movie, there is a 'stop' on the first frame as well. On the second frame, there is this AS:
Code:
var audioOn = false;
loadMovieNum("musicfile.swf", 1);
loadMovieNum("1movie.swf", 2);
stop();

In order that the animation and music starts at the same time, within my animation .swf (1movie.swf), I have this AS on the first frame of the actions layer:
Code:
if (_level0.audioOn == true) {
gotoAndPlay(2);
}

Within my musicfile.swf, there is this AS on the second frame of the mp3:
Code:
_level0.audioOn = true;
My main objective is to be able to use my preloader to preload both of these .swf's concurrently in my main movie so that they may start at the same time.

View 1 Replies

ActionScript 3.0 :: Preloader Not Working With External Multiple Swf Loading?

Aug 31, 2010

My preloader works fine only for the first time, then after it not works ? I got 3 buttons on the stage which are calling 3 external swfs. I am getting this Error ?

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:: DisplayObjectContainer/removeChild()
at Design_fla::MainTimeline/finishLoading()

[Code].....

View 1 Replies

ActionScript 2.0 :: One Main Preloader For Multiple External .swfs?

May 2, 2005

I've tried to approach this from several angles, employing several of the tutorials, attachments found in various threads, etc, and nothing has worked. So, please bear me as I ask yet another question regarding this subject.I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded.thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:

Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();

[code].....

View 1 Replies

ActionScript 3.0 :: Preloader (multiple Swf) Versus External Video On The First Frame?

Dec 16, 2009

I have a preloader and 10 swf that needs to be cache. My problem was that when the preloader started, it was not only caching the swf, but a lot of .flv and a lot of the same player skin (flvplayback component). I don't need and don't want to preload or cache those .flv. They need to be load only when someone is on the page not before (in real time, not preload).

But the problem is that the videos (flv) are on the first frame of every swf cause I need the video to start when they enter the page. So when the preloader start, it starts to preload the videos too (since they are on the first frame).Is there a solution to change the behavior of the preloader or restrict what he can load ?Is there a better way to make my video start on enter frame without putting it on the first frame ? Something that would not be preload and cache but that would start when the user enter the page ?

View 1 Replies

Flash :: Load Multiple External .swf File In 3.0 Using For Loop?

Mar 13, 2012

My file name is slider_1_1.swf. But once complete file then user next button click load in slider_1_2.swf this use in loop function.

View 1 Replies

Maintain One Application For Multiple Screen Sizes?

Apr 16, 2010

We are working on digital photo frame(DPF) project where we need to run DPF on 3 different resolutions, i.e., 800x480, 1024x600 and 1024x768. Is it possible to maintain only one .fla file for all resolutions? How can we go for it? We will be publishing it for flashlite 3 and using AS2. The application runs on a processor of 800MHz.... and total available memory is 128MB..

View 8 Replies

ActionScript 2.0 :: Including External Swf File With Preloader In Main Swf File

Apr 21, 2008

I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file

loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){

[Code]....

the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?

View 1 Replies

Actionscript 3 :: Preloader For External Swf File?

May 13, 2011

Question! Whats the best way to have a preloader for loading an external swf file.I wrote this for the actual operation of the button

function btnClick(event:MouseEvent):void
{
removeChild(loader);[code]..........

View 1 Replies

ActionScript 3.0 :: Preloader Without External File?

Jun 13, 2011

I'm working on a project that requires a swf file to have a built in preloader. In the past, puting a preloader in caused problems, because the preloader, wouldn't load until about 90% of the swf had allready loaded. Is there a way to tell flash to load a particular frame first? Or perhaps stream itself?

View 3 Replies

ActionScript 2.0 :: Youtube, External Video, Different Widget Sizes?

May 18, 2007

Suppose I am designing a widget that is 400x300 and in that I want to import a youtube video (which is an external swf). Through loadClip I am able to do this, but I face a lot of issues.Like for eg the space in which (container) I want to load the youtube movie, I am not able to confined it into that space by just giving that container a width/height.After lot of exploring, if I give it _xscale and _yscale I can somehow get it to those coordinates and dimensions but still dont understand why it just doesnt load into that space like a photo that I would import.

Now, suppose I want to increase the size of this widget to something like 500x500 - whats the best way to do this?1) Create a new widget with 500x500 dimenions? Too painful.2) Just while embedding change dimensions of 400x300 widget to 500x500?This works when I just load photos but not youtube videos. It screws my stage and just keep it like 400x300 and not 500x500

View 7 Replies

ActionScript 2.0 :: Create A Preloader (in Flash With The "percent-loaded"-thingie) For An External .html File

Aug 4, 2004

I want to create a preloader (in flash)(with the "percent-loaded"-thingie) for an external .html file that I want to load. Here's my code:

[Code].....

On the "main" frame" I've put a getURL action on a movieclip. Can this work.???? I'm still new at this and a bit confused?

View 6 Replies

ActionScript 3.0 :: Preloader Class In External .as File

Mar 27, 2010

I'm trying to wrap my head around AS3 and it isn't going well. I'm getting stuck on the most basic of problems it's making me pretty angry. I'm trying to do something as simple as reference the stage and I just can't figure it out; something that usually takes me seconds has eaten up 2 days of my time.

I have a Main.fla that outputs Main.swf; it contains no script, only library assets. I have a document class set up using Main.as, which itself has 1 trace and code to run the Preloader class, which is held in Preloader.as.

[Code]...

View 8 Replies

ActionScript 3.0 :: Preloader That Loads An External .swf File?

Sep 3, 2010

I have a preloader that loads an external .swf file. Preloader works fine, technically the external .swf loads fine, but the external .swf is scaled up so you can only see about 2/3 of the screen. I made the stage for the preloader the same size as the stage for the external swf. I used the HTML for the swf that gets loaded, and just changed the file name to that of my loader.

View 4 Replies

ActionScript 3.0 :: Preloader For External File Template?

Sep 29, 2010

I used the CS5 Flash templates>sample files>preloader for external file, to create my preloader.The problem is that when the preloader is done and my SWF is loaded, my SWF has already started playing.It is an animation that builds for 200 frames then buttons appear.By the time the SWF appears it has already gotten to the button frame.Depending on connection speed I have caught the animation building.

Here is the preloader action:
var contentLoader:Loader; loadContent("stage002.swf");   function loadContent(url:String):void {   contentLoader = new Loader();  

[code].....

View 3 Replies

ActionScript 2.0 :: External File Preloader WITH Percentage

Nov 30, 2003

Basically, I adapted the design totally, but chose to display a percentage along with the animated "loading..." thing there.

One difference is that my buttons are located in the Transition movie clip and the loadText dynamic text field(where the percentage is displayed) is also in the Transition movie clip.

Here's the code I attached to Content movie clip:

onClipEvent (enterFrame) {
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());

[Code].....

If you visit [URL] you'll see the busted result.

For a deeper look the fla is downloadable at: [URL]

View 8 Replies

ActionScript 3.0 :: Preloader Which Loads An External File

Jul 14, 2009

I am building a peloader which loads an external file. Simulate donwload has never really worked for me, it just flashes and shows my loader at 100%. Does anyone have any tips to actually get this working?I have flash cs3, publishing to FP9 and using a simple LOAD_COMPLETE, onProgress function.

View 6 Replies

ActionScript 2.0 :: External File Preloader WITH Percentage?

Nov 30, 2003

Anybody finished Claudio's preloader tutorial?? Great tutorial... preloader works fine for me. However, I tried tweaking it a bit and cant get a part to work. Maybe someone can suggest a fix. I'm pretty sure its a simple thing I'm not seeing. Basically, I adapted the design totally, but chose to display a percentage along with the animated "loading..." thing there. One difference is that my buttons are located in the Transition movie clip and the loadText dynamic text field(where the percentage is displayed) is also in the Transition movie clip.

[code]...

[url]

View 11 Replies

ActionScript 2.0 :: Show Preloader Before External Swf File Is Loaded?

Apr 21, 2011

I have been looking for a way to show a preloader before the external SWF file loaded but unfortunately I had no luck as of yet!!I have a button that loads a few external files in some empty MCs. I just want to show a small preloader before the external SWF files loaded?

View 1 Replies

Flex :: Make A Preloader With Load External File?

May 5, 2011

I am currently working with Flex 4. I successfully use custom preloader by s:application ... preloader="path"..., but i want the preloader to load external file as well, can it do that? How can i call the variables in the preloader?

View 1 Replies

Flex :: Preloader Has To Be Visible Until Other External File Loaded

Jun 13, 2011

I have a Flex application that loads some data from the database. During this I want my custom preloader stay visible. When I postpone the dispatchEvent( new Event(Event.COMPLETE)) in the FlexEvent.INIT_COMPLETE handler, the loading will never happen because the next frame is not entered. How can I keep the loader running until all the data is fully loaded?

View 1 Replies

Actionscript 3.0 :: Banner Ad File Sizes?

Mar 12, 2009

What is a reasonable file size for a Flash wide skyscraper ad? I know the IAB is a max initial load of 40k for standard ad's, but what about Flash? Either I'm losing my mind or my client is for them wanting something under 30KB. I've used AS3 for almost all animation, I even killed all animation and I still can't get it under 30KB. Is there some kind of compression secret that I'm missing?I've compressed the images before import.I've reduced quality of the images inside Flash as much as possible without killing quality

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved