Flasher Archive

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


Subject: RE: FLASH: how do you dynamically re-name variables ? ? ? ? ? ? ? ?
From: Dave Hollinden
Date: Fri, 28 Jan 2000 16:56:07 GMT

Since your duplicated clips all have unique names based on a number, what
you need to do is to set your header variables to values which are dependent
on their names.

So, load your bulletindata3.txt variables into a movie clip with an instance
name of Data. Then set the header variable values to:

Set Variable: "header" = "/Data/header" & GetProperty ( "", _name )

You'll need to modify this to suit your variable names, but it ought to get
you going.

Dave Hollinden
Web Design Team Lead
dhollindenatsonicfoundry [dot] com

-----Original Message-----
From: Christian Cook [christian [dot] cookatisluk [dot] com (mailto:christian [dot] cookatisluk [dot] com)]
Sent: Friday, January 28, 2000 5:45 AM
To: 'flasheratchinwag [dot] com'
Subject: FLASH: how do you dynamically re-name variables ? ? ? ? ? ? ? ?


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 World's 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

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s 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]