Ok so I have a good basic knowledge of Flash, good knowledge of Dreamweaver, Fireworks and Photoshop…
I followed the following tutorial
http://www.nwebb.co.uk/nw_htmlsite/index.php?page=browse_tutorial&tutorial=xmlhtmlcss1&part=1
My goal is to make 4 sites using Flash.
The navigation bar will take you to a new movieclip in Flash which are scrolling text boxes that are dynamic and load xml files that contain pictures, links and text.
So… to create the XML and CSS’s I am using Dreamweaver.
For the Flash… well… Flash MX.
So my XML looks like this:
<kungfu>
<drunken>This is some drunken text</drunken>
<monkey>This is some monkey text</monkey>
<snake>This is some snake text</snake>
<dragon>This is some dragon text</dragon>
</kungfu>
Actionscript on frame 1 in the movie looks like this:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
/kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load(“kungfu.css”);
myText.styleSheet = kungFuStyle;/
/COMMENTED DUE TO NO CSS YET AND FAILING TO SHOW XML CORRECTLY… EVEN WHEN XML IS CREATED AND THE ABOVE IS COMMENTED THE CSS ISN’T APPLIED AND I STILL SEE CODE?/
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load(“kungfu.xml”);
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
So what happens when I save the above files and test?
Well the movie shows the following in whatever color the textbox color is set to…
<kungfu><drunken>This is some drunken text</drunken><monkey>This is some monkey text</monkey><snake>This is some snake text</snake><dragon>This is some dragon text</dragon></kungfu>
I’ve tried the tutorial SEVERAL times but it never works? I am frustrated!
Why is this happening? Can someone please help me?
P.S… myTest is the instance name of the textbox right? So if the textbox was called someThingelse all the places where myTextbox shows in code would be called someThingelse correct?
kungFuStyle refers to the style sheet so if we changed kungFu to mycss it kungFuStyle would change to myCss right?
and kungFuContent refers to the XML and if we made that myxml those would change to myXmlContent right?
I think I got it… please help!
BTW if anyone is willing to help a radio DJ who is also the webmaster and has to have 4 sites finished soon please please please IM me on AOL… AIM name is KainNation
I promise I’ll need more help when I need to run java scripts and stuff Thanks guys! I’m glad I found a GREAT FORUM!
Kain
www.KainNation.com
AIM: KainNation
Kain@KainNation.com