I’m certain that a thread has been started on this before but I can’t find it. I want to have a MC grow when another MC is clicked on and then also be able to shrink back up with click on again. Can somebody please help me?
nevermind. I just found some old code I had written. HEHE I’m a tard.
Oh k now,
I’m using this code
onClipEvent (load) {
speed = 2;
returnSpeed = 1;
}
onClipEvent (enterFrame) {
this._yscale += (scaleY-_yscale)/speed;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
scaleX = 220;
scaleY = 220;
checkVar = "on";
}
else {
checkVar = "off";
}
if (checkVar == "off") {
scaleX = 100;
scaleY = 100;
}
}
[/AS]
And it does make the box grow but what I'm looking for more like something on http://www.kurtnoble.com/. Can somebody please help meh? :p:
i think it should be hitTest(_root._xmouse,_root._ymouse,false)
That makes no difference. It is a lot bigger change to the AS than that.
[AS]distance = 20;
total = 4;
for (i=0; i<total; i++) {
var clip = this.createEmptyMovieClip(“clip”+i, i);
clip.beginFill(0x000000, 60);
clip.lineTo(40, 0);
clip.lineTo(40, 40);
clip.lineTo(0, 40);
clip.lineTo(0, 0);
clip.endFill();
clip.clip = this[“clip”+(i-1)];
clip.scale = 100;
clip.onEnterFrame = function() {
var x = this.clip._x+this.clip._width+distance;
this.x = this.x*.4+(x-this._x).2;
this._x += this.x;
this.s = this.s.8+(this.scale-this._xscale)*.4;
this._xscale = this._yscale += this.s;
};
clip.onRelease = function() {
if (this.scale == 200) {
this.scale = 100;
} else {
for (i=0; i<total; i++) {
var clip = this._parent[“clip”+i];
clip.scale = clip == this ? 200 : 100;
}
}
};
}[/AS]
… You’ll get the idea.
That is awesome, just what I needed.
Glad I could help.
Oh k,
I’ve toyed with that scrip Kax gave me and well now I want to change a couple of things back can’t see to get them.
How do I invert this menu vertically? I want these shapes to be flipped and have them spring up instead of down. Also, How do I position them wherever I want on the x-axis?
Here is the script:
[AS]
distance = -1;
total = 4;
for (i=0; i<total; i++) {
var clip = this.createEmptyMovieClip(“clip”+i, i);
clip.lineStyle(.5, 0x000000, 100);
clip.beginFill(0xC8C8C8, 80);
clip.lineTo(40, 0);
clip.lineTo(40, 20);
clip.lineTo(0, 50);
clip.lineTo(0, 0);
clip.endFill();
clip.clip = this[“clip”+(i-1)];
clip.scale = 100;
clip.onEnterFrame = function() {
var x = this.clip._x+this.clip._width+distance;
this.x = this.x*.2+(x-this._x).4;
this._x += this.x;
this._y = 50;
this.yS = this.yS.7+(this.scale-this._xscale).1;
this.xS = this.xS.7+(this.scale-this._yscale).1;
this._xscale += this.xS;
this._yscale += this.yS;
};
var subClip = clip.createEmptyMovieClip(“subClip”+i, i+total);
subClip.lineStyle(.5, 0xFFFFFF, 100);
subClip.beginFill(0xC8C8C8, 100);
subClip.lineTo(34, 0);
subClip.lineTo(34, 45);
subClip.lineTo(0, 45);
subClip.lineTo(0, 0);
subClip.endFill();
subClip.subClip = this[“subClip”+(i-1)];
subClip.scale = 100;
subClip.onEnterFrame = function() {
var x = this.subClip._x+this.subClip._width+3;
this._y = this.subClip._y+this.subClip._height+3;
this.x = this.x.4+(x-this._x)*.2;
this._x += this.x;
};
clip.onRelease = function() {
if (this.scale == 200) {
this.scale = 100;
} else {
for (i=0; i<total; i++) {
var clip = this._parent[“clip”+i];
clip.scale = clip == this ? 400 : 100;
}
for (i=0; i<total; i++) {
var subClip = this._parent[“subClip”+i];
subClip.scale = subClip == this ? 400 : 100;
}
}
};
}
need help…plz…running out of…air…for…brain…
BEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEPPPPPPPPPPPPPPPP
hey this is kyle (kernlearn). take a look at the attchment and see if it’s what you need. the way i did it, you don’t have to modify the script in any way. just create a MC with nothing in it, then paste the script into the first frame(which should be blank). now on the parent timeline there is a registration point. by moving the registration point, you can freely move the boxes wherever you want. you can also flip and rotate the registration point to get the orientation you want.
hope this is what you need.
Oh, I see what you did! Thanks a lot Kyle. That was exactly what I needed.