-
Senior Member
Very simple question, shouldn't take long to figure out (includes demo)
Okay, I have this project where a character is moveable and when you move to the sign in the (so called game), a textbox appears and is done exactly like that of Ed Mac's tut on PA ststems or textboxes for artbased rpgs.
Problem is the textbox appears under the solid objects mc blocking off most of the text box. I tryed moving the textbox from the non-solid objects movieclip to the solid objects movieclip and it acts as a invisiable object stopping the moveable character from venturing on.
I even tryed placing the textbox just on the stage (not in either solid nor solid objects movieclips) although the textbox wouldn't appear at all when I did that.
What should I do to fix this problem?
Note: due to the hittest you have have to approach the sign from the right.
Demo
Ed Mac's Tut
Last edited by Kayol; 01-20-2003 at 08:14 PM.
-
Senior Member
So, can anyone help me? Does it have to do with layering?
-
Elvis...who tha f**k is Elvis?
Hmm...well, it seems to be a depth problem! When you attach the objects you attach them at a certain depth, and when you just place it on stage it will end up underneath the background! Try giving the textbox MC (if it's an MC) a this.swapDepths(9999999); command!
-
Senior Member
-
Senior Member
ah, that didn't seem to do anything. Is there anything else I could do? BTW I fixed the swf file for those that tryed it while I was playing around with advance preloaders, all motion stopped at that time for some reason.
-
Elvis...who tha f**k is Elvis?
post the fla or something, and we'll have a look
-
Time Killer
It's the depth problem like phreax said. Easy way to fix this. Copy the textbox, delete it, then paste it back on the frame now it will be on top of the building.
-
Senior Member
Actually copying and pasting in this case won't fix the problem. It does have something to do with the swap depth though. You see, the solid objects are in one mc & the land pieces that you can walk over are in a mc located under the solid objects mc. The text box is in the non-solid mc which means your not blocked off by an invisiable textbox but the house being a solid object and the solid objects being on top means the textbox displays beneath the house and other solid objects.
how do I make the textbox have its own swap depth then? That way its displayed over the solid objects?
So, it would look like this:
- Textbox mc (top)
- solid objects mc (middle)
- non-solid objects mc (under everything)
If I just increased the swap depth on the non-solid mc where the textbox is located then it would put all the land overtop and all the solid objects including the moveable character would be hidden.
Solid Textbox is not good either because its like a wall if you paste the textbox there.
Textbox in its own mc doesn't seem to work because it won't display the textbox nor well it if you have a textbox within a new mc like the solid & non-solid objects.
So, anyone have anymore ideas?
Last edited by Kayol; 01-20-2003 at 11:38 PM.
-
Elvis...who tha f**k is Elvis?
Put the textbox in an MC of it's own, and place the swapDepth on that MC...NOT IN ANOTHER MOVIECLIP...in the root
-
Senior Member
Okay, that worked thanks. Sorry it took so long for me to get it and btw how do you make the player stop moving during the time that the textbox is open?
Last edited by Kayol; 01-20-2003 at 11:46 PM.
-
Elvis...who tha f**k is Elvis?
You could have a variable check to see if it's alright to move like:
if(Key.isDown(Key.LEFT) && _root.move){
//move the guy
}
and in the textbox MC set _root.move to false when you don't want him to move, and true when you do want him to move It's a dirty job but someone's got to do it! ...ok, ok I'm just a bit too tired...it's 5 am here!
-
Senior Member
Okay thanks, I'm going to bed too, I got an exam in the morning.
-
Elvis...who tha f**k is Elvis?
Alright...good luck with the exams, the game and all nite nite...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|