[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Flash Change Text Color On Rollover

Posted on 2004-11-09
4
Medium Priority
?
235 Views
Last Modified: 2011-04-14
Trying to get text to change color on rollover event, but not working.

level = this;
if (_global.broadcastID_array.length>i) {
      level["invisibleBtn"+i+"_mc"].invisible_btn.onRollOver = function() {
            //CHANGE COLOR OF DATE
            rollOverDateformat = new TextFormat();
            rollOverDateformat.color = 0xFFFFFF;
            // var i = this._name.split("invisible").join("").split("_btn").join("");
            var i = this._name.split("invisibleBtn").join("").split("_mc").join("").split("invisible").join("").split("_btn").join("");
            level["date_txt"+i].setTextFormat(rollOverDateformat);
      };
}

Thanks for any help!

Terry
0
Comment
Question by:splendorx
3 Comments
 
LVL 16

Expert Comment

by:vickerleung
ID: 12540551
Terry,

You may try simply using

level ["date_txt" + i].textColor = 0XFFFFFF;



By the way, is that level ["date_txt" + i] pointing to a textfield?
If not~ the function won't work~

Vicker
0
 
LVL 1

Author Comment

by:splendorx
ID: 12555166
The var i is not recognized in loop; therefore, I created a function and now works using onEnterFrame:

function highlightText(highlightNo) {
      level = this;
      // GOOGLE HIGHLIGHT DATE
      _root.onEnterFrame = function() {
            highlightDateformat = new TextFormat();
            highlightDateformat.color = 0xFFFFFF;
            eval("date_txt"+highlightNo).setTextFormat(highlightDateformat);
            delete _root.onEnterFrame;
            broadcastRollOver(highlightNo);
      };
}
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12748121
Closed, 200 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question