Flash Change Text Color On Rollover

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
LVL 1
splendorxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vickerleungCommented:
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
splendorxAuthor Commented:
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
CetusMODCommented:
Closed, 200 points refunded.
CetusMOD
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.