开发者

Flash actionscript 3.0 assigning the same code to multiple instances

开发者 https://www.devze.com 2023-02-14 13:51 出处:网络
im new to flash actionscript and i am trying to create a very simple game. in 开发者_JS百科this game i have about 50 walls that i want to stop the player if they collide with it. i cant figure out how

im new to flash actionscript and i am trying to create a very simple game. in 开发者_JS百科this game i have about 50 walls that i want to stop the player if they collide with it. i cant figure out how to assign the same code to multiple instants and im still fuzzy on alot of the terms flash programmers use but im learning. so if anyone could possibly post an example of assigning the same code to lets say 3 different instances that would be great and much appreciated.

on an unrelated note i am also having the player push the ball and when i add a collision.block to the ball when it hits the wall it goes right through it because of the ball repositioning itself based on the players location. any ideas on how to fix that would also be appreciated(sorry if the questions are a little vague i dont have the actual code with me its saved at school)


I think your best bet is to complete a flash game tutorial, it will teach you what you need to know about classes and objects, so that you will be able to solve this problem on your own.

Here are some excellent places to start:

AS3 tutorial using FlashDevelop and other free tools

AS3 tut using Flash IDE

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号