Home > Default > Button Symbol and text change.

Button Symbol and text change.

November 30Hits:0
Advertisement
Hi,
I have a button symbol with an Instance name of myButton that
has a text field in it. The text field is dynamic and an Instance
name of myText.
I'm trying to change the text from a class I've created like
so...
myButton.myText.text = "Changed Text";
I'm getting this...
1119: Access of possibly undefined property myText through a
reference with static type flash.display:SimpleButton.
Can someone please tell me where I'm going wrong please.
Thanks in advance for any help.
Regards
Simon.

Answers

Is the TextField added in design time - that is you placed it
using the Flash IDE? In that case you might not be able to
reference it.
Rather you need to add it in a DisplayObject container during
runtime using the various SimpleButton state properties such as
downState and upState. See the example at SimpleButton doc.
SimpleButton

Read other 4 answers

Tags:

Related Articles

  • Button Symbol and text change.November 30

    Hi, I have a button symbol with an Instance name of myButton that has a text field in it. The text field is dynamic and an Instance name of myText. I'm trying to change the text from a class I've created like so... myButton.myText.text = "Changed Tex

  • GS-12: Creating button symbols | Learn Flash Professional CS5 & CS5.5 | Adobe TVOctober 11

    Create a button symbol from text, a bitmap image, or a vector shape. Define keyframes for the up, over, down, and hit states of the button, and swap out the artwork for the different states. http://adobe.ly/AsOppxI am watching the tutorial over "crea

  • Blurry Bitmap text (no anti-alias) on Button SymbolsNovember 30

    Hello, Can someone please explain when making a button symbol using Arial then exporting as an .swf why the font exports blurry and not sharp? Thanks.first, do you have alias text on or off in the property window? second are you scaling the button, t

  • Embedding Button symbol from swfOctober 11

    Hi, I am embedding a Button Symbol into Flex from from a swf. The Button inside the swf has an up and over state. Now I embed the symbol into an image in Flex. The image is in one of my states. All works fine initially  in Flex as far as the up over

  • Button Symbol Editting ModeNovember 30

    I am new to Flash CS4 and have been practicing creating buttons. I am using a JPEG image for the actual button. The image changes color and size depending on the up state or down state or over state. Everything looks exactly as I want it but now I wi

  • How do you grey out a radio button if a text field is blank in Adobe Acrobat XI Pro?October 11

    How do you grey out a radio button if a text field is blank in Adobe Acrobat XI Pro? So this what I'm trying to do: (     )   |TEXT FIELD| (     )   |TEXT FIELD| (     )   |                  | (     )   |TEXT FIELD| I have a radio button: (     ) and

  • Symbol and Text Substitution not working correctlyOctober 11

    Hello, in „Language & Text" I have the following symbol and text substitutions enabled, which aren't working in Pages version 5.1.1 (iMac 2011, Yosemite 10.10.1): „- - >" (written without blank space between the characters) which should b

  • Button to copy text to the clipboardOctober 11

    Reading the document "Javascript for Acrobat API Reference" Page 120: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf the document discusses the execMenuItem command. From all that I have researched it appears

  • JSAPI: How can I edit a button symbol?October 11

    Hi, I have written an export script for Flash CS3 using the Javascript API, and now I want to port it to Fireworks CS3. The first problem I ran into was that I could not access a button symbol's state frames via script - the closest I get is up to th

  • Linking a radio button to a text field in a pdf formOctober 11

    Forgive my ignorance but does anyone know how to link a radio button to a text field in an Acobat pdf form? I have a series of 4 radio buttons. If you click on one of them I would like to activate a text field which you then have to fill in. In addit

Copyright (C) 2017 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.209 s.