Simple (hopefully) Linkage Problem
alright, i'm pretty muhc new as3 despite programming bit in as2 , java, , i'm having frustrating sort of problem.
package
{
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.utils.gettimer;
public class game extends movieclip
{
private var leftarrow:boolean=false;
private var uparrow:boolean=false;
private var rightarrow:boolean=false;
private var downarrow:boolean=false;
private var char:box = new box();
char.x = 100;
char.y = 100;
addchild(char);
}
}
on stage have movie clip named box of class box. instance name mybox.
everytime (no matter how struggle) these 4 errors:
line 14 1120: access of undefined property char.
line 15 1120: access of undefined property char.
line 16 1180: call possibly undefined method addchild.
line 16 1120: access of undefined property char.
oh , here's
line 14 char.x = 100;
line 15 char.y = 100;
line 16 addchild(char);
strangely enough no problem declaration line.
help appreciated (since can't until past >_>)
More discussions in ActionScript 3
adobe
Comments
Post a Comment