AS 3.0 reference issue
I am having a hard time finding help system in AS 3.0.
this is the code i have (i trimmed it to find the problem but to no avail)
package rpflash.ui {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.display.Stage;
import nowplaying;
import flash.text.TextField;
public class RPUserInterface extends Sprite{
var np:nowplaying;
public function RPUserInterface(){
}
public function init(){
var np:nowplaying = new nowplaying();
this.addChild(np)
}
public function updateplayer(xml:XML){
var artist: String = xml.nowplaying.artist.toString();
var title: String = xml.nowplaying.title.toString();
trace("UI:update");
trace(this.np);// this gives me a null reference
}
}
}
and yet i cant access np !!! trace this.np gives me a null reference. I am not even trying to access it from a sub-language class. (btw i def want to know how to do this.)
+2
source to share