-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathVideoImage.as
More file actions
48 lines (38 loc) · 1000 Bytes
/
VideoImage.as
File metadata and controls
48 lines (38 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package darkBox
{
import videoPlayer.myVideoPlayer;
public class VideoImage extends DefaultImage
{
private var videoPlayerMC:myVideoPlayer ;
public function VideoImage()
{
super();
videoPlayerMC = Obj.findThisClass(myVideoPlayer,this);
}
override public function show(target:String=''):void
{
super.show();
try
{
this.removeChild(videoPlayerMC);
}catch(e){};
videoPlayerMC = new myVideoPlayer();
this.addChild(videoPlayerMC);
videoPlayerMC.width = rect.width;
videoPlayerMC.height = rect.height;
videoPlayerMC.scaleX = videoPlayerMC.scaleY = Math.min(videoPlayerMC.scaleX,videoPlayerMC.scaleY);
videoPlayerMC.x = (rect.width-videoPlayerMC.width)/2;
videoPlayerMC.y = (rect.height-videoPlayerMC.height)/2;
myVideoPlayer.playeMyVideo(target);
}
override public function hide():void
{
super.hide();
try
{
myVideoPlayer.close();
this.removeChild(videoPlayerMC);
}catch(e){};
}
}
}