To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-25-2006, 05:52 PM   #1
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
Cascading Style Sheets

Anyone had any success with Style Sheets to display Content Pane HTML content?
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 11-26-2006, 02:08 AM   #2
w.brants
Senior Member
 
w.brants's Avatar
 
Join Date: Dec 2002
Location: Netherlands
Posts: 1,466
What are you trying to accomplish ?
Flash CSS support is pretty limited.
w.brants is offline   Reply With Quote
Old 11-26-2006, 02:23 PM   #3
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
I've been looking to use style sheets to format text for a news page.

I was trying to use this script:
PHP Code:
//Load CSS Sheet
var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.onLoad = function(success:Boolean):Void {
    if (
success) {
        
// display style names.
        
trace(this.getStyleNames());
    } else {
        
trace("Error loading CSS file.");
    }
};
styles.load("styles.css");
It doesn't work though.
MY SOURCE OF THIS INFO
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 11-26-2006, 02:56 PM   #4
w.brants
Senior Member
 
w.brants's Avatar
 
Join Date: Dec 2002
Location: Netherlands
Posts: 1,466
The code you posted is AS 2 syntax. You have to convert it to AS 1 in order to use it.

Here's an AS 1 example that uses the stylesheet class.
Create a dynamic textfield with 'has html' set to yes.
Code:
var css_str = '.heading {font-size: 24px; font-weight: bold; }';

var my_styleSheet = new TextField.StyleSheet();
my_styleSheet.parseCSS(css_str);

txt1.styleSheet = my_styleSheet;
txt1.htmlText = "<p class='heading'>My formatted text</p>";
Wilbert
w.brants is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 11:03 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.