Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: how do you dynamically re-name variables ? ? ? ? ? ? ? ?
From: Christian Cook
Date: Fri, 28 Jan 2000 11:58:02 GMT

I am building a bulletin board in Flash 4 for a company intranet. All the
messages, headers, etc are stored in text files (with the view to hooking up
to a database). "m" is the number of messages (Loaded from txt files in
first frame), "z" is the z-index counter which starts at 1, "c" is a counter
which starts at 1 also. (I didn't combine c and z as other elements
elsewhere in the move add to z as other things are duplicated.)

The following is the script I am using to duplicate enough message boxes
according to how many messages there are and then space them out.

Loop While (/globals/:m > 0)
Set Variable: "/globals/:m" = /globals/:m - 1
Set Variable: "/globals/:c" = /globals/:c + 1
Set Variable: "/globals/:z" = /globals/:z + 1
Set Variable: "n" = "message"&/globals/:c
Set Variable: "p" = n&"/:header"
Duplicate Movie Clip ("/message", n, /globals/:z)
Load Variables ("bulletindata3.txt", n)
Set Property (p, Name) = "header"&/globals/:c
Set Property (n, Y Position) = GetProperty (n, _y) +
(/globals/:c)*(GetProperty (n, _height) + 15)
End Loop

The only bit that doesn't work is the Set Property (p, Name) =
"header"&/globals/:c bit. As you can see, I'm no programmer. What i am
actually trying to do is dynamiclly rename the variable text field "header"
within movie clip "message" so that it is called "header1" in the first
duplication, "header2" in the second etc.. So that the various message
headers stored in bulletindata3.txt will load into the correct boxes as they
are dynamically created.

Any help greatly appreciated, sniggering is permitted.

Regards,
Christian Cook
Designer, ISL
Tel: +44 (0)1372 227400
Fax: +44 (0)1372 225120
<cccatisluk [dot] com (mailto:cccatisluk [dot] com)>
<http://www.isluk.com>

selection of ISL developed websites:
http://www.shanice.co.uk
http://www.barchester.demon.co.uk
http://www.jesuitmissions.org.uk
http://www.seabrooks.co.uk



----------------------------------------------------------
Internet communications are not secure. Any views or opinions presented are
solely those of the author and do not necessarily represent those of the
Company unless otherwise stated. This message is confidential and/or
privileged. If you have received it in error, please contact the sender and
delete the material from any computer.

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The Worlds Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]