I have a library item that I’m exporting with a class name as infobox.
I load it onto my stage as such:
var boxy:infobox = new infobox();
boxy.name = "boxy";
stage.addChild(boxy);
Then inside of another function I’m trying to access it this way :
private function onTriggerCollide(trigger:Trigger):void{
trace("I hit");
b=stage.getChildByName("boxy");
b.gotoAndPlay(1);
}
But I get this error:
C:\Users\Public\Documents\AA success\myMovie.as, Line 73 1120: Access of undefined property b.
undefined property? I should be able to access a movie clip on the stage like that, right? I think I done this before.
I DO import import flash.display.MovieClip at beginning of the script.
any help would be appreciated !! thanks.
-s:)