I’ve been having a bastard of a time lately learning flash, and yet again i have encountered a problem. In my background there is a part that should be in the front, but the characters walk on it right now. I would like to know if there is a way to select a part of a background and send it to the front, without having to crop the image or anything.
Use the function swapdepths…
It allows you to swap the depths of an object in the back to something greater…
flips through reference section to give you a clue…
You can use this in two ways…
mymovieclip.swapDepths(depth);
mymovieclip.swapDepths(target);
The first way… You specify a depth and it’ll change the depth to that… For your example you might wanna use something like 1000.
As for the target… You can change the depths between two movieclips… Say… Change the depth of the character with the depth of the background… That way the character will be in the background and the background is now a foreground
Hope this helps.
wut???
I have a background and i want to make just a small part of the background go to the foreground, is there a way to do that? i dont want to send the whole image to the foreground
if I understand what you want, then you need to make the part
of the bg to send forward as it’s own image. Then, where or
however you are going about this, place it in the appropriate
spot of your timeline. [button, main timeline, or action, etc]
Yeah… Just select that small area of the background and then bring it to the front…
If you are making a game from which it looks like it… I’d personally suggest this…
Make two layers… background and foreground… That’s 2 images… The background stays in back and the foreground stays in front… But sicne you did it the other way… You’ll have to crop it out.
how do u bring it to the front? The way i did it was by hitting arrange>bring to front. But my character still walks on top of the thing
oooooooo, i get it now, heres how I did it incase others are wondering. I cut the part of the BG that i wanted to go to the front, paste it in place as the top layer.