coker todd wrote:
 
> Thanks Kerry, what would make it specific?

As I said in my earlier e-mail, I would lose the .prototype. Everywhere.
That's pure AS 1.

I would subclass MovieClip. That's a pretty standard technique. Write a
class (that is, a .as file) that starts something like this:

class Calculator extends MovieClip
{

   public function init (// whatever args you want to pass)
   {
      // Initialize your vars
   }

   function onRelease()
   {
      // do what you want when the MC is clicked
   }

   function onRollOver()
   {
     this.gotoAndStop ("Over");
   }
        
   function onRollOut()
   {
      this.gotoAndStop ("Up");
   }
}

And so on. You can override any or all of the MovieClip Class methods and do
what you want in them.

To associate a MC with a class, you need to right-click its symbol in the
library and set the linkage to the class. Your class will be exactly the
name of the .as file, case-sensitive.

Then, you use AttachMovie() to attach it to the timeline of whatever movie
clip it's in (that could be the main movie), passing the name of the class
like I did in my example a few minutes ago. It's all in the help file, under
AS 2 classes. Or, if you tell me your class name and movie clip name (the
library symbol), I'll give you the line of code to attach it to your movie
clip, subclass and all.

Cordially,

Kerry Thompson


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to