Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-07-2012, 01:34 PM   #1
Mighty Flash Gordon
Member
 
Join Date: Apr 2012
Posts: 91
Default Help with acessing a loaded swf library MovieClip

Hi guys and girls,

I have been trying to find out how to access a library movieClip from a loaded swf.

So, lets say I have a main swf called "parent.swf" that is using a document class called "parent.as" that loads another swf lets call it "child.swf" which has a class called "child.as".

In "child.swf" library I have a movieClip lets call it "mClip"

So my question is how do I gain access to the child.swf's library "mClip" from the parent.as?
Mighty Flash Gordon is offline   Reply With Quote
Old 05-07-2012, 08:46 PM   #2
solisarg
Senior Member
 
solisarg's Avatar
 
Join Date: Mar 2003
Location: Buenos Aires, Argentina
Posts: 496
Default

Did you try new mClip() directly once child.swf finish loading?
Did you try to call a function in child.swf that returns an instance of mClip?

Jorge
solisarg is offline   Reply With Quote
Old 05-08-2012, 09:17 AM   #3
Mighty Flash Gordon
Member
 
Join Date: Apr 2012
Posts: 91
Default

No, not sure how to do that!
Mighty Flash Gordon is offline   Reply With Quote
Old 05-08-2012, 10:43 AM   #4
Poony
Senior Member
 
Poony's Avatar
 
Join Date: Aug 2011
Location: Sweden
Posts: 390
Default

Read up on RSL (runtime shared library).

Or like solisarg said, create a function in the child swf that returns a instance. Here's a quick example:

ActionScript Code:
function createInstance():MovieClip{    return new mClip(); }

Last edited by Poony; 05-08-2012 at 10:45 AM.
Poony is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:30 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.