Atribute outside the class ? anyone help ?
Hello My name is Steven , can anyone help me how can i deal with this stuff ?
Here is the code that show error atribute outside the class, bla bla bla and total of 4 error including error syntax, etc
package batrai_fla {
import flash.display.*;
public dynamic class Battery_3 extends movieclip {
public var pick:movieclip;
public function Battery_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package batrai_fla
package batrai_fla {
import flash.display.*;
public dynamic class lamp_1 extends movieclip {
public var pick:movieclip;
}
}//package batrai_fla
?package batrai_fla {
import flash.events.*;
import flash.display.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends movieclip {
public var b:movieclip;
public var l:movieclip;
public var lNempel;
public var nempel;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function cekTempel(_arg1:MouseEvent){
if ((((b.x == l.x)) && ((b.y == l.y)))){
} else {
b.gotoandplay(2);
nempel = !(nempel);
lNempel = false;
};
}
function frame1(){
nempel = false;
lNempel = false;
stage.addEventListener(Event.ENTER_FRAME, main);
b.addEventListener(MouseEvent.MOUSE_DOWN, cekTempel);
l.addEventListener(MouseEvent.MOUSE_DOWN, cekTempel2);
}
public function cekTempel2(_arg1:MouseEvent){
if ((((b.x == l.x)) && ((b.y == l.y)))){
} else {
nempel = false;
lNempel = !(lNempel);
};
}
public function main(_arg1:Event){
if (nempel == true){
b.pick.alpha = 1;
b.x = ((math.ceil((mouseX / 50)) * 50) - 25);
b.y = ((math.ceil((mouseY / 50)) * 50) - 25);
} else {
b.pick.alpha = 0;
};
if (lNempel){
l.pick.alpha = 1;
l.x = ((math.ceil((mouseX / 50)) * 50) - 25);
l.y = ((math.ceil((mouseY / 50)) * 50) - 25);
} else {
l.pick.alpha = 0;
};
if ((((((((((((l.y == 75)) && ((l.x == 275)))) && ((b.y == 325)))) && ((b.x == 225)))) && (!(nempel)))) && (!(lNempel)))){
l.gotoandstop(2);
} else {
l.gotoandstop(1);
};
}
}
}//package batrai_fla
SO I WANT TO MAKE >> WHEN I MOVE THE BATTERY PER 50X50 PX EVERY ONE MOVE AND WHEN I PUT THE BATTERY AND THE LAMP INTO RUGHT PLACE, THE LAMP IS ON, PLEASE TELL ME WHERE IS MY FAULT ? THX
