A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash Action Script 2, Easy Question.

  1. #1
    Member
    Join Date
    May 2009
    Posts
    66

    Question Flash Action Script 2, Easy Question.

    Hi there, ok well im trying to do something in flash AC2, and im stuck.

    i have 2 button symbols and 1 dynamic text field.

    when i put my mouse over button 1, i want the dynamic text field to say "description1" and when i put my mouse over button 2 i want the dynamic text field to say "description2"

    is there a way i can do this in action script 2?

    i can do it by diving down in to the button and making an "over" instance with the text on it, but that causes some glitches when you mouse over the dynamic text, so im looking for a way to do it with just action script.

    i imagine it must be real easy, 3 lines of code max, i have looked on google and forums. but i think the problem is just so basic it is not even being covered.

    thanks.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    PHP Code:
    // on stage -
    // 2 buttons - instance names - btn1, btn2
    // dynamic textfield - instance name - dyn_txt
    // main timeline code -

    btn1.onRollOver = function(){
    dyn_txt.text "Hello";
    };

    btn1.onRollOut = function(){
    dyn_txt.text "";
    };

    btn2.onRollOver = function(){
    dyn_txt.text "Goodbye";
    };

    btn2.onRollOut = function(){
    dyn_txt.text "";
    }; 
    hth

  3. #3
    Member
    Join Date
    May 2009
    Posts
    66

    @a_modified_dog

    thanks! just what i needed.

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center