Paul
Paul

Reputation: 2515

Flash Load external Video and Loop

I have added an external video to a flash AS3 file using the normal sequence:

file> import> import video

The video is in an mp4 format and I have not set a skin on it. The file plays fine, but I would like it to loop once complete.

I tried gotoAndPlay(1), which appears to have returned to the beginning of the file, but has not restarted the video.

Please help :(

Upvotes: 0

Views: 8259

Answers (1)

user1640277
user1640277

Reputation:

use the following code

fvp.source=yourvideo
fvp.autoRewind=true
fvp.addEventListener(VideoEvent.AUTO_REWOUND, videoPlayAgain, false, 0, true)
function videoPlayAgain( event:VideoEvent):void
{
 event.target.play()
}

Upvotes: 1

Related Questions