custom classes with jeash
Hi
I'm trying to extend Sprite class with some public properties and methods, and then call them from Main class (NME ofcourse):
///////
var item = new FilmstripItem(
stage.addChild(
item.addEventLi
...
private function item_click(
var a:FilmstripItem;
a = cast e.target;
trace(e.
}
///////
and the custom FilmstripItem class:
///////
import nme.display.Sprite;
class FilmstripItem extends Sprite{
public var url : String;
public function new(url:String) {
this.url = url;
super();
}
}
///////
it works fine when I build it for flash output, but, in html5 the value is null. I also tried with the method inside of FilmstripItem class, but it gives me error (the popup comes out with script error message boot_closure@67)
Is it possible to do it?
thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- jeash Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- ajerinic
- Solved:
- Last query:
- Last reply: