Coker Todd wrote:
 
> so the new code reads:
> 
> MovieClip.prototype.mcbounceload = function () {
>       bounce = 0.4;
>       speed = 0.9;
>       xpos = _x;
>       ypos = _y; <snip>

That's not a bad way of updating AS1. Just be aware that it's still AS1. If
you're going to need to maintain it, I'd go to AS 2. I'd subclass
MovieClip--it's not hard at all. You just put your functions (methods) in a
.as file, lose the MovieClip.prototype part, and use something like this
snippet from a movie I'm working on:

var ageSlider:AgeSliderClass = myRoot.attachMovie("SliderBead_and_Shadow",
"AgeSliderClass", myRoot.getNextHighestDepth());

It's probably better to use DepthManager, especially if you're going to have
components, to get the depth. Regardless, you'll have much more maintainable
code with AS2 (or AS 3, if FP 9 is your target). They're much more
OOP-oriented.

Cordially,

Kerry Thompson


_______________________________________________
[email protected]
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