Flex :: AddEventListener To Loader? Or Loaded Swf?
Dec 19, 2009
I am loading an external swf file using the following code:
//add close button
var reqButton:URLRequest = new URLRequest(btn_close);
var loader2:Loader = new Loader();
[code]....
View 2 Replies
Similar Posts:
Feb 23, 2010
I've a Flex application which loads a Flash swf via SWF loader; the Flash swf is in AS3. the flash swf has code to dispatchEvent a Text Event
Flash Code:
var re:TextEvent = new TextEvent(TextEvent.TEXT_INPUT,true,true);
Flex Code:
<mx:SWFLoader source="menu.swf" id="mnu" complete="menuLoaded(event)" />
private var mySwfMve:MovieClip;
function menuLoaded(event:Event): void {
[Code]....
I don't see any TextEvents being dispatched from Flash. They are not seen in the debug trace.. I can capture enter frame events however.
View 1 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
Aug 13, 2009
How to access a loader loaded by a loader
View 4 Replies
Aug 6, 2009
I'm trying to load a local SWF then catch a few events that are fired but I can't see why this isn't working.
Here's the code
Parent.swf
_mcl = new MovieClipLoader();
_mcl.addListener(this);
_mcl.loadClip("Child.swf", rotator_mc);
[code]....
Now I was hoping that this would work, and the Parent would have "childLoaded caught 2" in the trace, but it doesn't.
View 1 Replies
Sep 23, 2010
I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?
View 4 Replies
Sep 1, 2010
I've been searching for a solution for this problem for the best part of this day Here's my scenario,I have a swf of class a class i've called sceneHolder, it loads up an xml file and uses this to determine which external swfs to load up, the swfs are loaded up and into loader's then their contentLoaderInfo.content is addChild'ed to a movieclip in sceneHolder called myScene, they are then positioned and so on.
Another item loaded from the sceneHolder library is also loaded into myScene.Then, on the press of a button I call this
[Code]...
View 2 Replies
Jun 2, 2010
I've a little problem, I don't really understand if I can use addEventListener more than one time on the same object (and same callback function) if this case can I have a problem of overflow, or simple flex is so smart to not add again in the same stack same function
[Code]...
View 2 Replies
Oct 26, 2011
I'm doing everything by the book (I think), I've reviewed this problem multiple times, but I can't seem to get it fixed. The creationCompleteHandler function is b
[code]....
View 1 Replies
Dec 19, 2011
Ok why wont this work? (flash CS5 and action script 2)Trying to do aNavigation bar button , to preloader to abour me page with a photo component.Not on the pre loader page the bar works, only it wont disappear.
siteLoader.loadMovie("AboutMe5.swf",4);
Frame_movie._alpha = 100;
loadingBar._alpha = 100;
[code]....
View 2 Replies
Dec 2, 2009
if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...
View 18 Replies
Dec 2, 2009
I have a fairly chunky swf that I am loading through the loadMovie function. Just wondering if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...
View 1 Replies
Dec 29, 2010
I am trying to do something like this:
package com.clicker{
import flash.display.*;
import flash.events.MouseEvent;
public class Stager extends MovieClip {
[code]....
When I do this:
import com.clicker.*;
var test:Stager = new Stager();
test.clicker();
addChild(test);
View 2 Replies
Sep 10, 2011
I have an actionscript class MyClass that extens NavigatorContent. I instantiate the class as a custom MXML NavigatorContnent component for an Accordion component. MyClass has a Button component that I have tried to attach an event listener to. I want the event to bubble so that I can have the handler in the Accordion component.
MyClass
package comp
{
import flash.events.Event;
[Code]....
View 2 Replies
Oct 14, 2009
I am using the Loader class to load images into a photo gallery. When a user navigates to the next image in the gallery, I need to unload the Loader using the "unload" method and then load the next image.The code for this is simply:
myLoader.unload();
myLoader.load(new URLRequest(url...));
My question is if there is someway to determine if a Loader is already loaded? That is, I don't need to unload the Loader if nothing has been loaded so I am wondering if there is some sort of conditional statement I could use to control when the unload method is used.
View 5 Replies
Jul 2, 2010
I am sending a variable from my main swf into a loaded swf using the following code with its output at the bottom.I am having trouble getting my Course_ID_NO variable out of the function "inputid" in the loaded swf.
//-------Main swf
course_begin.addEventListener( MouseEvent.CLICK,cb_btn_click ); function cb_btn_click (e:MouseEvent):void { var mc_course:MovieClip; var request:URLRequest = new
[code].......
View 7 Replies
Aug 13, 2010
Is there some way to check if what you are loading is already in memory and don't need to be loaded a second time?
View 1 Replies
Dec 21, 2011
I want to get my star to use one of the loaded sprites, I manage to find the correct urlLoader in my loader, but are unsure what I should return to give it the sprite.[code]...
View 2 Replies
Sep 29, 2011
I have a boolean variable, projectsLoaded that is set to false when my application loads. As i'm sure you can imagine, when the final project module loads, I set the variable to be true. Is there a way I can trigger a series of functions to run once that variable is set to true?
View 1 Replies
Jun 16, 2010
I have a master swf that uses Loader to load in an external swf. I need to load a back button on top of that stack as a separate Child - and I have code in that loaded Child that needs to Unload the Loader-Loaded swf, unload the Buttons, and move the main timeline to another frame.
View 2 Replies
Feb 4, 2010
I am unable to debug a swf (Test.swf) loaded with Loader (from TestLoader.swf) if Test.swf imports a class from another swf (OneLoop.swf).If I set breakpoints in Test.swf, they will not be hit when debugging TestLoader.swf.I have attached a Test.zip file which contains the necessary FLA and AS files to demonstrate the bug. To reproduce the bug.Load up Test.as, OneLoop.fla, Test.fla, and TestLoader.fla.Then put a breakpoint on line 17 of Test.as (removeEventListener)Then Publish OneLoop.fla.Then Debug Movie on Test.fla.You will see that the breakpoint stops at line 17.Then Debug Movie on TestLoader.fla.You will see that the debugger will stop at line 18 (where I throw an Error), but failed to stop at line 17.I'm using CS4 Pro 10.0.2.This problem only occurs when I import a class from the third swf.Does anyone else know how to fix the problem (without removing the imports or merging the FLAs )?
View 6 Replies
Jul 13, 2010
I am trying to make this website, which has separate files for different screen resolutions. I am using a first.swf file to load the right file, depending on the screen resolution, it goes to a different frame for diff resolutions. There I have placed a loadMovie function.The code for the loader follows the loadMovie call. loadingbar is a movieclip on screen, which presently does nothing.[code]This was displaying nothing, so I replaced the _root.loadMovie with mcholder.loadMovie("filename.swf"). This is not working either, the screen flashes for one second and then disappears. I put a stop(); before the code, and the screen remained, but the movie still did not load.I txt1.text shows 100. meaning percentage did reach hundred, but I am guessing that is for first.swf, and not for the file which is being loaded.
View 3 Replies
Jan 12, 2012
I am trying to create a simple flash that loads an image from my HardDrive. The following is my simple program:
package {
import flash.display.Sprite; import flash.events.*; import flash.display.Loader; import flash.net.URLRequest; import flash.display.Bitmap;
[code].....
View 6 Replies
Apr 15, 2010
im loading a child swf into my parent swf and I want to pass some parameters to the child swf.
Here is my code:
var req:URLRequest = new URLRequest( "test.swf" );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener( Event.COMPLETE, loadComplete );
loader.load(req);
[Code]....
View 1 Replies
Apr 29, 2010
Main movieclip onstage is : design_mc. Within it is a movieclip already in place onstage with an instance name clipart_mc.also loading a ListBox to the stage and each time a selection is made from listbox myLoader9 is used to load selected .swf intodesign_mc.clipArt_mc.Now within each of the .swf files loaded into design_mc.clipArt_mc there is a mc ike to color transform called color_mc.So now the listbox is onstage and I make a selection that places heart.swf inside of design_mc.clipArt_mc. I want to access heart.swf so I did this:
var child:DisplayObject = myLoader9.content.contentLoaderInfo.content.color_mc;
var colorTrans3:ColorTransform = new ColorTransform();
var trans3:Transform = new Transform(child);
[code].....
View 2 Replies
Jun 10, 2011
is there a way to set the loaded SWF's height and width to always use 100% of the Loader's height and width? pretty much like when you're embedding a swf to an HTML page... I know that you can do this by setting the width and height of the Loader on every stage resize, but is there another way wherein you can just specify height and width is 100% and then loaded SWF will automatically resize according to stage and Loader's current dimensions?
try loaded a SWF file which has coordinates based listeners and it seems that the loaded SWF doesn't reposition its listeners correctly even if the stage is already resized... take this swf for example [URL] i tried using an SWFLoader in flex which scales the content and also a normal AS3 flash.display.Loader and it seems that both fails to reposition the listeners correctly.
View 2 Replies
Mar 17, 2012
READY? Here it is:var TheLoader:Object = parentObj.TheExit as Object;This line gets me to the swf I loaded and I can now change the alpha, move it etc...BUT HOW HOW HOW... do I get one of its children and control get that same control?Example Code:TheLoader.TheChild.alpha = .3; // Does not work!5 days on this issue is WAY TOO LONG! Here is the 3rd post with the same issue but more detail. as3 externally loaded swf from network to control externally loaded swf from network
View 1 Replies
Jan 27, 2009
I loaded 5 JPG's into specific locations of an array via the URLRequest. So now when I trace my array:
[Code]...
THE PROBLEM: when I scan getXMLlinksArray and see that its NOT null, and i try to addChil to xmlImgHolder and then to spriteHolderArray, I just get a blank space. The debuger is showing that spriteHolderArray contains some loader info and the appropriate URL up until I load it with the existing loader from getXMLlinksArray. Then it says it doesn't have any conentedLoadedInfo.
View 1 Replies
Feb 21, 2009
I need to add the image to an object as a child.. then resize it.. I know how to add it as a child (easy rly)[code]...
View 3 Replies
Oct 21, 2009
I have a site loading a large number of thumbs and even a video at the top. Every once in a while the loader object gets stuck. I have an EVENT.COMPLETE on it and it doesn't appear to get called.
Any help? This appears to happen primarily on the first time loading. I am using Safari on Mac for the browser as well, if this makes a difference
View 1 Replies