all groups > flash actionscript > october 2005 >
You're in the

flash actionscript

group:

member attribute error


member attribute error stephan.k
10/12/2005 11:08:05 PM
flash actionscript:
Dear Forum

I'm learning the actionscript 2 OOP approach and I'm running into an error
message that I dont' understand. What am I missing?

Any insight appreciated. Thanks!

Stephan

----------------------
Error Message: Line 6: A member attribute was used incorrectly.
public fadeIn(path:Object,_speed:Number){
-----------------------


Here's is the transition.as file:
-------------------------------
class com.mypage.transition {

public fadeIn(path:Object,_speed:Number){
path.createEmptyMovieClip("loop",this.getNextHighestDepth());
path.loop.onEnterFrame = function(){
this._parent._alpha+=_speed
if(this._parent._alpha>99){
this._parent._alpha = 99.9
delete this.onEnterFrame;
this.removeMovieClip();
trace("fadeIn doesn't work >> check transition.as");
}
}
}

--------------------------
Re: member attribute error stephan.k
10/12/2005 11:31:01 PM
Alright I'm an idiot. I figuered it out:



class com.mypage.transition {




public function fadeIn(path:Object,_speed:Number){
path.createEmptyMovieClip("loop",path.getNextHighestDepth());
path.loop.onEnterFrame = function(){
this._parent._alpha+=_speed
if(this._parent._alpha>99){
this._parent._alpha = 99.9
delete this.onEnterFrame;
this.removeMovieClip();
trace("fadeIn doesn't work >> check transition.as");
}
}
}
AddThis Social Bookmark Button