Copy link to clipboard
Copied
How do I get a function to collect a movieclip object, doing that after I catch it, it disappears from the scene ... but can be manufactured again, maybe from a clash between different object?
For example: I picked up the object, disappears from the site. When this same object touching a particular location it back to a position + =% visible, have to be collected again.
The most important topic is how can I make the object disappear when I pick up, and show up when it rings at another secondary object.
Thank you.
The number of frames has no bearing on the approaches I suggested. In fact, those suggestions would need to occur in just one frame so you don't need to change anything in that regard.
Your explanation of when things disappear or not is not clear, but if touching the object that is supposed to disappear is necessary then you probably only want to change the alpha property from 0 to 1 and vice versa. An invisible object cannot be interacted with but one that has its alpha set to 0 can be.
Copy link to clipboard
Copied
One way would be to switch its visible property between true (visible) and false (not visible). Another way would be to remove the object from the display list (removeChild) and then either add it back in, (addChild) or create a new instance of it. If there is only going to be one of these objects at any time then you are likely better off just have the one and playing with its appearance.
Copy link to clipboard
Copied
But my project takes place in a single frame.
Let's say I create a square and put his name mast, and the object that should go away when a character starts. Should he take the object disappears, and when it touches the mast returns visibility.
Copy link to clipboard
Copied
The number of frames has no bearing on the approaches I suggested. In fact, those suggestions would need to occur in just one frame so you don't need to change anything in that regard.
Your explanation of when things disappear or not is not clear, but if touching the object that is supposed to disappear is necessary then you probably only want to change the alpha property from 0 to 1 and vice versa. An invisible object cannot be interacted with but one that has its alpha set to 0 can be.
Copy link to clipboard
Copied
But woe if I would have to use code to set the value of alpha? Because the only way I use this function is the object of the menu at the top right side.
Copy link to clipboard
Copied
You set the alpha value by setting it to equal 1 (opaque) or 0 (transparent)
mast.alpha = 0; // can't see it
mast.alpha = 1; // fully visible
Find more inspiration, events, and resources on the new Adobe Community
Explore Now