Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making classes work

Status
Not open for further replies.

rolan18

Programmer
May 11, 2006
26
0
0
CA
So I'm having some trouble making a call to my .as file.
I use the make particle an instance of "3dobject".

var particle:threeDObject = new threeDObject(ball, focal, CenterX, CenterY);

and then I use particle to call a function moveParticle

_root.particle.moveParticle();

moveParticle is a function that is supposed to trace some values, but it doesn't seem to be doing that

function moveParticle():Void{
angleY = (_root._xmouse - CenterX) * .001;
trace (angleY);
}


My problem is that the trace in the moveParticle function is not even registering. It doesn't return anything at all, not even an "undefined". So I'm assuming that means the function is not being called, which would be a bad thing.

Any help would be appreciated
Thanks
 
As it happens, when you get values into functions in an .as file, if you initialize them with,

this.value= value;

you can refer to them using this.value throughout the entire .as file...

this seems to have solved my problem, but thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top