0
votes

What I am trying to do is add a MovieClip which I have created, but deleted from the actual stage itself, from a seperate class to a sprite which I declare in the document class. The link between the main document class and the others works fine, as well as references to the stage, from the class in question.

It is only one line of the function which is giving me the error: Type was not found, or is not compile-time constant:SequenceA

I have already tried changing the settings for 'Export for Actionscript' in the library properties and still get the same message every time.

Pretty lost with this one so any help is appreciated. Cheers!

1
where else does appRef and sequenceA exist? if you are creating it within this function, sequenceA has not yet been declared anywhere...and this also implies that sequenceA is a child of appRef yes?MaxG
Sorry, appRef is declared above it, it is a reference to the stage. I have used it already and it works fine. sequenceA is the MovieClip in the library that I am trying to accessTom Haddad
what happens if you dont use appRef? give sequenceA a class name of SequenceA and try var seqA:sequenceA = new SequenceA; and see if it complains. This will at least confirm it can instantiate your mc properly...Then try parenting again?MaxG
ha just saw the answer below... cheers!MaxG

1 Answers

1
votes

What have you set as the "Class" in your Export for ActionScript settings? It looks like you're trying to refer to an instance rather than the class itself. For example, mc is an instance of the MovieClip Class.

Assuming you've chosen the Class "SequenceA", you would do this instead:

var seqA:SequenceA = new SequenceA();

There's a little bit more detail about objects and classes here.