Answer the question
In order to leave comments, you need to log in
How can :void cause an error? [AS3]
An unexpected situation: an error occurs and disappears if you add :void
after a method definition. Moreover, this affects the next declared method in the same class.
Error:
1195: Attempted access of inaccessible method lightTwoOk through a reference with static type com.myApplication:myDoc.
Definitions:
public function lightOneOk():void {
myMC.LightOne.goGreen();
}
public function lightTwoOk() {
myMC.LightTwo.goGreen();
}
gotoAndStop()
. myDoc
). From its constructor, I access the application's Singleton ( class myApp
) for the first time by creating it. myApp
contains properties Doc
and User
. User
, upon receiving data from a remote web service, calls "problematic" methods:var App:myApp = myApp.getApp(); // получить ссылку на синглтон приложения
App.Doc.lightOneOk();
App.Doc.lightTwoOk(); // вот на это место указывает ошибка 1195
:void
to the definition of a method?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question