:
onClipEvent (enterFrame)
_ x ;
_ y ;
_xscale ;
_yscale ;
_height ;
_width ;
_alpha ( 0 100);
_rotation ;
_ visible (true , false - ).
hitTest(x, y, flag) - . x y , flag true false.
startDrag() .
stopDrag() .
, - , .. . 2 : (callback) (listener).
, , , :
this. onMouseDown = function()
{,
}
, .. , .
(, onEnterFrame) . delete.
: delete this. onMouseDown;
, , .
( addListener()) , ( removeListener()) , .. , ( ).
:
//
var listen: Object = new Object();
//
listen. onMouseDown = function() { trace(0);}
//
Mouse.addListener(listen);
( Mouse)
_ xmouse _ ymouse. . .
2 Mouse: hide() show().
( Key)
getCode(), ASCII- . String.fromCharCode(a), a ASCII- .
: ASCII-.
|
|
var kl:Object = new Object();
kl.onKeyDown = function()
{ trace(String.fromCharCode(Key.getCode());
trace(" = ");
trace(Key.getCode());}
Key.addListener(kl);
: t1
kl = new Object();
kl.onKeyDown = function()
{
t1=String.fromCharCode(Key.getCode()));
}
Key.addListener(kl);
isDown(a), true false, Key, , , Key. ENTER, Key. LEFT, Key. RIGHT, Key. UP, KeyDOWN ..
: 5 .
this.onEnterFrame = function(){
if(Key.isDown(Key.DOWN))
{
._y+=5;
} }
Sound (): var mySound: Sound = new Sound();
, 2 :
attachSound() , ;
loadSound () .
:
start(a, b) ; , b ;
stop() ;
setPan() ;
getPan() ;
getVolume() ;
SetVolume() .
: 2- - ( stop) ( play). . Library Export for ActionScript - sound1.
var mys:Sound = new Sound();
mys.attachSound("sound1");
play.onPress = function()
{
mys.start(5,1);
}
stop.onPress = function()
{
mys. stop();
}
- . - , -. - ActionScript (, stop(), play() ..), .
Components (window-> Developments panels-> components) 3 :
data components ;
media components ;
UI components .
components (). , .
properties (), component inspector ( ). ActionScript.
|
|