Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-31-2006, 02:07 PM   #1
gregsmith
Registered User
 
Join Date: May 2004
Posts: 91
Default Flash external text

OK, this is doing my head in.
I've revisited a flash project this week that reads in text from external text files using (for example):

PHP Code:
_root.loadVariables("past1.txt"); 
In past1.txt the contents are:

PHP Code:
pasttext1=Advantage West Midlands
Atlas Stone
British Waterways
De Marsillac Plunkett Inc
Groundwork Ashfield 
and Mansfield
Hunter Page Planning Ltd
Marston Hotels
Robert Hitchins 
On output it double spaces the list as if there's two <br>'s in between each line like this:

Quote:
Advantage West Midlands

Atlas Stone

British Waterways

De Marsillac Plunkett Inc

Groundwork Ashfield and Mansfield

Hunter Page Planning Ltd

Marston Hotels

Robert Hitchins
but I want it like this:

Quote:
Advantage West Midlands
Atlas Stone
British Waterways
De Marsillac Plunkett Inc
Groundwork Ashfield and Mansfield
Hunter Page Planning Ltd
Marston Hotels
Robert Hitchins
I've tried it with HTML turned on and off, with <br> and/or <p> tags in and it still does this silly double spacing thing.
I've tried saving it in utf-8 format.

Can anyone explain why it's doing this please?? I'd really like to be able to just do it like an html page and turn the html on, but it has the same result.

Last edited by gregsmith; 01-31-2006 at 02:56 PM.
gregsmith is offline   Reply With Quote
Old 01-31-2006, 03:01 PM   #2
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

problem is windows use as linebreak \n\r no idea what format woud prevent this

try :

ActionScript Code:
a = new LoadVars(); a.onLoad = function() {     trace(unescape(escape(a.pasttext1).split("%0D").join(""))); }; a.load("past1.txt");
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 02-01-2006, 08:30 AM   #3
gregsmith
Registered User
 
Join Date: May 2004
Posts: 91
Default

Thanks a lot for the reply.

The trace gave me the output that I want without the spaces.

Now how do I get it like that within the movie? (excuse my ignorance)
gregsmith is offline   Reply With Quote
Old 02-01-2006, 01:10 PM   #4
gregsmith
Registered User
 
Join Date: May 2004
Posts: 91
Default

OK, I've found the solution - it's Textfield.condenseWhite and it's finally documented in Flash 8.

Thanks again.
gregsmith is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
email form help nikmark Simple Stuff (Newbies) 17 06-14-2006 12:01 AM
Another thread about making a flash text editor Zaphodbeblebrox ActionScript 2.0 5 09-27-2005 09:37 PM
How to load flash EMBED tags and movies with external script cybered HTML and JavaScript 1 09-23-2005 10:52 AM
External text loads partially & Render text as HTML prevents loading of text file piercedwater ActionScript 2.0 20 03-02-2005 11:33 PM
Dynamic flash - external text files, please help!! rickid ActionScript 2.0 2 02-25-2005 03:38 PM


All times are GMT. The time now is 10:42 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.