Upload
thaerna
View
212
Download
0
Embed Size (px)
Citation preview
7/24/2019 01 - Basic Website using Flash and Actionscript
1/5
CREATING A BASIC FLASH
WEBSITE
website
preloader.
goto().
SETTING UP THE MO VIE ANDTIMELINE
, ActionScript3.0,
550x400 12 fps background.
Layer Layers. :
G RAPHICS
Layer
frame 2 frame preloader
frame Layer preloader
Layer .
7/24/2019 01 - Basic Website using Flash and Actionscript
2/5
PRELOADER
preloader, animation
Loading., frame1 LayerContent
TextToolLoading . LayerActions
Actions
Frame :
stop();this.addEventListener(Event.ENTER_FRAME, loading);function loading(e:Event):void
{var total:Number = this.stage.loaderInfo.bytesTotal;var loaded:Number = this.stage.loaderInfo.bytesLoaded;
if (total == loaded)
{
play();this.removeEventListener(Event.ENTER_FRAME, loading);}
} Preloader
frame
stop().
bytes swf.
.
eventListener,
. EventListener
Timeline .
loading.
Flash Enter_Frame
Frame. frame, ,
bytes
play(),
EventListener.
BUTTONS AND BAC KG RO UND
Layer Background,
background.
7/24/2019 01 - Basic Website using Flash and Actionscript
3/5
Layer Buttons and Tiles, ,
Components User Interface > Button Component
:
.
Properties Panel
Label :
.
7/24/2019 01 - Basic Website using Flash and Actionscript
4/5
WEBSITE C ONTENT
Layer content keyframes
.
frame:
About:
frame
,
:
7/24/2019 01 - Basic Website using Flash and Actionscript
5/5
AC TIONS
keyframe LayerActions actioneditor,
Timeline.
EventListener
,
:
stop();home_btn.addEventListener(MouseEvent.CLICK, goHome);
function goHome (e:MouseEvent):void
{gotoAndStop("Home");}
GotoAndStop timeline
GotoAndPlay frame Play()
frame . :
stop();
function goHome (e:MouseEvent):void
{
gotoAndStop("Home");
}
home_btn.addEventListener(MouseEvent.CLICK, goHome);
function goAbout (e:MouseEvent):void
{
gotoAndStop("About");
}
about_btn.addEventListener(MouseEvent.CLICK, goAbout);
function goLinks (e:MouseEvent):void
{
gotoAndStop("Links");
}
links_btn.addEventListener(MouseEvent.CLICK, goLinks);
function goContact (e:MouseEvent):void
{
gotoAndStop("Contact");
}
contact_btn.addEventListener(MouseEvent.CLICK, goContact);
events: