Below is some code I am writing to make a simple tech demo of what Flash CS5 can make for the iphone. Its a simple little accelerometer based app, that uses the accelerometer to move a green ball around the screen. I've been up for 29 hours straight (not working on this, but other things) and now I am getting errors. I need someone with experience to help me out here, and tell me what needs a fixin'. These are the errors I get: Scene 1, Layer 'action', Frame 1, Line 7 1086: Syntax error: expecting semicolon before colon. Scene 1, Layer 'action', Frame 1, Line 7 1086: Syntax error: expecting semicolon before colon. Scene 1, Layer 'action', Frame 1, Line 7 1086: Syntax error: expecting semicolon before colon. The numbers in front are line numbers f.y.i. 1. import flash.sensors.Accelerometer; 2. import flash.events.AccelerometerEvent; 3. 4. var acc:Accelerometer = new Accelerometer(); 5. acc.addEventListener(AccelerometerEvent.UPDATE, update); 6. 7. var tx:int = 0: 8. var ty:int = 0: 9. 10. function update(e:AccelerometerEvent):void 11. { 12. tx = e.accelerationX * 100; 13. ty = e.accelerationY * 100; 14. } 15. 16. this.addEventListener(Event.ENTER_FRAME, loop); 17. 18. function loop (e.Event):void 19. { 20. ball.x += ((ball.x + tx) - ball.x) * 0.3; 21. ball.y += ((ball.y - ty) - ball.y) * 0.3; 22. 23. } I figure it's a easy mistake to fix, but frankly I am too tired to understand what is going on, any help is greatly appreciated.
no shit.... @Rttam Read the second error code I recieved, thats the problem I am having. I do not understand wtf it's saying to alter. I followed a quick video explaining and showing some of the code, and my code matches the person in the video's code exactly....i just cannot seem to fix the error, without creating more syntax errors. And I did not explain the problem horribly, it was as clear as night and day. Here it is a again in case you missed it. I am getting these error codes each error code pertains to a specific line. The line in question at this point is line 18. It says this: "Scene 1, Layer 'action', Frame 1, Line 18 1084: Syntax error: expecting rightparen before dot." If you look in line 18 everything is just fine, the syntax of the code is the way it is supposed to be....I still cannot figure out the problem.
Yeah, a Google fanboy cuz I use their browser. What do you use when you're searching for the location of your nearest Chipotle, Yahoo! maps?