-
[CS3] assigning the same custom class to multiple movie clips.
i have multiple movie clips (multiple instance).
i would like to assign a custom class to all of them,
but flash says i need different class names under linkage property for each instance.
Does that mean I need 3 as file for each of my movielip instance although they are all the same?
Code:
package{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
public class F1 extends MovieClip {
public function F1() {
this.addEventListener(MouseEvent.MOUSE_OVER,flowerOver);
}
private function flowerOver(e:MouseEvent):void{
trace("over");
}
}
}
please help me.
thanks
-
Senior Member
Not sure what you're doing. Maybe you created an as2 fla but trying to use an AS3 class in it. But if you create an as3 fla the linkage property should be inactive and you shouldn't be able to use it at all. It should have Class and Base class properties available. You should set the base class to F1 and set Class property to whatever for your 3 clips. In as2 you would set the Class property to F1 and set the linkage property to whatever.
-
i assigned my class name to the base class section, and it worked.
thanks anyway.
-
i assigned my class name to the base class section, and it worked.
thanks anyway.
-
Senior Member
Not sure why it's "thanks anyway" considering that's what I told you to do. Should be "thanks"
-
sorry, i meant to post on someone else`s replay on another thread.
you are the man.
thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|