Flasher Archive

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


Subject: [flasher] RE: [flasher]More help please Andy A??
From: harriett ansell
Date: Tue, 20 Mar 2001 09:15:35 -0000

This is what you advised me to do.

Harriett


If you make a single button of the right design (let's call it buttonMC)
with a text variable in it called varText then you can do the following.

Create a button of your own in a movieclip in which you place an invisible
button (one with just hit area defined) to attach the actions to. Then use
duplicateMovieClip to create the new buttons in run time and set the text in
each one at creation time...

so

i=1
while (i<=80) {
duplicateMovieClip (_root.buttonMC, "Button"+i,i)
_root["Button"+i].varText = "Button "+i
i = i+1
}

This will step through values of i, create a new button movieclip called
Button1, Button2 etc and then sets the button text to "Button 1" Button 2"
etc. You can also set other things in the movieclip like the frame it should
target:

_root.Button1.targetFrame = "Blah"
_root.Button2.targetFrame = "Blob"

and then in the invisible button of your original movieclip you add

on (release) {
_root.gotoAndPlay (this.targetFrame)
}

which would make Button1 tell the main timeline to go to the label "Blah"
and play but Button2 would tell it to go to the label "Blob".

this way, your download will be small, because the user downloads just one
button instance and the others are created at run time. It's a little more
complicated in programming though, because the programming has to be the
same for every button
--
Harriett Ansell
Graphic Designer
mail: h [dot] l [dot] ansellatopen [dot] ac [dot] uk
tel: 01908 654699
fax: 01908 653169
The Knowledge Media Institute
http://kmi.open.ac.uk/



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