Create A Customizable ToolTip AS3 - Chapter III Binding The fla And The as Files Together
Posted by : FlashXpert on Jun 23, 2010
In order for any of our movieclips to interact with AS code, we need to do two things: we must give instance names to all the movieclips we expect to be affected by ActionScript and we must export the mcToolTip movieclip for ActionScript. In this way we tell the compiler that the mcToolTip movie clip is an instance of the ToolTip class and that it should act accordingly.
So let's begin:
We are on Scene 1 of our fla. Select the circle on the stage. Right click it, select "convert to symbol", name it mcCircle and click ok. With the circle selected, look in the properties panel, and type "mcCircle" in the Instance Name.
Right click the "type anything you want" textfield, select "convert to symbol", name it mcText and click ok. With the textfield selected, look in the properties panel, and type "mcText" in the Instance Name.
Select the mcToolTip movieclip and give its instance name "mcToolTip". It is already a movieclip, so we don't need to convert it as we did with the circle and the textfield.
Now let's go inside the Library panel. Richt click the mcToolTip item, select properties. Check "Export for ActionScript", and rename the class "ToolTip". Click ok.
Everything is set and ready. Let's see how we can make it work.

no comment
Add comment