I have an xml document that I would like to use to show MovieClips in my .fla:
<linkedMovieClip>TestClip</linkedMovieClip>
In my .fla, I created a symbol called TestClip and select Linkage > Export for Actionscript and named it TestClip.
My code in my Document class traces the xml:
var t:*= getDefinitionByName(String(slideItem.linkedMovieClip)) as Class;
var linked:MovieClip = new t();
trace("linked is..."+ linked); // outputs [Object TestClip];
However, when I compile, I am getting an Error #1065.
ReferenceError: Error #1065: Variable is not defined.
at global/flash.utils::getDefinitionByName()
I searched around and many sites recommended including the following imports:
import flash.utils.getDefinitionByName;
import TestClip;
And I included the following dummy variable:
public var _dummyClip:TestClip;
However, I am still getting an error message. When I check the debugger it's from this line:
var t:*= getDefinitionByName(String(slideItem.linkedMovieClip)) as Class;
Can anyone advise?