[gameprogrammer] Re: Flash question
- From: "Yasser Gonzalez Soto" <yassergs@xxxxxxxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Tue, 30 Jun 2009 09:27:20 +0200
Make a MovieClip containing teh text taht you want to display. Name it and
make it accesible to the script. Put the clip-with-text on the stage and
insert something like this:
onClipEvent(enterFrame)
{
this._visible=_root.bShow;
}
Go to the first frame on the main stage and put this:
onLoad=function()
{
bShow=0;//Boolean type variable
}
//Let´s supose that your text button´s name is btnText
btnText.onRelease=function()
{
bShow=!bShow;
}
Each time you click the button bShow variable will switch between 0 and 1.
And that should make the message text appear and dissapear.
I going to do this example later and going to send the file with the code
----- Original Message -----
From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Tuesday, June 30, 2009 6:41 AM
Subject: [gameprogrammer] Flash question
Anyone know flash? I have a text button on a screen that says "What is
this?" When the user clicks the button I want to show a little box with
some text. When they click again the box should go away.
So far I tried creating a symbol to show and hide it, but I can't seem to
give a graphic symbol an instance name to refer to it by.
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
Other related posts: