resize text field on scale...

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

  1. #1

    Default resize text field on scale...

    This seems to be a tricky subject... Well maybe not trick or hard but I sure
    haven't seen a good tutorial on it.


    This is the situation: I have a movie with a text box, "logo" is the instance
    name.
    My HTML has the scale set to "Exact Fit" and the width = 100%

    now this is the code I have:
    [Q]Stage.scaleMode = "exactfit"
    Stage.align = "TL";
    setProperty("logo",_width, 265);
    setProperty("logo",_height, 31.5);
    myListener = new Object();
    myListener.onResize = function () {
    //resize background picture here
    setProperty("logo",_width, 265);
    setProperty("logo",_height, 31.5);
    }
    Stage.addListener(myListener);[/Q]

    did I do something wrong?

    Papa Rabbit Guest

  2. Similar Questions and Discussions

    1. can't scale object or text box with selection tool
      I must have changed a setting unknowingly. I can no longer scale objects or text boxes with my selection tool. When I select the box there are no...
    2. Cannot resize objects in CS with pointer. Possible with "scale" tool.
      Whenever I have an object ( box, picture, anything) I cannot resize it with my pointer anymore. It happened all of a sudden. I was working with a lot...
    3. Move/Resize/Scale/rotate component
      Hi, Was wondering if anybody could point me in the direction of a component or some source code that I could use with flex2 that would allow me to...
    4. Radio btn makes text field equal value of different text field
      What I am trying to do is when someone clicks on the YES radio button I want the text field called MYTEXT to equal the text field named DATE. The...
    5. dynamically resize text field
      Hi, I need to be able to adjust my text fields during runtime an then export the height and width of my field to a text file. example...
  3. #2

    Default Re: resize text field on scale...

    And the problem is?

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  4. #3

    Default Re: resize text field on scale...

    The text is still scaled, sorry...

    I've tried also setting the text into and MC and setting init, but that doesn't work either...

    Anyone know the key to keeping the same X&Y on scale?
    Papa Rabbit Guest

  5. #4

    Default Re: resize text field on scale...

    The goal is to resize the movie, but NOT the text?

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  6. #5

    Default Re: resize text field on scale...

    Exactly! :-)


    Papa Rabbit Guest

  7. #6

    Default Re: resize text field on scale...

    Then your in for a major exercise ;-) The only way AFAIK is to calculate the
    amount of scaling of the stage and then scale back the textfield
    accordingly. Maybe someone else has a better solution; but this is the only
    way I can think of.

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  8. #7

    Default Re: resize text field on scale...

    That figures lol, so much for "K.I.S.S."

    This is an area I've yet to jump into, can you show me some example AS for this situation? PLEASE...

    just need it for the W values I know that much
    Papa Rabbit Guest

  9. #8

    Default Re: resize text field on scale...

    Tried it...

    [AS]
    Stage.scaleMode = "noScale"
    Stage.align = "TL";
    myListener = new Object();
    myListener.onResize = function () {
    var x = Stage.width
    setProperty ("statement", _width, (statement.width*x))
    setProperty ("statement", _height, 12)
    }
    Stage.addListener(myListener);[/AS]

    But now my MC vanishes...

    Here's the new files...

    I'm realy in a rush on this, so if any of you GURU's can lend a hand I'd
    greatly appriciate it...


    Papa Rabbit Guest

  10. #9

    Default Re: resize text field on scale...

    When you detect the stage resize, just call setSize() on your text box where
    the parameters are based on the size of the stage.

    You cant move or resize the component by setting the x,y coordinate
    orsetting its width or height height properties, you must call move() or
    setSize().

    HTH

    Mark Redman


    Mark Redman Guest

  11. #10

    Default Re: resize text field on scale...

    Stage.align = "TL";
    _root.logo._width = 265.0
    _root.logo._height = 31.5
    myListener = new Object();
    myListener.onResize = function () {
    statement._x = Stage.width - statement._width - 10;
    topTray._width = Stage.width;
    }
    Stage.addListener(myListener);


    Thanks this works!

    Papa Rabbit 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