all groups > flash actionscript > february 2004 >
You're in the

flash actionscript

group:

utilizing text files in flash ovies


utilizing text files in flash ovies nigeldogg
2/23/2004 7:07:43 PM
flash actionscript: I have been assigned a project to create a small movie with about five images
that fade from one to the next. Each image will be clickable to a different
URL. Here's the catch. The customer would like it to be configurable through a
text file, either XML or delimited. This text file should support a name/value
format, the image file name and the URL it will be associated with. This is so
that anybody can change the images contained in the movie. Has anybody ever
done anything like this? Thanks!
Re: utilizing text files in flash ovies ufitzi
2/23/2004 7:36:08 PM
this is definetly possible.
You need to load the file w/ name=value pairs inot a LoadVars object (read up
on this Object).
You then need to parse this file to get individual name=value pairs seperated
(see String functions on ways to do this).
Your movie will then use these values (call them "img1" and "url1") within
your code segments.
A good approach might be Arrays to hold these values. Another good idea would
be to utilize ActionScript 2.0 if this is possible, but you have to export as
Flash 7.
(also later versions of flash 6 (6 r65) , maybe someone else can verify this)
In any case, you'll need to see documentation on AS 2.0, but creating a class
to handle all of this would be much easier than trying to handle it using AS1

good luck
Re: utilizing text files in flash ovies Laiverd.COM
2/23/2004 9:17:51 PM
To get you started:
http://home.hccnet.nl/john.mulder/flash/tutorials/flash_external_data_1.zip

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

AddThis Social Bookmark Button