Reply LinkBack Thread Tools Search this Thread
Old 01-05-2008, 09:39   #1 (permalink)
shan
Registered User
 
Join Date: Aug 2007
Posts: 6
dynamic text INSIDE movie clip

Hi,

Having a problem displaying a dynamic text field inside a movieclip - when I test / publish the movie, the text field is empty
I'm using AS2 in Flash CS3 (Newbie)..

my movie clip has the instance name: contentMain
The dynamic text field (Inside the movie clip) has the instance name: myText
The text field reads a html file, which contains text and images..

I believe my problem is something to do with the root - But I'm a newbie and are uncertain as to how I should change the following code:

(I should add that I know my html file works, because I can test the dynamic text field scene in flash and see the content, but not when I test the entire movie)

Code:
//stylesheet stuff var ss = new TextField.StyleSheet(); ss.load("stuff.css"); contentMain.myText.styleSheet = ss; /***************************************************/ //xml stuff about = new XML(); about.load("stuff.html"); about.onLoad = function () { contentMain.myText.text = about; }
  Reply With Quote
Old 01-05-2008, 14:09   #2 (permalink)
tgines
Registered User
 
Join Date: May 2008
Location: Tallahassee, FL
Posts: 13
Quote:
Originally Posted by shan

Code:
//stylesheet stuff var ss = new TextField.StyleSheet(); ss.load("stuff.css"); contentMain.myText.styleSheet = ss; /***************************************************/ //xml stuff about = new XML(); about.load("stuff.html"); about.onLoad = function () { contentMain.myText.text = about; }

try tracing out the about variable and make sure it's loading the text up... just to see what it's getting.

Code:
//xml stuff about = new XML(); about.load("stuff.html"); about.onLoad = function () { contentMain.myText.text = about; } trace(about);
  Reply With Quote
Old 01-05-2008, 22:38   #3 (permalink)
shan
Registered User
 
Join Date: Aug 2007
Posts: 6
I tried tracing it out with the code you provided, and got the following message:

Error opening URL 'file:///C|/Documents%20and%20Settings/admin/Desktop/imagesxml/stuff.html'

- which I found a little wierd, because the HTML file is definately in the correct folder (Same folder with the flash files)..


I have had some limited success by changing my code from:
myText.text = about;
to:
contentMain.myText.text = about;

With this, the images from my html file are now displaying in the textArea, but the text itself is still not displaying.. I don't know why this would be happening
  Reply With Quote
Old 01-05-2008, 23:25   #4 (permalink)
flatcat
beauty through chaos
 
flatcat's Avatar
 
Join Date: Jul 2003
Location: Vancouver, British Columbia
Posts: 726
Have you embedded the font for the dynamic text box?
__________________
audentes fortuna iuvat
Flatcat
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8