Copy link to clipboard
Copied
Hello, I realise an application for an exhibition and it have to restart to begin itself if it is innactiv, for other visitors.
I use
addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
function fl_EnterFrameHandler(event:Event):void
{
MovieClip(this.root).gotoAndPlay(1, "Séquence 1");
}
For most of my sequences but when it's for video pages, I have an issue:
I have a video in PlaybackFLV on my "séquence 4", and I want to go back to Séquence 1 when this video is complete
I tried whith this code :
@
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(Event:Event):void {
MovieClip(this.root).gotoAndStop(1, "Séquence 1");
}
and
import fl.video.VideoEvent;
video_secret_fab_EN.addEventListener(VideoEvent.COMPLETE, videoComplete);
function videoComplete(Event:VideoEvent):void {
MovieClip(this.root).gotoAndStop(1, "Séquence 1");
}
But I allways have this message :
Séquence 004, Calque 'Actions', Image 28056, ligne 55, colonne 61 | 1119 : Accès à la propriété COMPLETE peut-être non définie, via la référence de type static Class. |
Sequence 004, layer 'Actions', Image 28056, line 55, column 61 1119 : the acces to the poperty COMPLETE can be undefined, via the type of reference static Class. (sorry I'm french, and not bilingual...)
I'm beginner in AS3 and I don't know what is wrong.
I don't want use a timer because I have to integrate the same code for many video pages in my project.
Thank you for you attention and hope you can help me.
I believe the Complete event for FLVPlayback just uses the standard Event Class:
import flash.events.*;
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(e:Event):void
{
MovieClip(this.root).gotoAndStop(1, "Sequence 1");
}
Copy link to clipboard
Copied
I believe the Complete event for FLVPlayback just uses the standard Event Class:
import flash.events.*;
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(e:Event):void
{
MovieClip(this.root).gotoAndStop(1, "Sequence 1");
}
Copy link to clipboard
Copied
Thank you so, so much !
It works perfectly !