[FMX] - stylesheet

This is weird… I red the stylesheet tutorial in kirupa and in macromedia site but it doesnt work for me. I dont undestand why…

This code should work fine but it doesnt!!!

var css_styles = new TextField.StyleSheet();
css_styles.onLoad = function(ok) {
	if(ok) {
		// display style names
	} else {
		trace("Error loading CSS file.");

I have the .css file in same directory and its rights are all allowed. I dont get why its not working… I tried some trace inside the function but it doesnt even do that. whats wrong with this? Does anyone have any idea?


Seems that its a version of flash problem. Good to know if anyone else gets the problem someday. :slight_smile:


Edit: "To begin with, you must be using Flash MX 2004 or Flash MX 2004 Professional. The following ActionScript will not work unless is it rendered as Flash 7 with ActionScript 2.0. "