re-added file
[swftools.git] / doc / examples / player.sc
1 .flash version=6 fps=50 name="player.swf" bbox=800x600
2
3     .swf filetoplay "cxform.swf"
4     .put filetoplay
5
6     .action:
7         filetoplay.Stop();
8         Stop();
9     .end
10
11     .gradient gblue:
12         0% #4040ff
13         25% #8080ff
14         50% #c0c0ff
15         75% #8080ff
16         100% #4040ff
17     .end
18
19     .gradient ggreen:
20         0% #40ff40
21         25% #80ff80
22         50% #c0ffc0
23         75% #80ff80
24         100% #40ff40
25     .end
26
27     .gradient gcyan:
28         0% #40ffff
29         25% #80ffff
30         50% #c0ffff
31         75% #80ffff
32         100% #40ffff
33     .end
34
35     .outline arrowoutline:
36         moveTo -30,-10
37         lineTo -30,10
38         lineTo    0,10
39         lineTo    0,20
40         lineTo  30,0
41         lineTo    0,-20
42         lineTo    0,-10
43         lineTo -30,-10
44     .end
45     .outline stopoutline:
46         moveTo -20,-20
47         lineTo -20, 20
48         lineTo  20, 20
49         lineTo  20,-20
50         lineTo -20,-20
51     .end
52     .outline pauseoutline:
53         moveTo -20,-20
54         lineTo -20, 20
55         lineTo -4, 20
56         lineTo -4,-20
57         lineTo -20,-20
58
59         moveTo  20,-20
60         lineTo  20, 20
61         lineTo  4, 20
62         lineTo  4,-20
63         lineTo  20,-20
64     .end
65
66     .filled arrow_blue outline=arrowoutline fill=gblue line=3 color=blue
67     .filled arrow_green outline=arrowoutline fill=ggreen line=3 color=green
68     .filled arrow_cyan outline=arrowoutline fill=gcyan line=3 color=cyan
69     
70     .filled stop_blue outline=stopoutline fill=gblue line=3 color=blue
71     .filled stop_green outline=stopoutline fill=ggreen line=3 color=green
72     .filled stop_cyan outline=stopoutline fill=gcyan line=3 color=cyan
73     
74     .filled pause_blue outline=pauseoutline fill=gblue line=3 color=blue
75     .filled pause_green outline=pauseoutline fill=ggreen line=3 color=green
76     .filled pause_cyan outline=pauseoutline fill=gcyan line=3 color=cyan
77
78     .button leftbutton
79         .show arrow_blue as=area,idle scalex=-100% alpha=50%
80         .show arrow_green as=hover scalex=-100%
81         .show arrow_cyan as=pressed scalex=-100%
82         .on_release inside:
83             filetoplay.gotoAndStop(1);
84         .end
85     .end
86     
87     .button stopbutton
88         .show stop_blue as=area,idle alpha=50%
89         .show stop_green as=hover alpha=50%
90         .show stop_cyan as=pressed alpha=50%
91         .on_release inside:
92             filetoplay.Stop();
93         .end
94     .end
95
96     .button pausebutton
97         .show pause_blue as=area,idle alpha=50%
98         .show pause_green as=hover alpha=50%
99         .show pause_cyan as=pressed alpha=50%
100         .on_release inside:
101             filetoplay.Stop();
102         .end
103     .end
104
105     .button rightbutton
106         .show arrow_blue as=area,idle alpha=50%
107         .show arrow_green as=hover alpha=50%
108         .show arrow_cyan as=pressed alpha=50%
109         .on_release inside:
110             filetoplay.Play();
111         .end
112     .end
113   
114     .sprite overlay:
115         .put leftbutton x=35 y=25
116         .put stopbutton x=105 y=25
117         .put pausebutton x=175 y=25
118         .put rightbutton x=245 y=25
119     .end
120
121
122 .end