| |
|
Welcome to AstaHost - Dear Guest | |
Replying to Flash Animation
Topic Summary
HannahI
Posted 08 November 2009 - 01:26 AM
HannahI
Posted 03 November 2009 - 08:11 PM
jonnahlynb29e
Posted 06 October 2009 - 05:02 PM
i have 6 frames.... the 1st frame has an action w/c calls/play the remaining frame depending w/c button they click let say button1 and so on.... here's my action for frame4
------------------------------------------------------------------------------------------->> here's my problem ...
1. ) the keyListener won't work not until i click on the interface.
2. ) can't add a child with sprite in frame 4...it doesn't show and when i click back button error occurs...
error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at BlockBox12_fla::MainTimeline/frame1()
at flash.display::MovieClip/gotoAndPlay()
at BlockBox12_fla::MainTimeline/backnClick()
----------------------------------------------------------------------------------------------//here's my code
stop();
import flash.events.KeyboardEvent;
import flash.display.Sprite;
//keycodes
var left:uint = 37;
var up:uint = 38;
var right:uint = 39;
var down:uint = 40;
var tempX:int = 1335;
var tempY:int = 2370;
//-----------------------------------------------------------------------i believe this have something to do with #2 error
var clockFace:Sprite = new Sprite();
clockFace.gra
phics.drawCircle(200, 200, 50);
clockFace.graphics.beginFill(0x0190ff);
addChild(clockFace);
//-----------------------------------------------------------------------
back_btn.addEventListener(MouseEvent.CLICK, backnClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);
function backnClick(event:MouseEvent):void
{
//trace("button clicked!");
gotoAndPlay("main");
}
function keyDownListener(e:KeyboardEvent) {
if (e.keyCode==left){
if( _student.x >= 350){
_student.x-=5;
trace("student.x is >= 350");
}
else if( tempX >=330 ){
bg_scroll.x+=5;
}
else if(_student.x <= 0){
_student.x = _student.x;
tempX+=5;
}
_student.x-=5;
tempX-=5;}
if (e.keyCode==up){
if( _student.y >= 250){
_student.y-=5;
}else if( tempY >= 355 ){
bg_scroll.y+=5;
}else if(_student.y <= 0){
_student.y = _student.y;
tempY+=5;}
else
_student.y-=5;
tempY-=5; }if (e.keyCode==right){
if( _student.x < 350){
_student.x+=5;
}else if( tempX+500 <= bg_scroll.width){
bg_scroll.x-=5;
}else if(_student.x + _student.width >= 800){
_student.x = _student.x;
tempX-=5;
else
_student.x+=5;
tempX+=5; }if (e.keyCode==down){
if( _student.y < 250){
_student.y+=5;
}else if( tempY + 265<= bg_scroll.height){
bg_scroll.y-=5;
}else if(_student.y + _student.height >= 595){
_student.y = _student.y;
tempY-=5; }else
_student.y+=5;
tempY+=5;} }
grim reaper1666
Posted 12 September 2009 - 01:30 PM
FirefoxRocks
Posted 06 September 2009 - 03:14 PM
http://alanbecker.de...mation-34244097
I don't need very specific details but I would like to know the skill level required, the estimated number of keyframes, any various techniques used and a general outline of what they done.



