Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Erreur 1119 VideoEvent

Explorer ,
Jun 26, 2017 Jun 26, 2017

Bonjour,

J'ai instancié sur la scène d'Animate CC un composant FLVPlayback, nommé projecteur et doté d'une source .f4v, ainsi qu'un texte dynamique nommé message

Le test de l'animation marche parfaitement.

En revanche, l'ajout d'un VideoEvent en as3  donne l'erreur de compilation 1119 : " accès à la propriété STATE_CHANGE peut-être non définie, via la référence de type static Class".

Voici le code, placé sur un autre calque:

import fl.video.VideoEvent;

message.text = projecteur.source;

projecteur.addEventListener(VideoEvent.STATE_CHANGE, infoChgt);

function infoChgt(e:VideoEvent):void {

    message.text = "changement d'état";

}

Quelle est la cause de cette erreur, que je ne rencontre pas en Flash pro CS4 ?

Merci par avance de vos lumières.

PL

TOPICS
ActionScript
378
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 27, 2017 Jun 27, 2017

Thanks Ned for looking over my problem.

A working solution, playing around the problem, is to replace every (including those in declaration of type of a variable) VideoEvent fragment of code that is intended to be used with constants such as COMPLETE, READY, STATE_CHANGE, ... or properties such as playheadTime, with fl.video.VideoEvent .

I guess that the reason why the compiler is otherwise throwing the error 1119 is that it considers the possibility of VideoEvent being the class defined with fla

...
Translate
LEGEND ,
Jun 26, 2017 Jun 26, 2017

Be sure to place the component in the library.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 26, 2017 Jun 26, 2017

Yes, the component is sitting in the library, with export to action script checked.

And I have the 1119 error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 27, 2017 Jun 27, 2017

Thanks Ned for looking over my problem.

A working solution, playing around the problem, is to replace every (including those in declaration of type of a variable) VideoEvent fragment of code that is intended to be used with constants such as COMPLETE, READY, STATE_CHANGE, ... or properties such as playheadTime, with fl.video.VideoEvent .

I guess that the reason why the compiler is otherwise throwing the error 1119 is that it considers the possibility of VideoEvent being the class defined with flash.events, though it's clear in the rest of the line of code (because of the associated constant or property) that it has to deal with the VideoEvent class defined with fl.video .

To my knowledge, VideoEvent is the only class of fl.video that requires to write the extended path, fl.video.VideoEvent.

Adobe could provide a built-in fix to the compiler (it will be appreciated) whenever there is no doubt from the line of code that  VideoEvent points the class defined with fl.video .

PL

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 27, 2017 Jun 27, 2017
LATEST

I have had cases like that too. It is odd that there are two built in events with the same name.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines