How to unload externally loaded swf which contains 3D Carousel?

Hello to all
I am learning AS3 and have been taking on various tutorials found on the net. While learning about AS3 I came across a lesson on http://tutorials.flashmymind.com/2009/05/vertical-3d-carousel-with-actionscript-3-and-xml/ titled "Vertical 3D Carousel with AS3 and XML".
I completed the tutorial and all worked fine so I then wanted to load the swf into a existing project. The loading of the swf goes fine and when I unload my loader it is removed but only visually as in my output panel in flash CS5 I get an error as follows
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at carousel_c_fla::MainTimeline/moveCarousel()
this error repeats over and over again slowing my swf movie.
So does this mean my main flash movie trying to still play / find my unloaded 3D Carousel?
If so how do I unload remove all the AS3 that is trying to run from the 3D Carousel?
I have included the AS3 below from the tutorial page and I understand that this is what I have to remove to "break free" from the 3D Carousel swf when it is unloaded. This is where I am stuck as my knowledge of AS3 is limited - Can you guys / girls help?
//Import TweenMax
import com.greensock.*;
//The path to the XML file (use your own here)
// old var from tutorial - var xmlPath:String = "http://tutorials.flashmymind.com/XML/carousel-menu.xml";
var xmlPath:String = "carousel-menu.xml";
//We'll store the loaded XML to this variable
var xml:XML;
//Create a loader and load the XML. Call the function "xmlLoaded" when done.
var loader = new URLLoader();
loader.load(new URLRequest(xmlPath));
loader.addEventListener(Event.COMPLETE, xmlLoaded);
//This function is called when the XML file is loaded
function xmlLoaded(e:Event):void {
     //Make sure that we are not working with a null variable
     if ((e.target as URLLoader) != null ) {
          //Create a new XML object with the loaded XML data
          xml = new XML(loader.data);
          //Call the function that creates the menu
          createMenu();
//We need to know how many items we have on the stage
var numberOfItems:uint = 0;
//This array will contain all the menu items
var menuItems:Array = new Array();
//Set the focal length
var focalLength:Number = 350;
//Set the vanishing point
var vanishingPointX:Number = stage.stageWidth / 2;
var vanishingPointY:Number = stage.stageHeight / 2;
//We calculate the angleSpeed in the ENTER_FRAME listener
var angleSpeed:Number = 0;
//Radius of the circle
var radius:Number = 128;
//This function creates the menu
function createMenu():void {
     //Get the number of menu items we will have
     numberOfItems = xml.items.item.length();
     //Calculate the angle difference between the menu items (in radians)
     var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;
     //We use a counter so we know how many menu items have been created
     var count:uint = 0;
     //Loop through all the <button></button> nodes in the XML
     for each (var item:XML in xml.items.item) {
          //Create a new menu item
          var menuItem:MenuItem = new MenuItem();
          //Calculate the starting angle for the menu item
          var startingAngle:Number = angleDifference * count;
          //Set a "currentAngle" attribute for the menu item
          menuItem.currentAngle = startingAngle;
          //Position the menu item
          menuItem.xpos3D = 0;
          menuItem.ypos3D = radius * Math.sin(startingAngle);
          menuItem.zpos3D = radius * Math.cos(startingAngle);
          //Calculate the scale ratio for the menu item (the further the item -> the smaller the scale ratio)
          var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
          //Scale the menu item according to the scale ratio
          menuItem.scaleX = menuItem.scaleY = scaleRatio;
          //Position the menu item to the stage (from 3D to 2D coordinates)
          menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
          menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;
          //Add a text to the menu item
          menuItem.menuText.text = item.label;
          //Add a "linkTo" variable for the URL
          menuItem.linkTo = item.linkTo;
          //We don't want the text field to catch mouse events
          menuItem.mouseChildren = false;
          //Assign MOUSE_OVER, MOUSE_OUT and CLICK listeners for the menu item
          menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
          menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
          menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
          //Add the menu item to the menu items array
          menuItems.push(menuItem);
          //Add the menu item to the stage
          addChild(menuItem);
          //Assign an initial alpha
          menuItem.alpha = 0.3;
          //Add some blur to the item
          TweenMax.to(menuItem,0, {blurFilter:{blurX:1, blurY:1}});
          //Update the count
          count++;
//Add an ENTER_FRAME listener for the animation
addEventListener(Event.ENTER_FRAME, moveCarousel);
//This function is called in each frame
function moveCarousel(e:Event):void {
     //Calculate the angle speed according to mouseY position
     angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;
     //Loop through the menu items
     for (var i:uint = 0; i < menuItems.length; i++) {
          //Store the menu item to a local variable
          var menuItem:MenuItem = menuItems[i] as MenuItem;
          //Update the current angle of the item
          menuItem.currentAngle += angleSpeed;
          //Calculate a scale ratio
          var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
          //Scale the item according to the scale ratio
          menuItem.scaleX=menuItem.scaleY=scaleRatio;
          //Set new 3D coordinates
          menuItem.xpos3D=0;
          menuItem.ypos3D=radius*Math.sin(menuItem.currentAngle);
          menuItem.zpos3D=radius*Math.cos(menuItem.currentAngle);
          //Update the item's coordinates.
          menuItem.x=vanishingPointX+menuItem.xpos3D*scaleRatio;
          menuItem.y=vanishingPointY+menuItem.ypos3D*scaleRatio;
     //Call the function that sorts the items so they overlap each other correctly
     sortZ();
//This function sorts the items so they overlap each other correctly
function sortZ():void {
     //Sort the array so that the item which has the highest
     //z position (= furthest away) is first in the array
     menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
     //Set new child indexes for the item
     for (var i:uint = 0; i < menuItems.length; i++) {
          setChildIndex(menuItems[i], i);
//This function is called when a mouse is over an item
function mouseOverItem(e:Event):void {
     //Tween the item's properties
     TweenMax.to(e.target, 0.1, {alpha: 1, glowFilter:{color:0xffffff, alpha:1, blurX:60, blurY:60},blurFilter:{blurX:0, blurY:0}});
//This function is called when a mouse is out of an item
function mouseOutItem(e:Event):void {
     //Tween the item's properties
     TweenMax.to(e.target, 1, {alpha: 0.3, glowFilter:{color:0xffffff, alpha:1, blurX:0, blurY:0},blurFilter:{blurX:1, blurY:1}});
//This function is called when an item is clicked
function itemClicked(e:Event):void {
     //Navigate to the URL that's assigned to the menu item
     var urlRequest:URLRequest=new URLRequest(e.target.linkTo);
     navigateToURL(urlRequest);

Hi Ned thanks for the reply,
Ok so I have a button in my main movie that loads the external swf
stop();
var my_loader:Loader = new Loader();
var my_btn:Button = new Button();
var my_pb:ProgressBar = new ProgressBar();
my_pb.source = my_loader.contentLoaderInfo;
my_btn.addEventListener(MouseEvent.CLICK,startLoading);
function startLoading(e:MouseEvent):void{
my_loader.load(new URLRequest("carousel.swf"));
addChild(my_pb);
my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishloading);
function finishloading(e:Event):void{
addChild(my_loader);
my_loader.addEventListener("killMe",
killLoadedClip);
removeChild(my_pb);
function killLoadedClip(e:Event):void {
my_loader.removeEventListener("killMe",
killLoadedClip);
my_loader.unloadAndStop();
removeChild(my_loader);
Then I have a button in my loaded swf that closes the loader
This is spread over 2 frames
Frame1
function closeIt(e:MouseEvent):void {
parent.dispatchEvent(newEvent("killMe"));
Frame 2
back_btn.addEventListener(MouseEvent.CLICK, closeIt);
Frame 2 also holds all the code for the carousel
Thanks for your time and help in advance people ; )

Similar Messages

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

  • Need help - How to load data which contains \r\n

    Hi All,
    We have a requirement wherein we need to load the data from a .dat file, with fields separated by | symbol and the line separator specified as '\r\n'
    INFILE '/scratch/xyz/abcd.dat' "STR '\r\n'"
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    Can you please help us load data which contains multiple lines in a single field to a database table field , keeping the line separator in ctl file as '\r\n' itself.
    When we try bringing the '\r\n' within a text field enclosed in "" , the '\r\n' , sqlldr considers it as the end of that record and not as a data which needs to go into a column.
    One option we have is to have the extraction process create the data in such a way that the fields with multiple lines , be brought in the .dat file enclosed in "" as
    "Test
    "|8989|abcd
    where the new line in the first field is just '\n' .
    Is there any other way in which the requirement can be addressed.
    Version: SQL*Loader: Release 11.1.0.7.0
    Thanks,
    Rohin

    In addition, you would need to know the character set encoding of the csv files (e.g. the code page used).
    Basically you need to have the facts about both client (csv file) and database character set.
    As suggested, use the available documentation - it's there to help you!
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch2charset.htm

  • Passing events from externally-loaded SWFs

    Hi,
    We have an externally-loaded swf that acts as a kind-of-a slide show.  After a user selects a particular subject from a mxml-based "menu" application, they push "buttons" in the SWF to go through a presentation, then on the last frame of the swf, I'd like to unload the swf and replace it with another "mxml" application.  How can this be done?  I have not tried to pass/capture events "up" from an externally-loaded swf before.
    Thanks,
    Doug

    Do you own those SWFs?  If so, they should dispatch an event from a known
    place like a SlideShowManager or something like that.
    Other folks "cheat" and bubble events or dispatch off of the systemManager
    and/or top-level application.

  • Dynamic Text in Externally Loaded swf

    hi. i have a dynamic text field in an externally loaded swf. Its a digital clock so i want the numbers to update in the dynamic text field.
    this is not my exact code but it is very similar. i show below that i add the loader.swf, and once its loading is complete, i can work on its movieclips and add event listeners to its buttons, etc. but i cannot change the dynamic text field (its "classic text" set to "dynamic text"). after running this, the text just stays empty as it is in the external swf).
    here is the sample code:
    var loader:Loader = new Loader();
    loader.load(new URLRequest("loader.swf"));
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
    function loaded(event:Event):void{
         addChild(loader);
         var loader_mc:MovieClip = (loader.content as MovieClip)
         loader_mc.myMovieClip.gotoAndStop(2);//***this works
         loader_mc.myButton_btn.addEventListener(MouseEvent.CLICK, clickMe);//***this works
         loader_mc.myText_txt.text = "12";//***this doesn't work******
    please help. thanks!

    Did you embed the font in the textfield--it needs to be done in the loaded swf when you create it? One other thing to check is that the color for the textfield is not the same as the background it sits on.

  • Using the DateField in an Externally loaded SWF

    Hello,
    I have been having major trouble trying to get a basic PHP
    contact form to work within an externally loaded SWF file inside of
    a parent SWF. When I test the movie on its own it seems to work
    fine (example: I'm able to select a date from the DateField
    component). However, when I open up the parent SWF file and call
    the external SWF file with the form the DateField is basically
    unusable (example: when you click on it nothing happens, no
    calendar pops up to select a date).
    I have no ActionScript on it yet, simply because I figure I
    need it to work before I tell it what to do with the PHP file. The
    instance name on the DateField is "theDate". Any help is very much
    appreciated. Thank you.
    Also, I have just successfully used the contact form on the
    web. But, the only user interface components I am able to edit are
    the input text boxes, not the DateField or the ComboBox I have in
    it as well. This is very odd, I was not aware that anything special
    had to be done using these UI components within an external file.
    Elijah

    Hello 2m,
    Maybe if you were to see it, it may help you out a bit. If
    you
    click
    here for the external file you will see that the components are
    working. However, if you
    click
    here for the parent file and then click on "Meetings" on the
    top menu you will see that they do not work at all. However, if
    someone were to hit the "send" button, the PHP code would actually
    interact with the form. Let me know if that helps at all. Thanks
    again for replying.
    Elijah

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    OK....I'm stumped.  The message you are seeing is typically there to protect someone from syncing with a different computer/iTunes account.  Is there any way anyone else has used your iPad and possibly connected it to their computer?

  • How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available? Kindly help

    How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available?
    kindly suggest a solution.
    Thank you inadvance!

    You can only import photos/videos via USB and the camera connection kit.
    ITunes: Syncing media content to your iOS devices
    http://support.apple.com/kb/ht1351
     Cheers, Tom

  • My external hard drive which contained all mu music has failed.  How do i create a new itunes library with the music on my iphone?

    I had all my music on an external hard drive which itunes referred to as the stored location.   this drive has now died and I only have the music on my iphone/ipad.  How do I recreate my music on another external drive using the music on my iphone/ipad?

    Have you failed to maintain a backup copy?
    If so, not good, you can transfer itunes purchases from the iphone: File>Devices>Transfer Purchases
    You may be able to purchase a third party program to get the rest ( not supported by Apple).

  • How to Convert swf which Contain Buttons to DVD?

    Hi. I'm designing a multimedia application which contain buttons and animation and i wanted to convert it into DVD as DVD cannot support swf file. Do i use a converter to just convert it or is there any other solution to this?
    Thank you.

    If your target media is a Video-DVD that must be playable on standard NTSC/PAL devices, Flash is the wrong tool.
    Use After Effects to create your animations and encore to author the Video-DVD

  • AIR App, load externally hosted SWF which loads XML

    I am wondering if this is even possible, because I am getting error 2148. 
    I am loading in SWF files that are externally hosted into an AIR app.  Everything works great!
    Is it possible to have one  of these child SWFs load in some type of XML data or access an XML file on the desktop/tmp?
    Or if need be, should I have the AIR app do all the loading (including the other XML) and pass that to the child SWF?
    Thanks in advance!
    In detail:
    AIR app -> Loads SWFs
    SWFS -> Load XML
    SWF -> displays something or does something RAD!!!
    Stuff I have tried:
    Ive added an mms.cfg file in the proper places, as well as, changed my adobe security settings to allow access to a "tmp" folder on desktop. The loaded SWF from an external domain loads fine however it still shows an error 2148 when trying to access an XML file within the "tmp" folder on desktop. The SWF when published is also set to "access local files"

    I was able to find a workaround of the security sandbox using Loader.loadBytes();
    Aleksandar Andreev's Loader class really helped:
    http://blog.aleksandarandreev.com/?p=42

  • Map and externally loaded swf working together

    Here's the setup:
    I have a panoramic viewer, and i'd like to have a map go
    along side it. The panoramas are loaded externally into the player.
    Inside these external swf files are "hotspots" that link to other
    panoramic swf files that load and take the previous swf's place. I
    have all of this set up, and you can see how I did it in my
    previous post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1274410&enterthread=y
    So now my new question is... how can I have a map with points
    on it, that when you click on a point, it will load a corresponding
    swf file into the player. I believe that part is easy. My big
    problem is if someone clicks on a hotspot in the external swf file
    first, which in turn loads another swf file, and if that person
    goes back to the map, I want the map to change the position of lets
    say, a marker or a pin to indicate the new position on the map that
    correllates to the new external swf that was loaded.
    make sense? Any ideas? I was thinking maybe it would be some
    kind of listener or something so that should a specific swf load,
    it will recognize it and automatically change the location of the
    marker on the map to the point that relates to the loaded swf or
    something...

    Hi Thanks for your reply, I tried with a small AS3 file as
    well and I get the same ERROR.

  • Setting External Loaded SWF dimension

    hi guys...,
    i'll be straight to point,well i'm now working on a project using action  script 3 now what i'm trying to make is a Main SWF that load whatever  other swf into it the tricky thing is that i used 1 xml document read  the external swf source and it's setting(such as it's x,y position and  it's width and height) and i'm having problem setting the loaded swf width and  height btw it's an desktop application and not a website application.,
    here is my code:
    //variable list
    var swfList:XMLList; //hold all the zone list from the xml
    var totalZone:uint; //total of zone there is in the xml
    var myURLLoader:URLLoader = new URLLoader();
    var swf:Movie Clip;//hold the loaded swf
    var swfLoader:Loader = new Loader();//loader instance used to load the external swf
    var myCounter:uint = 0;
    //load the xml file
    myURLLoader.load(new URLRequest('myXMLFile.xml'));
    myURLLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    function processXML(e:Event):void
        removeEventListener(Event.COMPLETE, processXML);
        XML.ignoreWhitespace= true;
        var myXML:XML = new XML(e.target.data);
        swfList = myXML.SWF;
        totalSWF = myXML.SWF.length();
        loadSWF();
    function loadSWF():void
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT, swfSetting);
        swfLoader.load(new URLRequest(swfList[myCounter].@source));
    function swfSetting(e:Event):void
        //making new instance of sprite to hold the new loaded swf
        swf = new MovieClip();
        //casting the loader content into a movieclip
        swf = e.target.content;
        addChild(swf);
        swfLoader.unload();
        swf.x = swfList[myCounter].@left;
        swf.y = swfList[myCounter].@top;
        swf.width= swfList[myCounter].@width;
        swf.height= swfList[myCounter].@height;
        addChild(swf);
        if(myCounter < totalSWF)
            myCounter++;
            trace('myCounter: ' + myCounter );
            loadSWF();
    and here is what the result ( it make the width and height of the loaded swf to 0):
    swfLoader.contentLoaderInfo.width : 320
    swfLoader.contentLoaderInfo.height : 240
    module: MyVideo/flvplayer.swf
    x:0
    x container:0
    y:0
    y container:0
    xml width:550
    width container:0
    xml height:400
    height container:0
    myCounter: 1
    swfLoader.contentLoaderInfo.width : 550
    swfLoader.contentLoaderInfo.height : 400
    module: AnalogueClock.swf
    x:50
    x container:50
    y:0
    y container:0
    xml width:250
    width container:250
    xml height:200
    height container:200
    myCounter: 2
    swfLoader.contentLoaderInfo.width : 800
    swfLoader.contentLoaderInfo.height : 30
    module: MyNewsticker/newsticker.swf
    x:0
    x container:0
    y:0
    y container:0
    xml width:300
    width container:0
    xml height:50
    height container:0
    most of my loaded swf beside the analouge clock is full action script code and in case of the analouge clock it is a swf that has a movie clip on it's stage (the other are fully created from action script 3.0)
    please do help me..,
    cause i'm already really desperate and going crazy by this problem..,

    sorry i copied the code from the other swf i used to do try and error test..,
    basically the container is the same as swf varibale
    here the code so you would'nt get confused:
    //variable list
    var swfList:XMLList; //hold all the zone list from the xml
    var totalZone:uint; //total of zone there is in the xml
    var myURLLoader:URLLoader = new URLLoader();
    var swf:Movie Clip;//hold the loaded swf
    var swfLoader:Loader = new Loader();//loader instance used to load the external swf
    var myCounter:uint = 0;
    //load the xml file
    myURLLoader.load(new URLRequest('myXMLFile.xml'));
    myURLLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    function processXML(e:Event):void
        removeEventListener(Event.COMPLETE, processXML);
        XML.ignoreWhitespace= true;
        var myXML:XML = new XML(e.target.data);
        swfList = myXML.SWF;
        totalSWF = myXML.SWF.length();
        loadSWF();
    function loadSWF():void
        swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfSetting);
        swfLoader.load(new URLRequest(swfList[myCounter].@source));
    function swfSetting(e:Event):void
        //making new instance of sprite to hold the new loaded swf
        swf = new MovieClip();
        //casting the loader content into a movieclip
        swf = e.target.content;
        addChild(swf);
        swfLoader.unload();
        swf.x = swfList[myCounter].@left;
        swf.y = swfList[myCounter].@top;
        swf.width= swfList[myCounter].@width;
        swf.height= swfList[myCounter].@height;
        addChild(swf);
        if(myCounter < totalSWF)
            myCounter++;
            trace('myCounter: ' + myCounter );
            loadSWF();
    well in my code i did cast the loader into a movie clip and then set it's width and heigt,right???
    wouldn't it just give me the same result??
    if it's not can u describe what u mean in more detail??
    some example about accessing the loader content would be really appreciated

  • GetDefinitionByName not finding class in externally loaded SWF

    In my app, I have an external SWF that contains a bunch of
    movie clips that I want to instantiate in my main swf.
    I have checked the "Export for ActionScript" and the "Export
    in first frame" box in the movie clip in Flash.
    In my main SWF, I have action script code that loads the SWF
    (using the normal Loader and URLRequest classes).
    When the load completes, I do:
    var loader:Loader = Loader(event.target.loader);
    var movieClip:MovieClip = MovieClip(loader.content);
    var theClass:Class;
    try
    theClass = Class(getDefinitionByName("TestClass"));
    catch(e:Error)
    trace("TestClass not found!");
    return;
    I have never gotten it to successfully find the class.
    Is there anything else I might be doing wrong?
    Thanks

    Ah, I figured it out. I need to use the applicationDomain. So
    instead of using getDefinitionByName, I would call:
    event.target.applicationDomain.getDefinition("TestClass");
    That seems to work....
    Thanks

Maybe you are looking for

  • Weird error when trying to log in Designer 10g in Windows XP Prof. SP2

    Hello, I'm having a problem to log in because the software responds with the following messages: ORA-12560: TNS: error in protocol adapter Cause: A generic protocol adapter error occurred. Action: Check addresses used for propel protocol specificatio

  • A ques about Reading and Writing non-Latin character Strings

    Never had any need to to the captioned before, so I never investigated it. But now I do. We are in the midst of a major conversion of our software to UTF-8. Oracle Forms displays these Strings (ex: Українська) properly, but when I query the DB column

  • Flex SDK Download - checksum error

    Hello, I downloaded the Flex SDK from http://www.adobe.com/products/flex/downloads/ When I unzip it (with WinRAR), I get a checksum error. Any advice? Thanks.

  • Photoshop E 10 shuts down when I start a pano?

    I have PSE 10 on Window 7 Pro and now when I open in Organizer and pick a photo that I want to edit in full editor, full editor will open but not pick the photo I want to edit.  Different situation: I am in full editor and pick four photos I want to

  • Error (-54) when trying to backup phone

    Im trying to get IOS 5, right when the iphone is about to back up i get the (-54) error, how do i fix this?