ActionScript 3.0 :: Event.COMPLETE Not Firing On PNG?
Dec 5, 2009
I'm sure some users on this forum will be aware that AddThis are dropping the Clearspring Launchpad, so I'm writing a new API to get ready for the changeover. Part of that is a base UI that will create buttons for social network sharing destinations. At the moment, AddThis contain all the icons in a single long strip that is 16x3520 pixels in size [URL]...
What I'm trying to do is load this into a utility class, but the Event.COMPLETE event never fires, and if the Loader class that loads it is added to the stage, the bitmap is never shown. I thought it was maybe a dimensions issue, but what is curious is that if I place the PNG on a Flash stage and export as a SWF, it loads no problem. If I dump it out as a JPEG, no problem. Its ONLY when the file is a PNG that there are problems trying to load it. I even tried dropping it out as a 24-bit PNG (the original is 8) but that had no effect.
View 2 Replies
Similar Posts:
Sep 21, 2009
Can anyone see why my event.Complete isn't firing
[Code]...
View 4 Replies
Oct 13, 2009
I'm dynamically creating instances of a loader in a loop, adding a complete listener to it, and loading it. For some reason the complete function is not called. Is this syntax wrong?
[Code]...
View 2 Replies
Feb 2, 2009
This was working just fine, then flash crashed last night, and now the first event listener keeps firing over and over, endlessly... Even if I remove the listener right there in the function being called...
Edit: Argh, somehow, I must have added a second frame to the timeline (which I have hidden because I'm not using it) so flash was looping the 2 frames over and over...
Code:
var xmlLoader:URLLoader = new URLLoader()
xmlLoader.addEventListener(Event.COMPLETE, LoadXML_complete)
xmlLoader.load(new URLRequest("filename.xml"))
[code]....
View 1 Replies
Mar 25, 2010
enter code hereBeen really frustrating just trying to load a swf from a swfloader in Flex and then accessing it's content. I'm sure once I figure out how to do it once then it'll be fine, but I've gone thorugh a bunch of tutorials and somethings not right. Here's my flex code:and the as code:
public function initHeaderSwf():void
{
trace("INITIATIED");[code]........
Here's the problem: The swf loads, there is no problem there.i see it in my compiled swf. but the complete event doesn't fire. CreationComplete will fire, and then I try, after that, to make a event listener for loading the actual swf, that doesn't fire.I've tried it a variety of different ways with no luck.All I am trying to do is change a text field in the loaded swf.I imagine this might be a problem with the sequence of things loading or something like that, but not sure.
View 1 Replies
Jan 24, 2007
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.
Code:
public class Thumbnail extends Sprite
{
/******************************************************************************************
* VARIABLES
[Code].....
View 9 Replies
Aug 1, 2010
I write directly on the time line on the scene and, well... the code looks fine to me, but my list of slideshows (which is what the xml contains) keeps on repeating itselfe... here is the code:
var uloader:URLLoader = new URLLoader();
//var slide:Slideshow = new Slideshow();
uloader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
[code]....
View 1 Replies
May 10, 2010
I'm using this.loaderInfo.addEventListener(Event.COMPLETE to call a function when the flashVars are available as many tutorials/examples suggest. Is it correct to use it in the root of the main swf? The event is often not firing in firefox.
Here's the test code. Am I doing something wrong?
Code:
import flash.display.Loader;
import flash.events.Event;
var flashVars=new Object();
[code]....
View 2 Replies
Mar 19, 2011
I�m getting Error #2032 when my URLLoader complete event finishes firing. What I can�t figure out is why. The complete event fires successful (I ran a number of trace statements to make sure it made it all the way to the end of the method with no error) and I�m not getting any helpful output when I trap the IOError. Here is the error message:
[IOErrorEvent type=�ioError� bubbles=false cancelable=false eventPhase=2 text=�Error #2032: Stream Error. URL: file:////Volumes/Macintosh HD/Users/shanemcgarry/Documents/School/DGM 6122/Final Project/�]
here is my code:
Code:
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.utils.getDefinitionByName;
[code]....
View 0 Replies
Jan 18, 2011
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
[Code]....
View 2 Replies
Nov 13, 2009
I am working with Flash CS 4 with AS 3.0. I use the following code to hook into Loading complete for mystage:this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);The code works properly in IE 8.0 (Windows 7) and Chrome. I have Flash Player 10 installed and the movie is targeted for Flash Player 9. The movies are showing a random behavior on FireFox 3.5.3.The website is under construction. The top bar contains 7 small & 1 big flash movie. View the page first in IE or Chrome. Then see it in FF. The labels from the flashvars are not being picked up properly. The load Complete function is not working properly.
View 5 Replies
Mar 30, 2012
I have a bit of a quandary. I need to call a function inside a MovieClip once a particular sound has finished playing. The sound is played via a sound channel in an external class which I have imported. Playback is working perfectly.Here is the relevent code from my external class, Sonus.
public var SFXPRChannel:SoundChannel = new SoundChannel;
var SFXPRfishbeg:Sound = new sfxpr_fishbeg();
var SFXPRfishmid:Sound = new sfxpr_fishmid();[code]....
osr.Sonus.PlayPrompt(...) and gui.Wait(...)
both work perfectly, as I use them in other contexts in this part of the project without error.Basically, after the sound finishes playing, I need Wait(false); to be called, but the event listener does not appear to be "hearing" the SOUND_COMPLETE event. Did I make a mistake somewhere? For the record, due to my project structure, I cannot call the appropriate Wait(...) function from within Sonus.
View 1 Replies
May 5, 2008
I've got a problem with the FLVPlayback Component: I'm using it to load multiple .flvs simultaneously.There are 3 Listeners listening:
vidListener.playheadUpdate,
vidListener.ready,
vidListener.complete
Now on some computers sometimes (But frequently enough, ) the complete event just does not fire. I really can't find a pattern or anything here. Sometimes it works, sometimes it doesn't.The videos were encoded using the Flash Video Encoder...
View 2 Replies
Jun 14, 2011
I made a test where I download a file using URLLoader - something like this:
[Code]....
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?
View 2 Replies
Feb 17, 2011
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?
View 0 Replies
Feb 3, 2010
i am using progress event to load video file from url, but it is not showing me preloader, code:-
ActionScript Code:
var urlRequest:URLRequest;
var urlLoader:URLLoader;
urlRequest = new URLRequest("video.flv");
[Code].....
View 2 Replies
Jan 19, 2010
I have some code where an event handler listening to Event.ID3 fires twice for an MP3 file. From searching the web, I found a few others asking a similar question, but I haven't seen any response.
Does anybody know what would cause the ID3 Event to fire twice for a single file? My only guess is that the MP3 file contains two versions of ID3 format.
The code looks like this:
Code:
var mySound:Sound;
function setup()
{
[Code]...
View 2 Replies
Apr 14, 2010
I have made my application in CS4 using as3.0. In my application there is one browse btn that upload image/picture on my application. It upload the image on Event.Complete event. This thing work in window's OS perfectly but in Mac it open a window on the click of browse but wont upload the image in my application.
View 1 Replies
Jul 13, 2010
I have a little flash app that I have running constantly on my server (I made it an exe). It runs great for a few days, but then eventually it just stops.
Code:
trace("test1");
var myTimer:Timer = new Timer(5000, 1);
myTimer.addEventListener(TimerEvent.TIMER, getData,false,0,true);
[Code].....
The code above should call the function getData once after 5 seconds have passed. This works 99.99% of the time, but for some reason (usually after a few days of it running) it doesn't call the getData function.
I have verified this through trace statements. When it eventually fails, it traces out test1, test2..... then nothing else. No test3.
I'm assuming I need to add an event listener for the timer object to check if it fails for whatever reason. How do I do this?
View 4 Replies
Jun 14, 2010
In my Flash project I have a movieclip that has 2 keyframes. Both frames contain 1 movieclip each.
frame 1 - Landing
frame 2 - Game
The flow of the application is simple:
User arrives on landing page (frame 1) User clicks "start game" button User is brought to the game page (frame 2) When the game is over, the user can press a "play again" button which brings them back to step 1
Both Landing and Game movieclips are linked to separate classes that define event listeners. The problem is that when I end up back at step 1 after playing the game, the Game event listeners fire twice for their respective event. And if I go through the process a third time, the event listeners fire three times for every event. This keeps happening, so if I loop through the application flow 7 times, the event listeners fire seven times. I don't understand why this is happening because on frame 1, the Game movieclip (and I would assume its related class instance) does not exist - but I'm clearly missing something here.
I've run into this problem in other projects too, and tried fixing it by first checking if the event listeners existed and only defining them if they didn't, but I ended up with unexpected results that didn't really solve the problem.
View 2 Replies
May 21, 2011
I have a simple ComboBox onstage, with 5 options in it. Each one has a textual label, and is assigned a numeral "data" in the Component Inspector (1,2,3,4,5). I'm trying to get the playhead to move to a specific frame, according to which option is selected, and can't make it work. The trace turns out fine, but the playhead stays in place. (The ComboBox is called my_cb).
PHP Code:
var cbListener:Object = new Object();
cbListener.change = function(evt_obj:Object) {
trace("Value changed to: "+evt_obj.target.selectedItem.label);};
my_cb.addEventListener("change", cbListener.change);
cbListener.change = function(evt_obj:Object) {
var itemName:Number = new Number();
itemName = evt_obj.target.selectedItem.data;
if(itemName == 1) { gotoAndStop(10);}
View 2 Replies
Apr 21, 2010
I have this code below which produces no errors
import Card;
import fl.transitions.Tween;import fl.transitions.easing.*;import fl.transitions.TweenEvent;
var ace_clubs1:Ace_clubs = new Ace_clubs();ace_clubs1.scaleX=0.4;ace_clubs1.scaleY=0.4;[code]......
The only thing is the TRACE output for the MOTION_START EVENT does not fire.
View 8 Replies
May 5, 2010
If I have a movie clip that resides and plays in one frame, and I want an second (visible=false) movie clip to play on the same single frame as soon as the first is finished... what kind of event to I use? Do I have a frame action inside and at the end of the first movie clip that throws out some kind of event to tell the second to play?Basically, I have a menu (first movie clip) that alpha tweens up, then the buttons (second movie clip) to appear when the first is 100% alpha.
View 8 Replies
Oct 2, 2011
soundchannel.addEventListener(Event.SOUND_COMPLETE , onSoundComplete);
function onSoundComplete(e:Event):void{
nextFrame();
[code].....
View 3 Replies
May 15, 2011
event listeners not firing in this code can anybody guide me what is problem with this code.[code]
View 2 Replies
Jun 17, 2011
In our app, I am periodically noticing that a particular event handler is not firing. 99% of the time, it works fine, but, every so often, it just dies. How can I find out whats happening? Is the DispatchEvent() not happening/working somehow? Is my listener still listening? Did something else catch the event, and not pass it along so that the 'right' listener can get to it ?
Here's a little bit of the code...
Thats a somewhat pruned down version of what the real code is, but I don't think I trimmed out anything important. The key, as I see it is that we fire up the params dialog, then start to listen for the closed event. Then, we show the param dialogs close function. What happens when it fails is that the trace message "caught close event.." is never generated, and, consequently, the closeHandler is not getting called at all.
View 1 Replies
Aug 25, 2011
I'm currently trying to achieve 2 way binding of an ArrayCollection object. However, the COLLECTION_CHANGE event is not firing.
App.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
[code]....
I'm trying to achieve 2-way binding with the Booths variable.the COLLECTION_CHANGE event never fires even when I add 2 new items in the Booths variable in the App.mxml
View 3 Replies
Nov 10, 2011
I would like to programatically fire an event on a spark checkbox. I have a tab bar which has tabs enabled according to various checkboxes. I am loading data into these tabs. Sometimes tabs 1 and 2 will be enabled. Other times tabs 2 and 3. Other times tab 4 by itself (and all the other combinations). I have tried to enable the VBox (in action script) which is in my view stack but it seems to freeze the application. The VBox enables correctly upon user input on the check box. If I set the checkbox to be selected it does not fire the event and so does not enable the tab.
Is it possible to manually fire an event in Flex. I have tried to see if I can take the checkbox and get the event and fire it. Unfortunately I can only see addEventListener, hasEventLister and removeEventListener. There is no way of getting the events that are already on the checkbox
View 1 Replies
Aug 23, 2009
I've had this glitch for a long time, and I've tried several ways to get rid of it, and now that I just recoded everything to see if it was something I did, it's back again! basically, whenever I press space (regardless of whether or not I am listening for a space press [or any key press]), the last function fired by an event listener will run itself again, with the exact same arguments supplied to it in the first time.
For example, if I make a simple button to trace("text"); and take you to another frame. Once you get to that frame you can press Space and it'll trace "text" again! I really have no idea what's causing this, and it doesn't seem to be happening to me in new files. and there's too much code to show you, but I just want to know if anyone has heard of this before or if they have any theories to what's going on.
View 7 Replies
Oct 18, 2009
I'm having trouble getting a custom event to fire properly.I have a main class which creates a dynamic textbox (using a custom textfield class (see below)).Another class called book (and extends sprite) , has a method called updateBox() which I want at runtime to update the textbox with some data sent by my custom event which the book class dispatches.The problem is that when the event is dispatched (and I see in the debugger that it does reach the dispatch line) the listener never fires...i.e., the updateText function is never reached, and hence the text box is created and assigned the INIT value but is never updated again..
Here is a scaled down version of my code:
Main Class:
ActionScript Code:
package {
import flash.display.Sprite;
[code]....
View 1 Replies