This content has been marked as final. Show 3 replies
either stop hiding things off screen, or make the things off screen invisible. by setting their _alpha = 0; or move them further off screen like 10000 pixels!
mclem is mostly right.
Either don't put things there or don't show them when they are there.
Setting _alpha to zero is not a great choice, because if you have mouse events attached to clips they will still activate the hand pointer. If you go this route you might want to use MyClip._visible=false instead.
Also with positioning way far away, you might end up with another problem. Flash only gives each clip a range of about 16,000 pixels. So if something is -8000 one side of the stage and something else goes past 8000 on the other side your program might lose track of the item or it might apear distorted in the center of the stage, or who know what. I've mostly run into this with people trying to use the drawing API, but also the occassional lost movie clip question does pop up.
Another trick is to mask the main stage area. However masks are a drain on system resources so you might take too much of a performance hit with that approach.
Or you can design a "drape kit" like that around the edge of an actual stage. Some fance marignal artwork with a whole cut out in the front. Just make sure it is on your top layer or attached by code onto a very high depth.
Or you can write liquid code that uses Systems.capabilities to determine the size of the screen and then just makes everything go where it needs to go.
So many choices and combinations of choices.
Thanks to both of you!
I've worked with what Rothrock calls a "drape kit" before also with or _visible = false. I just had hoped there would be a more "elegant" solution.