-
[AS3] Automatic load. photo/video
Yop,
i'm currently struggling with some AS3 code.
I'm using Flash because I have to... It's a school project where you must use it.
I'm posting in the newbies section because i don't really like Flash so I might use wrong words and expressions (and I'm French... Too much at the same time )
Finally, my code is FALSE, I'm sure about that.
Here's what I want to do :
- posting a SWF on my website, in this SWF there are :
- a simple "play button" that launches a video
- at the end of the video, a photo is load AUTOMATICALLY, and I want to add 5 buttons on it. One button will send the visitor to another video.
- the user watch the new video
- at the end, a new photo is load AUTOMATICALLY, and I want to add 5 new buttons on it. One button will send the visitor to another video
BLABLABLABLA
I've done lots of research and I think I have all the elements needed but I don't know how to put them all together to make it works.
Here's my code :
Actionscript Code:
import fl.video.FLVPlayback; import fl.video.VideoEvent;
var video1:FLVPlayback = new FLVPlayback(); video1.source = "video1.f4v"; video1.skin = "SkinOverPlayFullscreen.swf"; video1.skinBackgroundColor = 0x696969; video1.skinBackgroundAlpha = 0.5; video1.addEventListener(VideoEvent.COMPLETE, chgt1);
var photo = new Loader (); addChild(loader); loader.x = 200; loader.y = 20;
addChild(video1); video1.setSize(1080,720); video1.x = 8; video1.y = 8;
chgt.addEventListener(VideoEvent.COMPLETE, chgt1); function chgt1(evt:VideoEvent) { evt.target.play(); removeChild(video1); function photo1 { loader.load(new : URLRequest("photo1.jpg")); } addChild(photo1); }
When I launch it i have the "error 1084" at line 27.
Thx for all your help.
Nico
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
|