Regarding the matter of offense, don't worry about it. Yes, some posters do
tend to "push the envelope" and rely on the experts of the list more than
they should. Perhaps we're all guilty of that to an extent when we get
started. Yes, it brings the natural reaction to be abrupt, because it's the
student's job to do his utmost and not to tax the experts. It's an
unavoidable tension. All sides must be diligent in being respectful, the one
to the other.
Although I've programmed for years, I've never worked with classes <:-) I
googled "subclass actionscript 3" and figured out the main line of
"extends", but that's about as far as I got. I know I'm close but I still
don't get it. Here's what I've got so far. But why am I subclassing Main?
All Main is doing in the below is linking the *.fla to the *.as Other than
that, it's worthless. And of course, Flash complains about having two
classes. Please help me understand and/or point me to some resources on this
particular subject.
package
{
import flash.display.MovieClip;
import com.greensock.*;
import com.greensock.plugins.*;
import com.greensock.easing.*;
public class Main extends MovieClip
{
public function Main():void
{
}
}
class mcHatAndFace extends Main
{
TweenPlugin.activate([AutoAlphaPlugin]);
var mcHatAndFace = new MovieClip();
this.addChild(mcHatAndFace);
mcHatAndFace.x = 100;
mcHatAndFace.y = 100;
mcHatAndFace.alpha = 0;
TweenLite.to(mcHatAndFace, 1, {autoAlpha:1}); // 2nd param in seconds;
3rd in % alpha
}
}
TIA,
beno
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders