View Full Version : Externally loaded dynamic text does not show in html...

04-23-2004, 04:19 AM
Hi. I'm new to this so don't be surprised if this is a stupid mistake. I went through a tutorial here called "Tutorial 34 - scrolling a text box II (http://www.actionscript.org/tutorials/intermediate/scrolling_a_text_box_II/index.shtml)", in which text is read from a txt file into a dynamic text field. Everything worked fine.

The problem arises when I put the scroll box into a movie I was working on. It previews fine. It plays fine when uploaded (www.mysite.com/flash.swf). However when embedded into an HTML doc the movie doesn't show any text (www.mysite.com/flash.htm).

I wish I could discuss the code with you guys, but I have no script skills and pretty much copy-pasted the code. I have attached the files in the hope that someone will be able to look at them and tell me where I went wrong. Any help is most appreciated.

04-24-2004, 05:13 AM
Hmm...maybe this should be in the actionscript section as the problem definitly has to do with the script. Sorry if I put it in the wrong place.

Could a mod please move this over?

04-24-2004, 05:22 AM
Well, I don't really think this question's in the wrong place but the reason I didn't reply was because I didn't have an answer and was probably as stunned as you were :confused:

I don't know about the rest of the family but I never reply when I don't have an answer/clue...so maybe people just don't have answers...I don't know, give it another 4 days or something....

NOTE: Me is not a moderator by the way so couldn't move your thread if I wanted to ;)

:p - Ruben

04-24-2004, 09:08 AM
I assume your file is in F5 ( or perhaps 2004), anyhow I cannot open it, one suggestion ( and a common error for all), is ensure that your text box is html enabled, otherwise it won't be able to read html text !


04-24-2004, 10:04 AM
Howdy and Welcome... :)

Um... I don't understand your question... Okay... Check this one out... and tell me if it is working as it should be or not...

PS> I don't think this thread really requires to be moved to another forum... As far as I know, there isn't much of AS involved with the problem... But if it is, I sure will move to the AS 2.0 forum... :)

04-24-2004, 05:15 PM
@ruben - Thanx for letting me know. I understand what you are saying. I just feared I had put this thread in the wrong section, in retrospect. I'm glad I didn't. :)

@vosgien - I'm using flash 2004. I made sure that it was html enabled. I also tried it without importing html text, but just plain text. In all cases, the movie would play normally until I put the swf in an HTML page. Then the text wouldn't show.

I finally tried to stop loading the text from an external file, and just put it into the actions for the dynamic box (onClipEvent (load){daTextBox ="text"). That worked fine. This lead me to beleive that there was a problem with the 'this.loadVariables("start.txt");' statement. This is also why I thought maybe this should be in the actionscript section.

@CyanBlue - Yes, The movie works perfectly fine in your page! How did you do it? :D

@all - Thanx alot for the replies guys. You been great! :)

04-25-2004, 12:59 AM
Hi x-cessive,
Sorry - I didn't read you question properly, and also, I work in MX(original) and not 2004, at a guess I would suggest you change the way you are loading in your text to new LoadVars():

myLVs = new LoadVars()
myLVs.load("start.txt" )
myLVs.onLoad = function(success)
daTextBox.html = true;
daTextBox.htmlText = this.myText
/*where myText is the name of the variable in start.txt*/

I assumed you worked with F5 as I checked the tute that you posted, I believe ( I read somewhere around here) that loadVariables was being deprecated, but I amnot certain on that.



04-25-2004, 06:54 PM
How??? Tell you what... I just published the HTML and SWF file from the FLA file that you have posted and pushed to my server... I did not touch anything in you FLA file at all... I am not sure if this matters but my host runs under the Linux... :)

04-26-2004, 03:28 PM
I got it to work! I just published the flash and HTML. Copied the object HTML, then pasted it to the page where I was wanted it in. I also had to move all the flash related files from an images folder to the folder the HTML was in (The flash was linked to the folder properly before). I didn't try the loadVars method as this one worked. Thanks for the help guys. It's much appreciated!:D