assigning tween classes to objects in an array
oh man this is heavy
My array has a few objects that are revolving like on a carrousell...I want them to react on my mouseclick.
I cant seem to get this to work...
how would one make objects in an array do things?
I cant even define the path to them properly, it appears that I SUCK.
Allow me to present to you my little code-turdthat wont work in a million years
_level0.holder_mc.dot0.onRelease = function() {
var xScaleT:Tween = new Tween(kText, "_rotation", back.easeOut, 0, 1222, 2, true);
};
Id hugely appreciate some help...
Registered User
hi,
If you have the objects in the array, you should use the array operator somewhere, to access one of its elements.
Something like:
code:
var myArray = [ball_mc, square_mc, rectangle_mc];
// if you want to tween square_mc:
var xScaleT:Tween = new Tween(myArray[1], "_rotation", back.easeOut, 0, 1222, 2, true);
// it's the second element, so, it's myArray[1]
its all blurry to me...
i dont understand where to put it anymore...
could you help me understand this...?
I want to click on one of those items and have it move to the forground, at the same time the other objects should flit off the stage...
I cant seem to reach the objects to talk to them though...
help?
Attached Files
Registered User
I looked at your .fla but didn't find the tween script anywhere.
As I don't have much time to look at it, I created a simple example instead.
Attached Files
hey looks promising thank you
checkin it to see if...
a freind of mine wrote me this
function doTheAction( clip:MovieClip, action:String ):Void
{
switch (action){
case "toCenter":
clip._x = Tween(clip,"_x",Regular.easeInOut,clip._x,
Stage.width/2,30,false);
clip._x = Tween(clip,"_y",Regular.easeInOut,clip._y,
Stage.height/2,30,false);
break;
case "wobble":
clip._parent.gotoAndStop("wibblewobble");
break;
case "whatTheFrig":
_level0.dummyClip.gotoAndPlay("somewhere");
break;
}
}
only theres a syntax error in there somewhere - can you please tell me where?
Registered User
There isn't a syntax error here, at least for me.
I copy pasted to a blank document and tested it: no error.
I tested with both Flash 8 and MX 2004.
there was a colon missing in mine - i made it better but it still wont work properly.
Can you please check this out?
I simply dont get it...what the frig is wrong here?
Attached Files
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width