can't access public function

Asked by Cedric Lalonde

I can't access a public function of a class.

It says:
nme.display.MovieClip has no field "the name of the function"
Works well if exported to flash.

jeash 0.8.7

Question information

Language:
English Edit question
Status:
Open
For:
jeash Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Niel Drummond (niel-drummond) said :
#1

plz paste an example.. :-)

Revision history for this message
Cedric Lalonde (g-cedlal) said :
#2

I've found my mistake:

This work when compiled in flash, but not in html5.

var p:MovieClip = new PublicTest();
addChild(p);
p.test();

This work on both.

var p:PublicTest = new PublicTest();
addChild(p);
p.test();

Can you help with this problem?

Provide an answer of your own, or ask Cedric Lalonde for more information if necessary.

To post a message you must log in.