# \[Flash8\]Help needed! Stylesheet not loading

**URL:** <https://forum.kirupa.com/t/flash8-help-needed-stylesheet-not-loading/198040>\
**Category:** flash\
**Created:** [August 21, 2006, 11:37pm UTC](https://forum.kirupa.com/t/flash8-help-needed-stylesheet-not-loading/198040 "2006-08-21T23:37:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaadar](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@aaadar](https://forum.kirupa.com/u/aaadar)\
**Post date:** [August 21, 2006, 11:37pm UTC](https://forum.kirupa.com/t/flash8-help-needed-stylesheet-not-loading/198040/1 "2006-08-21T23:37:33Z")

</div>

Got this tutorial off the net. My stylesheets and HTML dont seem to be loading. Did the stylesheets tutorial off Kirupa. That worked fine. But in my code below, the only thing that worx is the \<b\>\</b\> tags.

My stylesheet should be fine as well. Dont see what the problem is?!

Please help. Desperate

# posting the code (ignore the AMFPHP stuff)

function getStyle() {  
// load stylesheet first, then get content (separate function)  
var flash\_css = new TextField.StyleSheet();  
var path=“sitestyles.css”;  
flash\_css.load(path);  
flash\_css.onLoad = function(success:Boolean) {  
if (success) {  
categoryTitle.StyleSheet = flash\_css;  
pageContent.StyleSheet = flash\_css;  
} else {  
pageContent.htmlText = “Style sheet appears to be rodgered”;  
}  
};

};

import mx.remoting._;  
import mx.rpc._;  
import mx.remoting.debug.NetDebug;  
import mx.utils.Delegate;

NetDebug.initialize();  
// ----------------------------  
// create the responder object  
// In this object we will define  
// all the result function for  
// the data received from server  
// ----------------------------  
mainResponder = new Object();  
// echoString receiver  
mainResponder.echoString\_Result = function( data\_pass ){  
trace(“echoString result”);  
trace(“received: " + data\_pass );  
trace(”----");  
}  
// echoPageTitle receiver  
mainResponder.getCategoryTitle\_Result = function( data\_pass ){  
categoryTitle.html = true;  
categoryTitle.htmlText += “\<p class=‘three’\>\<b\>”;  
categoryTitle.htmlText += data\_pass;  
categoryTitle.htmlText += “\</b\>\</p\>”;

}  
// echoPageContent receiver  
mainResponder.getPageContent\_Result = function( data\_pass ){  
pageContent.html = true;  
pageContent.wordWrap = true;  
trace(“in GetPageContent”);  
//data\_pass type object  
// pull out data loop build string  
var data\_pass\_string="";

data\_pass\_ln=data\_pass.getLength();  
for (var i:Number = 0; i \< data\_pass\_ln; i++) {  
// for each person node:  
trace(data\_pass.getItemAt(i).Item\_title);

```
     data_pass_string+="&lt;b&gt;" + data_pass.getItemAt(i).Item_title +"&lt;/b&gt;" + " R" + data_pass.getItemAt(i).Item_cost + i + " &lt;BR&gt; ";

  }

```

pageContent.type=“dynamic”;  
pageContent.htmlText += “\<p class=‘two’\>”;  
pageContent.htmlText += data\_pass\_string;  
pageContent.htmlText += “\</p\>”;

}  
// generic onStauts responder, it will be invoked  
// when an error is received from the server  
mainResponder.onStatus = function ( data\_pass ) {  
trace(“an error occurred”)  
trace("in line: " + data\_pass.line)  
trace("error level: " + data\_pass.level)  
trace("description: " + data\_pass.description)  
}  
// define the path of our gateway.php  
NetServices.setDefaultGatewayUrl( ‘[http://localhost/flashservices/gateway.php](http://localhost/flashservices/gateway.php)’ );  
// initialize a variable for the connection  
conn = NetServices.createGatewayConnection();  
// initialize the service for our class ModxTut  
// an tell which is the responder object  
// for all the calls to the server  
serv = conn.getService(“FontanasMenu”, mainResponder);  
serv.getCategoryTitle(1);  
serv.getPageContent(1);

// flash stuff again  
\_root.createTextField(“categoryTitle”, getNextHighestDepth(), 2, 2, 300, 40);

\_root.createTextField(“pageContent”, getNextHighestDepth(), 20, 40, 300, 200);

// scrollbar  
this.createClassObject(mx.controls.UIScrollBar, “my\_sb”, 20);  
// Set the target text field.  
my\_sb.setScrollTarget(pageContent);  
// Size it to match the text field.  
my\_sb.setSize(16, pageContent.\_height);  
// Move it next to the text field.  
my\_sb.move(pageContent.\_x + pageContent.\_width, pageContent.\_y);

getStyle();

====================================
