I've got a little bit of flash to do and I haven't opened flash since version 4 and AS1.
I'm using CS3 and AS2 (I think).
The issue: I have a movie clip on layer in Frame1 (instance name of 'soldmark'. I add an event listener and want to affect the movie clip in the event listener function:
listenerObject = new Object(); listenerObject.onMyEvent = function(eventObject):Void {
soldmark._visible = false;
sold = eventObject.data.sold;
if (sold == "true") { var soldmarkTween = new Tween(soldmark,'_alpha',None.easeNone(0,1,2),true); } } myMovie.addEventListener("onMyEvent", listenerObject);
I'm getting the following error at compile time:
"The class or interface soldmark could not be loaded"
and I'm 99% sure that it's when it's being referenced in the new Tween instantiation.
How do i reference the mc as a parameter to the class instantiation?
I get the same error if i use _root.soldmark.
did u sort this already Techno?
Make sure you're specifying AS2 in your publish settings.
Then try to see if it can find soldmark at all, just add a simple trace outside of your event handler: trace("soldmark = " + soldmark);
Yeah, got it sorted thanks, it was something totally trivial.
On the linkage and properties dialog there is a field for 'class' which I had populated with 'soldmark' but I think flash was throwing a wobbly because that is for AS3 only and it was hunting for a class that didn't exist. Anyway, i cleared those fields and all was good.