PDA

View Full Version : Sizes in actionscript



1OneTouch1
April 3rd, 2002, 03:08 PM
Im using the orbital balls fla from Kirupas open source thingy, and have so far adaped it to this...

onClipEvent (load) {
_ _ _ _ myn = 1;
_ _ _ _ tellTarget ("_root.jemma") {
_ _ _ _ _ _ _ _ y = 100;
_ _ _ _ _ _ _ _ speed = 2;
_ _ _ _ _ _ _ _ radius = 100;
_ _ _ _ _ _ _ _ xcenter = 375;
_ _ _ _ _ _ _ _ ycenter = 50;
_ _ _ _ _ _ _ _ angle = 36;
_ _ _ _ _ _ _ _ fl = 250;
_ _ _ _ _ _ _ _ play ();
_ _ _ _ }
_ _ _ _ tellTarget ("_root.tom") {
_ _ _ _ _ _ _ _ y = 100;
_ _ _ _ _ _ _ _ speed = 2;
_ _ _ _ _ _ _ _ radius = 100;
_ _ _ _ _ _ _ _ xcenter = 375;
_ _ _ _ _ _ _ _ ycenter = 50;
_ _ _ _ _ _ _ _ angle = 72;
_ _ _ _ _ _ _ _ fl = 250;
_ _ _ _ _ _ _ _ play ();
_ _ _ _ }
etc etc.
Now they are not containd within one mc, i cannot resize them? How do i make them bigger?b Thanks in advance.

upuaut8
April 4th, 2002, 06:57 AM
Waht do you mean? What is the effect you are trying to accomplish?

1OneTouch1
April 4th, 2002, 07:13 PM
OK, it is all here, under 'meet the staff'.

www.quasar-enfield.co.uk (http://www.quasar-enfield.co.uk)

the logos with the faces in are obviously too small, and i cannot simply drag them bigger like i could when they were all contained with the actionscript within an mc.

upuaut8
April 5th, 2002, 01:29 AM
easy enough.. I think.

try adding this

_xscale=200;
_yscale=200;

you can play around with different sizes. The scale is in percent, so it starts out with a _yscale, and _xscale of 100.

1OneTouch1
April 5th, 2002, 08:51 AM
No luck im afraid, no change at all. Argh!

upuaut8
April 6th, 2002, 10:49 PM
That has to work.

:(

I'll think about this and see what I can do.. I think I need to look at that Kirupa example that you were working off of.

ilyaslamasse
April 7th, 2002, 05:45 AM
Strange that the scaling doesn't work. You could as well try _width *= 2 ; _height *= 2 ;
I'm not sure though.
pom 0]

1OneTouch1
April 7th, 2002, 05:09 PM
the actual logo/ball/things have this included

z = Math.sin(angle*Math.PI/180)*radius+zcenter;
scale = fl/(fl+z);
x = Math.cos(angle*Math.PI/180)*radius;
_x = x*scale+xcenter;
_y = y*scale+ycenter;
_xscale = _yscale=scale*100;
angle += speed;
if (angle>359) {
angle -= 360;
}


in the middle of 3 keyframes which loop (stop, code^, gotoandplay1) if that makes a difference....

ilyaslamasse
April 7th, 2002, 06:26 PM
Stupid reaction of mine : scale = 10*fl/(fl+z);
pom 0]
If it really doesn't work, show me the money, I'll if I can do something.

upuaut8
April 8th, 2002, 04:01 AM
yup.. that's because that code keeps updating the scale in it, hence the other scaler doesn't work...

interesting code there POM. You're getting far better with this stuff than I ever have been.