Changing text without changing frames.

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Changing text without changing frames.

    I have a small flash movie that is basically a color chooser. Rather than
    changing the color of an item by putting the color in a frame I change and
    instance by using the following actionscript:

    on (release) {
    // Code that changes the color of the shirt
    myColor = new Color(_root.shirtColor);
    myColor.setRGB(0x484C55);
    }

    What I need to do now is change a text value in the same manner. I have a
    color say blue, and one say real blue. well when I click the button the
    colors change as necessary BUT I would like a label to come up with it. So
    What I would like to do is put a label below the color box and have that
    label change to the name the the color that is chosen. Is this possible? I
    have used dynamic text in the past with an external .txt file but never
    anything that changes by a button.

    Thank you for any help.

    Jose


    Jose Olivas Guest

  2. Similar Questions and Discussions

    1. Changing text color between threaded text frames
      I'm having trouble figuring out how to change the text color (not manually) between two threaded text frames. Here's the scenario: Page 1 has a...
    2. Changing text on asp-label
      Is it possible to change the text in a label from english to german like cultureinfo in Visual studio? regards reidarT
    3. changing a text members text content with lingo
      Is there a way of setting the content of a text member through lingo, specifying where there should be Carriage Return. I have a director movie...
    4. Changing Text
      I have Photoshop 4.0 and all I want to do is change the text in a layer. Is this possible? Thank you for any help
    5. Click on Nav Bar changing content of two frames
      Happy: There is a solution for this, but you won't like it. Don't use frames. Really. http://apptools.com/rants/framesevil.php If you...
  3. #2

    Default Re: Changing text without changing frames.

    This is certainly possible. You will need to give the dynamic text field
    a instance name. I'll call it "myColorText" for the sake of example.

    Then in your code wherever you want to change what the dynamic text says
    you would add a line of code like the following.

    myColorText.text = "stuff I want the text to display";

    If you want it to instead refference a variable you could assign it as
    so where myMessage is the name of the variable.

    myColorText.text = myMessage;

    --
    Brandon Bradley
    Macromedia Certified Instructor
    [url]http://www.attconline.org/[/url]
    Brandon Bradley Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139