Skip to main content
Known Participant
January 14, 2013
Answered

Problems with static functions

  • January 14, 2013
  • 1 reply
  • 364 views

Hello everybody, how are you?

Here I am again with a question about static functions. I'm building a class called "Photo Loader", its purpose is to pass a url and a MovieClip with "PhotoLoader.loadPhoto." This method should return a bitmap that will be added in movieclips. I'm not able to construct a method that let me independent of the Loader object. Has anyone experienced this?

Regards,

This topic has been closed for replies.
Correct answer kglad

you want loadPhoto to be a static getter?

public static function set loadPhoto(_bmp:Bitmap):void{
bmp=_bmp
}
public static function get loadPhoto():Bitmap{
return bmp;
}

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
January 15, 2013

you want loadPhoto to be a static getter?

public static function set loadPhoto(_bmp:Bitmap):void{
bmp=_bmp
}
public static function get loadPhoto():Bitmap{
return bmp;
}