Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Flash MX-Why dont my code work?

(60 views • 4 replies)

This topic is 1 page long.

<< < > >>
blacklightproduction EVIL LEVEL 04

Sign-Up: 12/13/07

Posts: 104

I kinda gave up on my last game for no hit detection code would work but I started a brick breaking game and this code isnt working right:
----------------------------------------
---------------------
onClipEvent (load) {
}

tellTarget (_root._root.ball) {
_x -= 10;
_y -= 10;
}

----------------------------------------
----------------------------------------
--------------------
The ball that breaks the bricks instance name is ball but I get this message
----------------------------------------
------------------------
Symbol=Symbol 5, Layer=Layer 1, Frame=1: Line 4: Statement must appear within on/onClipEvent handler
tellTarget (_root._root.ball) {
----------------------------------------
----------------------------------
I can determine whats wrong with it and I will not give up on a game so simple.
Thanks

Thanks to PyroflameProductions for the banner

BBS Signature

None

McTony

Reply To Post Reply & Quote

Posted at: 6/21/08 07:59 AM

McTony DARK LEVEL 05

Sign-Up: 05/09/08

Posts: 42

this is what i think it means : ur code needs to be within ur clipeventhandlers, so try this code :

onClipEvent (load) {

tellTarget (_root._root.ball) {
_x -= 10;
_y -= 10;
}
}

DeviantArt -- noh, there are no weapons off mass destruction in Iraq, Chuck Norris lives in Oklahoma -- Homepage


None

Greensinge

Reply To Post Reply & Quote

Posted at: 6/21/08 08:01 AM

Greensinge LIGHT LEVEL 11

Sign-Up: 04/27/03

Posts: 481

I'm not sure if it's the same problem entirely, but if you refer to this thread which I started last night, you might find an answer to the problem. I did! :)

Good luck!


None

Archon68

Reply To Post Reply & Quote

Posted at: 6/21/08 10:07 AM

Archon68 DARK LEVEL 13

Sign-Up: 09/09/07

Posts: 754

Are you trying to make it move EVERY FRAME or just once, on the LOAD of the movie? Try putting it in a OnClipEvent(enterFrame) statement.

Archon68
You don't stand a chance against me in CoD4.
-PS3 Gamertag is Archon68

BBS Signature

blacklightproduction EVIL LEVEL 04

Sign-Up: 12/13/07

Posts: 104

I want it on one frame at a time see its on different levels:
after you destroy all the bricks it shows the points,ect. frame then you go on to the next level.
its not excatly on every frame its just on one frame every two frames for if you go out of bounds *thats the code to where if it goes out of bounds* past the paddle three times you get the 'You Lose' page.

Thanks to PyroflameProductions for the banner

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 02:45 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!