# PLEASE HELP! Flash mx(6) action scripting help with css

**URL:** <https://forum.kirupa.com/t/please-help-flash-mx-6-action-scripting-help-with-css/195548>\
**Category:** Uncategorized\
**Created:** [August 1, 2006, 3:17pm UTC](https://forum.kirupa.com/t/please-help-flash-mx-6-action-scripting-help-with-css/195548 "2006-08-01T15:17:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![insite7](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@insite7](https://forum.kirupa.com/u/insite7)\
**Post date:** [August 1, 2006, 3:17pm UTC](https://forum.kirupa.com/t/please-help-flash-mx-6-action-scripting-help-with-css/195548/1 "2006-08-01T15:17:11Z")

</div>

I need some help rewriting this js code to work inside a flash movie - I need my dynamic content to pick up the proper css depending on what operating system they are on:

\<script type=“text/javascript”\>  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Different CSS depending on OS (mac/pc)- © Dynamic Drive ([www.dynamicdrive.com](http://www.dynamicdrive.com))
- This notice must stay intact for use
- Visit [http://www.dynamicdrive.com/](http://www.dynamicdrive.com/) for full source code  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/  
var csstype=“inline” //Specify type of CSS to use. “Inline” or “external”  
var mac\_css=‘body{font-size: 14pt; }’ //if “inline”, specify mac css here  
var pc\_css=‘body{font-size: 12pt; }’ //if “inline”, specify PC/default css here  
var mac\_externalcss=’/style/macstyle.css’ //if “external”, specify Mac css file here  
var pc\_externalcss=’/style/pcstyle.css’ //if “external”, specify PC/default css file here  
///////No need to edit beyond here////////////  
var mactest=navigator.userAgent.indexOf(“Mac”)!=-1  
if (csstype==“inline”){  
document.write(’\<style type=“text/css”\>’)  
if (mactest)  
document.write(mac\_css)  
else  
document.write(pc\_css)  
document.write(’\</style\>’)  
}  
else if (csstype==“external”)  
document.write(’\<link rel=“stylesheet” type=“text/css” href="’+ (mactest? mac\_externalcss : pc\_externalcss) +’"\>’)  
\</script\>

can someone help me do this? Pleeeeeease?
