PDA

View Full Version : creating movieclip by mouseclick



Hartwig
October 16th, 2002, 06:20 AM
[F5]Arg!! For Actionscript Guru!! Beginner needs help!

Hi!

Is it possible to define the properties of a movieclip by clicking a button and then to play the movieclip by pressing another button.
for example:

clicking on buttonA defines the sizeA of a circle
clicking on buttonB defines a second sizeB of the same circle
clicking on buttonC makes the circel growing from sizeA to sizeB

this I need for 25 different circles which shoud grow at the same time

do U know what I mean?

THX

Hartwig

pom
October 16th, 2002, 06:56 AM
Well yes it is possible. But how do you set the sizes? Dynamic text? all the same?

Hartwig
October 16th, 2002, 06:58 AM
the sizes are set by variables which were read from a .txt file and which are different for all the circles

H.

pom
October 16th, 2002, 09:36 AM
So what is the matter? What is it that you don't know how to do?

pom :q:

Hartwig
October 16th, 2002, 01:01 PM
I don't want to use
on ClipEvent (enterFrame) {
_xscale+=5;
}
because I have 25 circles and this makes the script very slow. Wih tweening I can't define sizeB. So how can I assign the variables to sizeA and sizeB? How has the MC/ the script to look like?

Please help!

Hartwig

pom
October 16th, 2002, 02:08 PM
Well, if you don't want to use either script or tweens, it's gonna be tough.

Use script, it's easier. You could use a function, for instance:
function grow(sizeB){
this._xscale=this._yscale+=(sizeB-this._xscale)/4;
}and assign it on the enterFrame of all your circles. And don't worry, Flash can take it :P

pom :cowboy: