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

    amazing 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,456
    Rep Power
    8

    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,456
    Rep Power
    8

    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,456
    Rep Power
    8

    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,456
    Rep Power
    8

    Re: access loaded object

    try the trace before that line too

+ Reply to Thread

Similar Threads

  1. Access nested movieclip not instanced
    By Funkwarrior in forum advanced Actionscript 3.0
    Replies: 3
    Last Post: 15-09-09, 05:56
  2. Need nested buttons to access earlier movie clip
    By smalldifferences in forum Actionscript 3.0 newbies
    Replies: 2
    Last Post: 11-06-09, 19:43
  3. Replies: 7
    Last Post: 24-10-08, 21:53
  4. Code access to timeline masks...?
    By barliesque in forum advanced Actionscript 3.0
    Replies: 3
    Last Post: 05-10-08, 03:26
  5. tween display above loaded swf
    By jimbo in forum Actionscript 3.0 newbies
    Replies: 10
    Last Post: 16-10-07, 15:29

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

Search Engine Optimization by vBSEO