I just want to know how to make a solid wall in flash, so a say movieclip1 can't go through movieclip2. I've looked everywhere but can't find anything that explains the code properly.
You need to give an instance name to your Wall symbol so you can refer to it on the code
There are two options: one, actually block the Character, which is not very clever, and two, stop him from walking
So, let's say we have a variable "ICanWalkRight" to track if I can walk to the right or if there's a wall right in front of me, you don't actually have to be so specific tough
if (YourCharacter.hitTest(Wall)) { ICanWalkRight = false; }
This is just the concept tough, you can code something much nicer
Ok, from the start, let's declare the variable just for clarification
var ICanWalkRight = true;
Well, you just started the game, you should be able to walk Right
And let's say this is your code for walking right now, not actual code as you can see
When I press Right { Add 2 to MyCharacter._x }
And when you collide with a wall, you use the
if (MyCharacter.hitTest(Wall)) { ICanWalkRight = false; }
So, if you collide with a wall, it will turn the variable to false, now you just need to apply this variable state to the code for walking
When I press Right AND ICanWalkRight == true { Add 2 to MyCharacter._x }
To be honest, that wouldn't work, because you only have one movieclip to test both direction, so you'd also get a ICanWalkLeft = false if you had one, but then you could create invisible symbols inside your character, properly placed into the right or left side to detect proper collisions, like RightDetect
if (MyCharacter.RightDetect.hitTest(Wall)) { ICanWalkRight = false; }
And you would still have trouble because you would never be able to walk Right again after colliding, because ICanWalkRight would be false forever, except you did a negating code for it too