-
1. Re: Turning an object off and on.
Ned Murphy Nov 15, 2012 9:24 AM (in response to mentalcase129)To make an object visible/invisible you can either change its alpha property to 1/0 or its visible property to true/false.
If moving from section to section involves moving along a timeline then you need to either have variables that define the visible status of any such objects or you need to have these objects always present.
-
2. Re: Turning an object off and on.
mentalcase129 Nov 16, 2012 8:53 AM (in response to Ned Murphy)That's what I'm asking though. How do I set up those variables to either make that object physically appear, or raise the opacity after the corresponding item has been clicked? The navigation is around a timeline yes.
-
3. Re: Turning an object off and on.
Ned Murphy Nov 16, 2012 12:21 PM (in response to mentalcase129)If the object needs to be visible at all times after it becomes visible and you have designed on a timeline, then you need to make sure you place this object on a layer where it will always be present. As far as the code for it goes, it would be something like the following using terms from your description as names...
thatObject.visible = false; // this makes it invisible at the start
correspondingItem.addEventListener(MouseEvent.CLICK, showThatObject);
function showThatObject(evt:MouseEvent):void {
thatObject.visible = true;
}
-
4. Re: Turning an object off and on.
mentalcase129 Nov 27, 2012 8:57 AM (in response to Ned Murphy)That worked! Thanks for the help!
-
5. Re: Turning an object off and on.
Ned Murphy Nov 27, 2012 9:33 AM (in response to mentalcase129)You're welcome


