Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-16-2007, 07:37 AM   #1
roystik
Registered User
 
Join Date: Jun 2007
Posts: 9
Default xml and css: cant get custom class to work on links

Hello. I've been working on this horizontal scrolling text project. I'm using a dynamic textfield, whose content is being pulled from an xml file.

Now I have been able to successfully format the xml file, except when it comes to custom classes and applying them to URLs i.e.

Code:
<a href="someurl.htm" target="_blank" class="down">name of link </a>
Here is the CSS I'm using:

Code:
a:link {font-weight:bold;	text-decoration: none;}

a:hover {color: #000000; font-weight: bold; text-decoration: none;}

a.down:link { color: #ffff00; font-weight:bold; text-decoration: none;}

a.down:hover { color: #660000; font-weight: bold; text-decoration: none;}

item {color: #000000; font-size: 11px; display: inline;}
And here's the XML:

Code:
<itc>
<item><a href="someurl.htm" target="_blank" class="down">name of link </a></font> (10 Aug)</item>

</itc>
And here's the code I used to load the XML and CSS into flash:

Code:
thisText.html = true;

myvariable=new Date().getTime();
myStyle = new TextField.StyleSheet();
myStyle.load("css/styles.css");
TextHolder.styleSheet = myStyle;
thisText = new XML();
thisText.load("content/itc.xml");
thisText.onLoad = function(success) {
	if (success) {
		TextHolder.text = thisText;
	}
};
I've tried everything I can think of, so any help you can give is greatly appreciated.
roystik is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
embedded fonts, css, xml, dynamic textfields erictomlinson ActionScript 2.0 5 06-21-2008 02:42 PM
htmlText, embed fonts, css, xml etc... bigalc ActionScript 2.0 0 05-23-2007 01:01 PM
Can't retrieve the height of a movieclip (using external CSS and XML) WaZz ActionScript 2.0 3 05-11-2007 01:06 AM
Possible to style a single extracted XML node with CSS? deepmike ActionScript 2.0 5 02-15-2007 11:21 PM
CSS and XML problem Therian ActionScript 2.0 4 01-31-2007 10:36 PM


All times are GMT. The time now is 07:13 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.