Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 06-03-2009, 02:01 PM   #1
Registered User
Join Date: Feb 2009
Posts: 3
Default A button that shows text when clicked

The idea is to make a button that looks like an icon that shows a few lines of text near it whenever it is clicked. It is sort of like tooltip, but the text is more elaborate. Please say how it is done?.

Here are my attempts ... they were not successfull..

ActionScript Code:
<mx:Image x="134" y="184" source="file:///D|/Info.png" scaleContent="true" width="8" height="8"         click="clicked()"/>     <mx:Script>                 <![CDATA[                         private function clicked():void {                                 label = "clickedclickedclicked";                                 b2.toolTip = "toolTip toolTip kedclicked";                                                         }                                                  private function showtext(event:Event):void                          {                                 label = "showtext";                         }                         private function handleImageClick(event:Event):void                         {                             //icony.label = "handleImageClickhandleImageClick";                             icony.toolTip = "handleImageClickhandleImageClick";                         }                                                                  [Bindable]                     [Embed(source="Info.png")]                     private var myIcon:Class;                    ]]>                         </mx:Script> <mx:Image source="{myIcon}" useHandCursor="true" buttonMode="true" click="handleImageClick(event)"     toolTip="A Red Button"  id="icony"/>         <mx:Button label="" id="b2" toggle="true" x="82" y="82" scaleX=".5" scaleY=".5"     color="0xFFFFAA" textRollOverColor="0xAAAA55" textSelectedColor="0xFFFF00" click="showtext(event)"/>        <mx:Style>         Button         {             upSkin: Embed("Info.png");             overSkin: Embed("Info.png");             downSkin: Embed("Info.png");         }     </mx:Style> <mx:Button />
windec is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i return a button to its normal state when another button is clicked? Hillyhi11s Simple Stuff (Newbies) 5 03-20-2007 09:22 PM
make button gotoAndPlay when another button is clicked tannermorrow ActionScript 2.0 7 12-01-2006 02:07 PM
Unable to name the text field for a movieClip button fletchsod ActionScript 2.0 2 03-08-2005 09:12 PM
Movieclip plays - despite condition! visualizer29 ActionScript 1.0 (and below) 2 06-17-2004 05:29 PM
If anyone's bored, a custom class . . . retrotron ActionScript 1.0 (and below) 22 05-24-2003 10:01 PM

All times are GMT. The time now is 11:37 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.