ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65...
Transcript of ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65...
![Page 1: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/1.jpg)
22-2
FLASH8
22-1
( < \ \ ch22 \ loading.swf> )
Flash Flash
![Page 2: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/2.jpg)
22-3
22
22-1-1 Flash swf
MovieClip getBytesLoaded() getBytesTotal ()
1. getBytesLoaded()
2. getBytesTotal ()
MovieClip
Math.round(this.getBytesLoaded()/this.getBytesTotal() * 100);
Math.round()
MovieClip _framesloaded _totalframes
1. _framesloaded
2. _totalframes
![Page 3: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/3.jpg)
22-4
FLASH8
22-1-2 <C:\morocco\loading.fla> (
< \ \ morocco \ loading.fla> <C:\morocco>
)
1 ~2 1
[ ] [ ] pctLoaded
Bar [ ] bar_mc
3 1 5
1~2
3
![Page 4: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/4.jpg)
22-5
22
actions
ActionScript
1. actions 1 [F9] [ ]
2. ActionScript
/ /
var pctLoaded = Math.round(this.getBytesLoaded()/this.getBytesTotal()*100);
pctLoaded
pctLoaded
![Page 5: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/5.jpg)
22-6
FLASH8
/ /
this.bar_mc._xscale = pctLoaded;
bar_mc
pctLoaded X
1. actions 2 [F9] [ ]
2. ActionScript
/ / 1 3
if (this._framesloaded<this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
1
[Ctrl] + [Enter]
1. [Ctrl] + [Enter]
2. [Ctrl] + [Enter]
![Page 6: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/6.jpg)
22-7
22
[Ctrl] + [Enter] [ ] \ [ ]
( < \ \ ch22 \ loading.fla>
)
[Ctrl] + [Enter] [ ] \ [
]
[ ] \ []
![Page 7: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/7.jpg)
22-8
FLASH8
22-2
Flash Flash HTML
Flash HTML JavaScript
( < \ \ ch22 \ index.html>
)
![Page 8: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/8.jpg)
22-9
22
22-2-1 Flash Flash getURL()
Flash
getURL
URL URL
getURL()
getURL (URL [, ][ , ]) ;
1. URL URL http://www.myserver.com/
2. HTML
(1) _self
(2) _blank
(3) _parent
(4) _top
3. GET POST
GET URL POST
HTTP
![Page 9: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/9.jpg)
22-10
FLASH8
Flash
1.
getURL("http://www.e-happy.com.tw , _blank )
http://www.e-happy.com.tw
2.
mailto:
getURL("mailto:[email protected] )
3. JavaScript Flash HTML JavaScript
JavaScript javascript:
HTML window.close()
Flash
getURL("javascript:window.close();");
HTML alert( )
Flash
getURL("javascript:alert( );");
JavaScript HTML
playMovie()
getURL("javascript:playMovie();");
![Page 10: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/10.jpg)
22-11
22
22-2-2 <c:\morocco\index.fla> (
< \ \index.fla> <c:\morocco> )
<index.fla>
<index.fla>
<index.fla>
[ ] [ ]
![Page 11: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/11.jpg)
22-12
FLASH8
<c:\morocco> <buttons.fla> <buttonMusic.fla> (
< \ \ ch13> <buttons.fla>
<buttons.fla> <c:\morocco> )
<index.fla>
1. [F9] [ ]
on (release) {
getURL("http://www.e-happy.com.tw", "_blank");
}
2. ActionScript
http:/ /www.e-
happy.com.tw
![Page 12: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/12.jpg)
22-13
22
1. [F9] [
]
2. ActionScript
on (release) {
getURL("mailto:[email protected]?subject= ");
}
mailto E-mail?cc=
mailto E-mail?bcc=
mailto E-mail+?body=
mailto E-mail?subject= &cc=&body=
![Page 13: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/13.jpg)
22-14
FLASH8
1. [F9] [
]
2. ActionScript
on (release) {
getURL("javascript:window.external.AddFavorite('http://morocco.e-happy.com.tw','
');");
}
window.external.AddFavorite( , );
22-2-3
.swf .html
[ ] \ [ ] [
] [ ]
Flash (.swf) HTML (.html)
[Flash] [HTML]
![Page 14: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/14.jpg)
22-15
22
Flash
[Flash]
Flash
Flash Player ActionScript
F l a s h P l a y e r 8
ActionScript 2.0
HTML
[HTML]
Flash
1. Flash
8
F l a s h
Player
2. [ ]
Flash
![Page 15: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/15.jpg)
22-16
FLASH8
[ ]
[ ] \ [ ]
.swf .html
JavaScript
HTML
![Page 16: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/16.jpg)
22-17
22
Flash
[Macromedia Flash Player ] [ ]
Macromedia Flash Player
Flash Player
Flash
IP Flash Player
![Page 17: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/17.jpg)
22-18
FLASH8
1. [Macromedia Flash Player ] [ ]
http://www.macromedia.com/support/documentation/tw/flashplayer/help/
settings_manager04a.html
2.
3.
![Page 18: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/18.jpg)
22-19
22
4. [ ] [ ]
[ ]
5. [
]
![Page 19: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/19.jpg)
22-20
FLASH8
< \ ch22 \ \ .fla>
1. [F9] [ ] ActionScript
on (release) {
getURL("http://www.e-happy.com.tw", "_blank");
}
![Page 20: ch22-1 - 碁峰資訊epaper.gotop.com.tw/PDFSample/ACU041800.pdf · 2006-08-28 · ch22-1.p65 Author: joanna_chiang Created Date: 8/28/2006 10:41:25 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042920/5f65b2d48987903a5215419f/html5/thumbnails/20.jpg)
22-21
22
2. [F9] [ ] ActionScript
on (release) {
getURL("mailto:[email protected]?subject= ");
}
3. [F9] [ ] ActionScript
on (release) {
getURL("javascript:window.external.AddFavorite('http://www.e-happy.com.tw','
');");
}
4. [ ] \ [ ] [ ]
(1) [ ] Flash (.swf) HTML (.html)
(2) [Flash] [ ] Flash Player 8 [ActionScript ]
ActionScript 2.0
(3) [HTML] JavaScript
FSCommand Flash
[ ]
5. .swf .html