A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Very simple question, shouldn't take long to figure out (includes demo)

  1. #1
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129

    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.

  2. #2
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    So, can anyone help me? Does it have to do with layering?

  3. #3
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    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!
    Streets Of Poker - Heads-Up Texas Hold'em Poker Game

  4. #4
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    okay, i'll try that.

  5. #5
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    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.

  6. #6
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    post the fla or something, and we'll have a look
    Streets Of Poker - Heads-Up Texas Hold'em Poker Game

  7. #7
    Time Killer sspskater's Avatar
    Join Date
    Jun 2002
    Location
    Closer to u then u think
    Posts
    493
    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.
    A young mind is more knowledgable then a mind corrupted and blinded by society.

    Portfolio: My Portfolio
    FFGuardians:PHP MMORPG(Closed Beta)
    PyroWare Studios:PyroWare Studios-Flash&Web Development

  8. #8
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    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.

  9. #9
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    Put the textbox in an MC of it's own, and place the swapDepth on that MC...NOT IN ANOTHER MOVIECLIP...in the root
    Streets Of Poker - Heads-Up Texas Hold'em Poker Game

  10. #10
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    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.

  11. #11
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    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!
    Streets Of Poker - Heads-Up Texas Hold'em Poker Game

  12. #12
    Senior Member Kayol's Avatar
    Join Date
    Sep 2002
    Location
    Tanilla Village
    Posts
    129
    Okay thanks, I'm going to bed too, I got an exam in the morning.

  13. #13
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    Alright...good luck with the exams, the game and all nite nite...
    Streets Of Poker - Heads-Up Texas Hold'em Poker Game

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center