Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 17th, 2004, 07:46 AM
pixial pixial is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 9 pixial User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Onmouseover on dynamic text?

I'm looking for a way to make hyperlinks in dynamic textfields (rendered as html) change color onmouseover. Is that possible?

// Johan

Reply With Quote
  #2  
Old January 18th, 2004, 04:49 AM
axronos axronos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 20 axronos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 39 sec
Reputation Power: 0
Send a message via AIM to axronos Send a message via Yahoo to axronos
One way of doing this is to place an invisible button ontop of your dynamic text. The button then responds to the mouse by manipulating the text field. Bellow is some code I recently used to do just this. It creates the text and button on the fly within flass. It assumes you have a movie clip symbol with a square in it, have already created a textFormat object.

This code will start your text black and on rollover make it white w/ a black background.

color1 = 0x000000;
color2 = 0xffffff;

// create your text and button objects
createTextField("words",1,0,0,0,0);
attachMovie("invisi", "button",2);

// set the text
words.text = "some text";

// set text colors
words.textColor = color1;

words.background = false;
words.backgroundColor = color1;

// set text formating
words.setTextFormat(_global.plainformat);

// set the text height and width. (necessary to make it visible since it was created with
// a height and widht of 0
words._height = 1.2*words.textHeight;
words._width = words.textWidth+5;

// set button x and y, width and height to that of the text
button._x = words._x;
button._y = words._y;
button._height = words._height;
button._width = words._width;
// make button invisible
button._alpha = 0;

// add a variable to button which points to the text object
button.affect = words;

// make button actions
button.onRollOver = function() {
this.affect.background = true;
this.affect.textColor = color2;
}

button.onRollOut = function() {
this.affect.background = false;
this.affect.textColor = color1;
}

button.onPress = function () {
getUrl("http://yourUrlhere");
}

Reply With Quote
  #3  
Old January 18th, 2004, 05:46 AM
pixial pixial is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 9 pixial User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It's hard when you don''t know where the links will be.

I found a way to do it with traditional CSS, apparently flash has got support for a:hover and stuff

Thanks anyways

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Onmouseover on dynamic text?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway