PDA

View Full Version : Access a movieClip within a different swf?



dawn_99
October 13th, 2009, 02:35 AM
Currently I found this code and adapted it to my document.


var myLoader:Loader = new Loader();
var myUrlReq:URLRequest = new URLRequest("web11.swf");
myLoader.load(myUrlReq);
myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE, onLoaded);

function onLoaded(event:Event):void
{

var Buttongroup:Class = event.target.applicationDomain.getDefinition("Buttongroup") as Class
var mySquare:MovieClip = new Buttongroup() as MovieClip;
addChild(mySquare);
}

This works if I wanted to load the class "Buttongroup" but I want to load the movieClip 'clipHolder' which is a new instance of buttonclass (with functions applied to it) Any help is really appreciated :love_heart:

dawn_99
October 13th, 2009, 09:03 PM
:emo:

Krilnon
October 13th, 2009, 09:35 PM
I don't think that your question is very clear. I think you're kind of mixing terminology around in such a way that it's hard to tell what you want to happen.