load css to flash for xml

This is a discussion on "load css to flash for xml" within the Flash & Multimedia Forum section. This forum, and the thread "load css to flash for xml are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 27th, 2005, 00:38
Junior Member
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
load css to flash for xml

hi there

i tried to load css file into flash for the xml content in a textfield, but it doesnt work.i guess its how the css is load. Its never loaded into flash even though the path is correct. ( to the textfield right?) It may be the css file? im not too sure coz im quite new to xml together with css. Hope someone can help me.


codes for flash

Code:
Code: Select all
 function includeCSS() {
 
_root.scrollable.fcontent.wordWrap = true;
_root.scrollable.fcontent.multiline = true;
_root.scrollable.fcontent.html = true;
var styles = new TextField.StyleSheet();
styles.load("css_workshops.css");
styles.onLoad = function(ok) {
if (ok) {
_root.scrollable.fcontent.styleSheet= styles;
 
trace(styles) 
		 news_txt.styleSheet = styleObj;
		 news_txt.htmlText = newsText;
 
} else {
trace("Error loading CSS file");
}
};
}




css codes

Code: Select all
/* Filename: styles.css */
.text {
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
}
.head { 
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
color: #FF9900;
font-weight: bold; 
}
.subhead { 
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
color: #3399FF;
font-weight: bold; 
}




part of xml


Code: Select all
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<workshop_tv>
	<w_title>Junior Musician</w_title>
	<w_content> <![CDATA[ this is part of the xml( suppose to inherit head form css)
-subheading(inherit the subhead)
-subheading
-subheading]]></w_content>



btw i dun understand how if its unspecified in flash, the css able to detect how the xml is structed, and do its job. can anyone explain? thanks!
Reply With Quote

Reply

Tags
load, css, flash, xml

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash levels don't load in web browser, but do locally? Andy K Flash & Multimedia Forum 5 Apr 17th, 2007 15:07
Dynamically load PPT or PPS into the Flash using XML bijeeshmk Flash & Multimedia Forum 0 Jan 24th, 2007 06:14
how do you make flash load before playing? smiles Flash & Multimedia Forum 6 Jan 11th, 2007 13:00
The swf file doesn't load properly outside flash Sanoriah Flash & Multimedia Forum 3 Nov 16th, 2006 18:02
Flash Movie Doesn't load in IE jogajog Web Page Design 1 Jan 4th, 2006 00:21


All times are GMT. The time now is 22:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43