Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Results 1 to 7 of 7

Thread: access loaded object

  1. #1
    Member Settled In jimbo is on a distinguished road
    Join Date
    Jul 2007
    Posts
    34
    Rep Power
    0

    access loaded object

    flash templates
    How can I access this loaded swf - I want to either move it off stage until needed, or make it visible=false until it is needed? I tried accessing swf, and oilsLoader without success? Can I load it into an empty mc and access the mc? If so, how would I do that?

    var swf:String='Oils.swf';
    var richiesta:URLRequest=new URLRequest(swf);
    var oilslLoader:Loader=new Loader();

    oilslLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE,completato);
    oilslLoader.load(richiesta);

    function completato(e:Event):void
    {
    //preloader_mc.stop();
    //preloader_mc.visible=false;
    addChild(oilslLoader);
    }

  2. #2
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: access loaded object

    Inside of function completato, you can refer to oilslLoader like as a MovieClip. So:
    oilslLoader.visible=false;
    oilslLoader.x
    oilslLoader.rotation
    oilslLoader.width

    etc etc

  3. #3
    Member Settled In jimbo is on a distinguished road
    Join Date
    Jul 2007
    Posts
    34
    Rep Power
    0

    Re: access loaded object

    No, I get 'access of undefined property oilsLoader

    function completato(e:Event):void
    {
    addChild(oilslLoader);
    oilsLoader.visible = false;
    }

  4. #4
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: access loaded object

    What's the output of:
    trace(oilslLoader);

    ?

  5. #5
    Member Settled In jimbo is on a distinguished road
    Join Date
    Jul 2007
    Posts
    34
    Rep Power
    0

    Re: access loaded object

    I put the trace inside completato, and before and after completato, and always got compliler error - access of undefined property oilsLoader :(

  6. #6
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: access loaded object

    After this line:
    addChild(oilslLoader);

    if you write trace(oilslLoader); you get undefined ?

  7. #7
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: access loaded object

    try the trace before that line too

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 24-04-10, 03:44
  2. loaded Mc rotate along with my buttons
    By davids701124 in forum Flash English
    Replies: 0
    Last Post: 07-04-10, 02:33
  3. Access nested movieclip not instanced
    By Funkwarrior in forum advanced Actionscript 3.0
    Replies: 3
    Last Post: 15-09-09, 04:56
  4. Need nested buttons to access earlier movie clip
    By smalldifferences in forum Actionscript 3.0 newbies
    Replies: 2
    Last Post: 11-06-09, 18:43
  5. Code access to timeline masks...?
    By barliesque in forum advanced Actionscript 3.0
    Replies: 3
    Last Post: 05-10-08, 02:26

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts