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

Video Event COMPLETE and action gotoAndStop

Community Beginner ,
Sep 22, 2015 Sep 22, 2015

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 611119 : 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.

TOPICS
ActionScript

Views

1.6K

Translate

Translate

Report

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

Enthusiast , Sep 22, 2015 Sep 22, 2015

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");

}

Votes

Translate

Translate
Enthusiast ,
Sep 22, 2015 Sep 22, 2015

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");

}

Votes

Translate

Translate

Report

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
Community Beginner ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

LATEST

Thank you so, so much !

It works perfectly !

Votes

Translate

Translate

Report

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