all groups > flash actionscript > april 2007 >
You're in the

flash actionscript

group:

Writing classes with Fuse


Writing classes with Fuse erokCom
4/18/2007 9:13:44 PM
flash actionscript:
Hello friends,

So, I am trying to learn how to write classes. (Same as before)

The IDE say's the Syntax is correct, but it still spits errors in the flash
file.. Here is the code:

import com.mosesSupposes.fuse.*;


class Mover extends MovieClip
{

private var Instance:Mover;
private var targetMC:MovieClip;
private var alphaUp:Number;




public function Mover()
{
Instance = this;
ZigoEngine.simpleSetup( Shortcuts, PennerEasing, Fuse );

trace("The constructor was called");


}

public function startMoving(alphaUp:Number)
{

targetMC.alphaTo(alphaUp, 1);

trace("startMoving was called");
}
}

///////////

And in the flash file I am calling it like:





var myMover:Mover = new Mover();


circle_mc.startMoving(400);


Can someone telll me what I am doing wrong?
Re: Writing classes with Fuse erokCom
4/18/2007 9:39:20 PM
Ok, so this seems to work..

import com.mosesSupposes.fuse.*;


class Mover extends MovieClip

{


//vars:
private var Instance:Mover;
private var targetMC:MovieClip;
private var mcAlpha:Number;
private var alphaTime:Number;


//constructor:
public function Mover()
{

Instance = this;
trace("The constructor was called");
ZigoEngine.simpleSetup( Shortcuts, PennerEasing, Fuse );

}

//

public function startMoving(targetMC:MovieClip, yPos:Number)
{
targetMC .alphaTo(mcAlpha,alphaTime);
trace("startMoving was called");
}
}
AddThis Social Bookmark Button