Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


ActionScript 3.0 :: Loader Event.COMPLETE Never Fired?

I'm loading in a jpeg and sometimes the Event.COMPLETE is never fired. I have a ProgressEvent that traces out the bytesTotal and bytesLoaded... and it goes all the way up until the bytesTotal equals bytesLoaded... but randomly, the Event.COMPLETE is never fired!

View 3 Replies (Posted: 02-02-2010, 09:04 PM)

Sponsored Links:

Related Forum Messages For Flash category:
ActionScript 3.0 :: Event.COMPLETE Listener Not Getting Fired?
ok this seems to look like it should work.. but for some reason the Event.COMPLETE listener for the loader is not getting fired..

does anyone see something that I missed..

i put in trace statements in to see where its not getting to..

I verified this so far..

- the constructor function does appear to add the even listener to the loader.

- Unit3DPreview.load() function gets called (from the parent class) and receives the _path string properly..

- the loader does have an Event.COMPLETE listener at the time of the loader.load() call..

- the renderAnimation listener function never gets fired off.. even though the listener has been added..

there is no IO error.. the image is in the correct location.. I know this because if I remove it .. I get an IO error..

one thing is that there is an instance of this class already placed inside a library symbol that is associated to another class that passes a bunch of data .. the preview image path being one part of it.

not sure if having it be already existing vs me creating it via code would make a difference .. that is something I have not tried yet.


Posted: 09-15-2010, 04:02 PM

View 1 Replies!   View Related
Flash :: Get Associated URLRequest From Event.COMPLETE Fired By URLLoader
So let's say we want to load some XML -

var xmlURL:String = 'content.xml';
var xmlURLRequest:URLRequest = new URLRequest(xmlURL);
var xmlURLLoader:URLLoader = new URLLoader(xmlURLRequest);


I hate that you can't just say or whatever - is there a good way to associate URLLoaders with the URL they loaded data from?

Posted: Feb 25 10 at 23:02

View 3 Replies!   View Related
Flash :: Loader Fails Without A Complete Event?
I'm trying to get a loader working in a flex web application, but it isn't responding to the complete event. Is there a change I should make to the code here, or some way that I can handle an error event to get more information?

var loader:Loader = new Loader();
loader.cacheAsBitmap = true;
var request:URLRequest = new URLRequest("logo.png");


Posted: Mar 8 11 at 18:38

View 1 Replies!   View Related
ActionScript 3.0 :: URL Loader Complete Event Not Working?
I have a really simple class that loads in some XML and splits it into an array, but for some reason the URLLoader wont trigger the COMPLETE event.

package com.georgecrabtree {


Posted: January 26th, 2009

View 6 Replies!   View Related
ActionScript 3.0 :: Loader Not Throwing An Event.COMPLETE When Loaded?
I've got a loader that I put an event listener on for Event.COMPLETE. I then add it as child of the stage and call the load method. The swf it's loading appears on the stage, but the Event.COMPLETE listener is never called. I can attach a MouseEvent.CLICK event to the loader and that works just fine.


Posted: Jun 5, 2009 10:55 AM

View 3 Replies!   View Related
ActionScript 3.0 :: Event.COMPLETE For Loader/ContentLoaderInfo Object?
I've one loader which load a png file. I used contentLoaderInfo to intercept COMPLETE event like this:

loader.contentLoaderInfo.addEventListener(Event.Complete, handler); The problem is that at the complete event I want to push this object into an array, like this:

function handler(e:event){
var array:Array = new Array();
} is the reference to the contentInfoloader, while I need the reference to the loader itself. How can i resolve this issue?

Posted: Nov 10, 2009 11:37 AM

View 3 Replies!   View Related
Professional :: Var Loader - Event Complete Not Working Properly
I have confirmed to my satisfaction that the following code never triggers the Event.COMPLETE of var loader:

var loader:URLLoader = new URLLoader();
var req:URLRequest = new URLRequest(contact_url);
var variables:URLVariables = new URLVariables();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
req.method = URLRequestMethod.POST;
[Code] .....

However, it does in fact send the emails it is designed to send! Why doesn't it complete when in fact the work is done?

Posted: Mar 6, 2011 7:07 AM

View 3 Replies!   View Related
Flex :: Loader Event Complete Function Only Being Called Once
So, I'm trying to load resources, add them to a dictionary, and have a drawing method search through that dictionary and draw based on certain predicates. I have a function that iterates through an Vector of Strings, calling on an instance of Loader to load them instantiated as a URLRequest.

private function loadImages(urls:Vector.<String>):void
var loader:Loader = new Loader();


So the issue is: Only the first images in my Vector are drawing. Upon further inspection, I found that the completeHandler was only being called once (I put a trace in the complete handler to check). However, the Loader is invoking load everytime the loop iterates. I tried instantiating separate loaders for each resource, just to see if it would work, but I had no luck with that. Do I need to make separate loaders and event handlers? Or am I just not using Loader correctly?

Posted: Feb 21 11 at 20:00

View 1 Replies!   View Related
ActionScript 3.0 :: Loader Class Not Firing Complete Event?
I've got a custom Thumbnail class that reads in an image path, a label, and an index. The class simply loads the image and and onComplete it pulls the bitmap out of loader.content, assigns it to a public variable and then dispatches an event saying its completed.

I use these thumbnails in a thumbnail gallery and I don't build the gallery in until all thumbnails are loaded and ready. The problem is the COMPLETE event doesn't always fire for every thumbnail, therefore not allowing the gallery to build.

I used a ProgressEvent.PROGRESS to make sure the files were being loaded, and found that when the loads failed the loader still loaded the totalBytes.

I've also tried Event.INIT and its the same issue.

INIT and COMPLETE just don't seem to be either caught or dispatched.

public class Thumbnail extends Sprite


Posted: 01-24-2007, 02:29 PM

View 9 Replies!   View Related
ActionScript 3.0 :: Loader Never Fires Complete Or Error Event
I have a Loader class which I'm using to load an image:

var request:URLRequest = new URLRequest('https://some website path to .png');
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, error);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);


The code above works when I run it from FlashDevelop but fails when it runs from a website. The domain is protected by a crossdomain file which allows the website I'm calling it from. I've tried other https requests to the same domain using URLLoader and those work fine. This code never calls Event.COMPLETE or IO_ERROR and no alert error comes up.

Posted: 09-13-2010, 07:36 PM

View 4 Replies!   View Related
ActionScript 3.0 :: Loader Content Null After Event.COMPLETE Fires?
I have an array of loaders loading .jpgs. After the Event.COMPLETE fires, I trace the content at the current page and it tells me the content is null, BUT on testing the images appear just fine. Here's my code:

for (var i:uint = 0; i<pages.length; i++){
pages[i].contentLoaderInfo.addEventListener( Event.COMPLETE, loadImg, false, 0, true );


Posted: May 7th, 2008

View 1 Replies!   View Related
ActionScript 3.0 :: Assign Value To Loader And Retrieve From Event.COMPLETE Function?
i'm loading in multiple images using the same loader using a for loop. what i'm trying to figure out is how can i tell when the first 4 images are loaded. is there away to attach and index to each loader and then get it from the event in the on complete function? below is the code i'm using:


Posted: August 19th, 2009

View 1 Replies!   View Related
ActionScript 3.0 :: Return A MovieClip But Only After A Loader Has Triggered Its COMPLETE Event?
I want it to return a MovieClip but only after a Loader has triggered its COMPLETE Event.

like so;

static public function loadBitmap(URL:String):MovieClip {
// create MC
// create Loader


but it isn't fool proof because the MC is returned before the Loader finishes loading.

Posted: March 12th, 2010

View 2 Replies!   View Related
ActionScript 3.0 :: Google Chrome Suppresses Loader Complete Event When JavaScript Disabled?
I was having an issue with a Flash AS3 SWF Preloader stalling in Google Chrome only, Mac or PC, when JavaScript is disabled. It's fine with JavaScript. I diagnosed that the contentLoaderInfo Event.COMPLETE was not being fired. The successful workaround was to use the ProgressEvent.PROGRESS to check when the bytesLoaded >= bytesTotal. This worked OK in a relatively simple Flash application, however I also have an MP3 player, using a loaded XML file, MP3s, a thumbnail and other images. I am reluctant to plunge into the same workaround without first asking the question - when the bytesLoaded >= bytesTotal IS THIS THE SAME AS Event.COMPLETE? Or could I be faced with an error when trying to access either the or (depending on using loader or URLLoader class as required) to get the object in question?

Posted: Jun 25, 2011 12:48 PM

View 1 Replies!   View Related
Flex :: Loader Object Not Firing Complete Event After An External Css / Swf File Got Loaded
I am a bit stuck here for the past few days. I have a SWF running in Security.LOCAL_TRUSTED sandbox. I can load my JPEGs and simple SWFs without any problems


Posted: Jan 18 11 at 17:30

View 2 Replies!   View Related
ActionScript 3.0 :: Flash - Listen To The Loader Event - Loop Proceeds Only After The Load Of Image Is Complete?

As you see from the code above I have a loop that loads images on each pass using the same loader. This works, however, it is looping too quick (I believe) and as such the "addBook" function that handles pushing these into an array is pushing them into the array in the wrong order. Two questions: (1) Am I approaching this incorrectly? (2) If not, is there a way to listen to the loader event so the loop proceeds only after the load of that image is complete?

Posted: October 5th, 2010

View 2 Replies!   View Related
Media Server :: NetStream.Play.Stop And Complete Fired Early On RTMPE Streams
I am experiencing an issue with playback on RTMPE streams. after investigation it seems that the FMS server is firing the NetStream.Play.Complete message at random points, indicating that a stream has ended. This is happening and random points during the stream, not even close to the end.[code]As you can see roughly 17mins into playback...although the stream is 1 hour 24mins long.I have tested this numerous times, and each time it is at a different point in the stream.Intermittently the NetStream.Play.InsufficientBW warning is being fired prior to NetStream.Play.Stop.I am using a player built on OSMF 1.5

Posted: Oct 20, 2011 11:08 AM

View 1 Replies!   View Related
ActionScript 3.0 :: URLLoader Fires Event.COMPLETE Although Not Complete
I made a test where I download a file using URLLoader - something like this:


in the middle of the downloading process I physically disconnect the internet connection. the download stalls - but after aproximately 30 seconds downloadSuccessful is invoked, although only half of the data was downloaded. how can I make sure that the data to be downloaded is complete and correct?

Posted: Jun 14, 2011 9:54 AM

View 2 Replies!   View Related
ActionScript 3.0 :: Complete Event Triggered But Loading Can't Complete
I am loading in binary files with the url class which can be quite large 10mb + and it works fine on my server but another server I am testing on it can sometimes not work. Sometimes it will not load the file and other times it will only load about 20% and it throw a complete event??? Then of course other times it works fine. This server is https maybe that has something to do this it?

Posted: 02-17-2011, 01:44 AM

View 0 Replies!   View Related
Flex - Get Event Type That Is Fired?
I am working on Flex project these days and having java background. In my current task, same pop up is opened when two different types of custom events are being fired and I have to hide a button for one event type. So, how i can get event type.

Posted: Dec 2 11 at 6:55

View 2 Replies!   View Related
ActionScript 3.0 :: Event.AddedToStage Being Fired Twice?
I've just been working on a splash page/main menu for my game, and when tracing a value in the function fired when added to stage, I noticed it was tracing twice.After a process of elimination I found it was caused by some text inside a movieclip in the library.

This is literally my first time using MovieClips in AS3, as I generally just render everything manually, but I used one to knock up some quick text.When converting the text to vector graphics, the problem disappeared. Still the same MC being created and added, yet no problem. It was caused by the text.Doing away with MC's completely, embedding the required font and just using manual TextFields is my solution.Tested on 2 different FP10 builds by the way, same behaviour on both.

Posted: March 19th, 2011

View 2 Replies!   View Related
Flex - Label DataChange Event Not Getting Fired?
<mx:Label id="myLabel" dataChange="{trace('changed!!');}" />

I change the text in the above label:

myLabel.text = "new text";

But nothing is traced as it's supposed to.

Am I using a wrong event? I thought dataChange is fired when text in the label is changed.

Posted: Feb 23 10 at 19:58

View 1 Replies!   View Related
Flex :: Not Receiving An Event Fired From An .AS Class
I have 2 files, 1 to dispatch the event and 1 to receive it (of course in addition to the event class itself).

I've done this before with both dispatching and receiving files being mxml, but this time the dispatching file is an actionscript class, and it's not working this time. Is it different for actionscript classes?

Here's a dumbed down version

The dispatching class dispatches the event as soon as it's created.

public class ASClass extends UIComponent{
public function ASClass(){
dispatchEvent(new MyEvents(MyEvents.FIRE_EVENT));

in my main mxml app, I instantiate the ASClass which automatically dispatch the event as soon as it's created and the main mxml app should receive back.

protected function appCComplete(event:FlexEvent):void{
addEventListener(MyEvents.FIRE_EVENT, gotEvent);
var asClass:ASClass = new ASClass();


Posted: Jul 16 10 at 3:44

View 1 Replies!   View Related
Flex :: What Event Is Fired When All SkinSparts Are Available In A SkinnableComponent
I'm (slowly) learning Flex 4 and working on skinning a custom component that extends SkinnableComponent. The component is all in ActionScript and essentially looks like this:


The issue I'm having is on NULL REFERENCES in the Constructor for the various SkinParts, because they're not created yet. I'm trying to find out when is the best time to access them to assign their .text values. I know I can override partAdded() and add the .text value as each part is added, but I'd rather just listen for some magic event that is dispatched when they're all available.I'm not sure whether or not it matters, but the accountName, accountNumber variables are assigned by using a repeater with a dataProvider on the host component. I'm not sure if that too has something to do with when the data is available to the AccountSummary component - which may also needed to be waited on. I was able to successfully use FlexEvent.CREATION_COMPLETE to assign all my .text values to the SkinParts, but is that the right event/best practice?

Posted: Feb 12 11 at 3:18

View 1 Replies!   View Related
Copyright 2005-08, All rights reserved