Topic: Using Word generated XML w/ flash for dynamic text? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11300" title="Pages that link to Topic: Using Word generated XML w/ flash for dynamic text? (Page 1 of 1)" rel="nofollow" >Topic: Using Word generated XML w/ flash for dynamic text? <span class="small">(Page 1 of 1)</span>\

 
grats42
Nervous Wreck (II) Inmate

From: hoboken nj
Insane since: Feb 2002

posted posted 03-18-2002 03:48

Okay, I'm working on a project for my senior thesis, and I've been using Word to write it...when I save the paper (about 60 pages) into a web page, it saves it in XML.

Now, I'm creating an intro to this using flash, and I've been able to put in a table of contents, with links to the separate chapters, but only as separate windows (ie. target blank).

How can I dynamically load the text of my paper (its saved into separate pages for each chapter) into a small dynamic text field in flash? I don't want to have to code the text into the flash code itself, but it doesn't seem like a load variables will work either....I can also just save my paper as a .txt....what's the best way to go about doing this?

I'll put up what I have so far at student.bard.edu/~mm264/intro1.fla and at student.bard.edu/~mm264/intro1.swf

Any help on this would be MUCH appreciated...

late
-grats




InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-18-2002 10:35

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 03-18-2002 18:40

~Steve pokes his head in cautiously~

I confess to being an xml newbie, but Flash does have fairly sophisticated xml parsing capabilities.
http://www.ultrashock.com has at least one tutorial on xml
http://www.moock.org/asdg/codedepot/ has at least one demo file
http://www.were-here.com/ has a whole forum area devoted to Flash and xml

I know Flash has some real limitations - handling white space for one - everything I've done, I've had a text editor strip the white space and it works fine. It also isn't a validating parser, so if Word is putting in a definition file if will confuse Flash.

I don't want to sound negative - when you get it to work it's awesome. Just be aware that Flash's xml parser needs some coddling. I haven't gotten ahold of MX yet, but I can only assume MX has some real xml refinements. I do know that the beta Flash 6 player plug in whips through xml far faster than the Flash 5 plug in did.

Good luck!

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 03-19-2002 08:21

grats, you noted a very interesting topic.
because i am having a very similar task actually at work. only its director.
mysql -> xml -> dynamic shockwave and viceversa.
but i didnt start yet, so i cant help ya.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 04-07-2002 20:40

hey grats, did you get any further meanwhile?
i'd love to see something like this, cause im really interested myself in flash/xml.

jasonm
Nervous Wreck (II) Inmate

From: Grandville, MI USA
Insane since: Apr 2002

posted posted 04-08-2002 14:57

I think it would be better and faster for you to just save them as txt files. You could have a button that increments a variable according to chapter like:

loadVariables("getChapter.php?chapter="add i, "_root","get");

You'd then use the PHP parser page to grab your txt file and urlencode() it for use in Flash.... (assumes your dynamic text field in Flash in called "text"):

(before this, you'll have your code to get the file and output it in $chapterString variable)

echo "&text=".urlencode($chapterString)."&fileloaded=ok&bunk=";

(fileloaded varibale is so you can tell that everything is in OK. You also need that bunk variable because Flash sometimes has errors in importing without it.....)

Another alternative might be to save your files into a MySQL database and get them with PHP...

Feel free to email me at jasonm@jasonmatteson.com

::-::-j::-::

quatroGringo
Nervous Wreck (II) Inmate

From: Minneapolis, MN, USA
Insane since: Apr 2002

posted posted 04-19-2002 23:40

What if you don't know anything like XML or PHP and you want to use dynamic text in Flash? I just use a dynamic text box called textBox. Set it to word wrap, HTML, multiline, font to _sans or _serif. Format your text files like this:
page1=This is my text, it goest right here..... If you want to have more than one variable on a page, use the &Title=1 &Chapter=2 etc... Save as a .txt file (you can format in HTML 1.0 if you like).

On the first frame of your flash movie, type: loadVarNum("your.txt", 0); or make the variable decisions later with buttons and just set var on the first frame. Make the decisions with buttons, loops and a loadVar function, or you could just write a function that loads the file you ask for by setting variables with buttons. I havn't used XML yet, but I understand the parsing in Flash to be a bit slow, I think you can do everything internally much easier with the above mentioned process. Ingnorance may be bliss.

I see this post is pretty fresh, so if your still working on this and need a hand, let me know - I have a little time. 5guys@tcinternet.net

[This message has been edited by quatroGringo (edited 04-19-2002).]

[This message has been edited by quatroGringo (edited 04-20-2002).]

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 04-28-2002 22:52

FYI: i finally got it to work: www.embege.com/projects

i know php could do all those stuff much more easily. but xml is a standard and works everywhere.

funlab
Obsessive-Compulsive (I) Inmate

From: Sevilla, EspaƱa
Insane since: Dec 2002

posted posted 12-29-2002 18:38

Hi everyone, got similar trouble...
Now, i'm using a tweeked version of LoadText components' methods, (you can see it and download it at
http://flashcomponents.net , it´s really nice!!!

and it works fine with both plain and html txt, though, when it comes to keep white spaces even (keeping things aligned), it all goes wrong. You can solve it partially by using some flash html formatting
(<TextFormat align="left" or leading="12" or indent="120"> etc...) but it´s nuts having to edit every carriage return or column alignment or indent by hand.
Plus , depending on what texteditor you use, if you encode carriage returns as DOS, UNIX or MAC, etc... if you save the txt as utf-8, utf-16, or ANSI, the results are impredictable.
I've been using all possible combinations, even tried flash text editors, ( illogicz.com, and others from flashcomponents.net ) but they insert too much formatting code and yet it's hard to adjust perfectly... (so I'm gonna try to build my own, but it's gonna be a tough and long task)
So, you can see my efforts on this page:
http://www.artemovimiento.com

(every page of content there is made up dynamically from data in external txt -gotta implement soon a pagebuilder)

and i can send you my flas, txt and as if you'd like to see it.
And if anyone knows a perfect solution, or where to learn more about txt formats please, let me know.
I'm also working on some components-utilities in flash and PHP, for combos, lists, picture gallery, sound player, and a content Management system, you'll find links on my web.

By the way i recommend everyone to see
http://www.layer51.com/proto/

if you haven't yet.

PEACE for the world !!!



[This message has been edited by funlab (edited 01-27-2003).]



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu