-
How to loop flv video in first keyframe in CS3?
In my fla file I imported the flv file I created in the flash video encoder. I added skins when I did the import. I need help with the action script to get the first keyframe to replay the video after it finishes. In other words a continuous play loop.
-
Dignitary
Code:
myVideo.addEventListener(VideoEvent.COMPLETE, replay);
function replay(e:VideoEvent):void {
myVideo.seek(0);
myVideo.play();
}
-
questions on the code
Pardon my for being a novice at this.
This code should go in the keyframe containing the flv?
I need help with naming:
My files are as follows:
print.fla
print.flv
print.swf
can you redo the code to take this into account?
Many thanks
-
Thanks for your post. I called the instance of the FLV file "miles".
So here is the code now:
miles.addEventListener(VideoEvent.COMPLETE, replay);
function replay(e:VideoEvent):void {
miles.seek(0);
miles.play();
}
It is not working. The code error is:
1046: Type was not found or was not a compile-time constant: VideoEvent.
Source:
function replay(e:VideoEvent):void {
Please help and thanks.
-
missing video class
Hello,
I stumbled upon this post after searching for hours on the web with no success. Low and behold, this works like a charm! Well, after the following code is added in order to import in the video class so that the rest of the code will work:
All in all, you should have a layer on top of the layer with your flv on frame one that is called actions. Then, go clicking on frame one of the actions layer, go to the actions window and paste in this code:
Actionscript Code:
import fl.video.*;
miles.addEventListener(VideoEvent.COMPLETE, replay);
function replay(e:VideoEvent):void { miles.seek(0); miles.play(); }
You should be good to go! Thanks rynoe for the great solution.
Cheers!
-Llyfre
-
Thanks Llyfre and rynoe this works perfectly!!!! Yea!!!!
-
Oh blast! I had this working fine, walked away and came back a week later and now I'm running into trouble. I have an FLV instance on frame one named miles and I'm using the following code to make it loop:
import fl.video.*;
miles.addEventListener(VideoEvent.COMPLETE, replay);
function replay(e:VideoEvent):void {
miles.seek(0);
miles.play();
}
I pointed to the video file in the properties inspector so I'm sure it's linking properly, however I'm getting an error back about the videoEvent.COMPLETE and I can't figure out what I'm doing wrong, especially as the previous file I had this working in still works fine and when I copy it exactly into a new project it spits out the error.
1119: Access of possibly undefined property COMPLETE through a reference with static type Class.
Looking forward to getting this working again.....
-
CS 5.5 bug
So, I've read more and found others having this problem when moving from CS5 to CS5.5, which is my case exactly (despite the thread being about CS3!).
Anyway, I thought I'd post my workaround:
instead of use
Not sure why this works, but there you have it.
(Changing flashplayer from 10.2 to 10.1 also has been reported to solve the problem)
-Llyfre
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|