Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible have the css code within the main .FLA without having it externally?

Guest
Jan 10, 2013 Jan 10, 2013

I'm trying to have everything within one .FLA because this file will be moved around everywhere and having an external CSS posses a liability and something not working right, so I've been looking around the net with no luck so I'm here asking...

Is it possible to have all of it in one frame and just call for it when needed. So far I've been able to simplify the as2 code to call the CSS but still can't make it be within the .FLA (still requires an external file)

this is in frame one.

var format = new TextField.StyleSheet();

format.load("flash.css");

output.styleSheet = format;

output.text = "<br><p class='one'>I don't like external files.</p>";

it works well... but like i said...

Thank you in advance for your time and response

also...

does flash hate border styles?... can't get them to work...

TOPICS
ActionScript
761
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 10, 2013 Jan 10, 2013

eg:

var styles:TextField.StyleSheet = new TextField.StyleSheet();

styles.setStyle("bodyText", {fontFamily: 'Arial,Helvetica,sans-serif', fontSize: '12px'}

);

styles.setStyle("headline", {fontFamily: 'Arial,Helvetica,sans-serif',fontSize: '24px'}

);

Translate
Community Expert ,
Jan 10, 2013 Jan 10, 2013

you can define css styles on your timeline.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 10, 2013 Jan 10, 2013

That's where I'm left in blank.... I tried just putting in the css style into a frame but no luck, flash doesn't recognize it as a code, so I don't know the proper way to do this...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 10, 2013 Jan 10, 2013

eg:

var styles:TextField.StyleSheet = new TextField.StyleSheet();

styles.setStyle("bodyText", {fontFamily: 'Arial,Helvetica,sans-serif', fontSize: '12px'}

);

styles.setStyle("headline", {fontFamily: 'Arial,Helvetica,sans-serif',fontSize: '24px'}

);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 10, 2013 Jan 10, 2013

so this way I dont have the same "creative styles" as a CSS, for example a bottom border (having the opportunity to make a double-bold underline)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 10, 2013 Jan 10, 2013

you must open flash.css and convert the css there into code formatted the way i showed (or something similar).  you'll need to set a style for each style used in your html text and listed in your css file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 10, 2013 Jan 10, 2013

cool, i've started playing with it your way and i'll eventuallt get it my way, thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 10, 2013 Jan 10, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines