Tough question: random reshape

i don’t know enough about actionscript to even ask this question… but oh well.

here’s what i want to do…

see that odd white shape behind her hair? i was wondering if it’d be possible to take that piece of white and reshape it randomly, so that it just moves around behind her face and hair without stopping. think of it acting like a blob, if you will.

i don’t even remotely know how to accomplish anything like this, or even if you can. maybe i’m crazy.

there’s tons of geniuses on here. what do you guys think?

matt

movin on up

Hey deeplybreathe,
That is a toughie there deeply. I don’t know the answer to it. You could cut out the blob, make that blob into a movie clip, and cut and paste that movie clip on a different layer. Then you can Shape Tween it. Search for “shape tween” in the search box above. You will find a method of making things shift shapes.

Cheers!
Kirupa :rambo:

thanks a lot for the advice. but i’m still trying to do this without making a 4000 framed movieclip, if possible.

would it be possible to make say 15 different shape movieclips, and have AS randomly call them to tween into each other? for example…

<li>it starts with “shape1”
<li>AS randomly picks another shape - we’ll say “shape9”
<li>AS automatically generates a shape tween between “shape1” and “shape9”

maybe i’m still crazy. like i said before, with my little knowledge of AS, i shouldn’t even ask this question. but i guess it’s the only way i’ll learn.

matt

I’ve never heard of doing that, but that doesnt mean its not possible. You may be ablel to create some random shape using a/s but not related to a tween. If that is what you’re looking for, I would suggest going into the book Flash Math Creativity.

Here’s another thought… you could create several mc’s that act as masks and call those masks from actionscript, perhaps even combine them for some wild effect. That should prove interesting. Dont forget to show us your work to see how you finally accomplished the task. Good luck!

thanks for the advice. i’m sure i’ll figure something out.

matt

You could also use Supra’s tutorial about the random motion, and draw dynamic lines between the points, with a dynamic fill. Just 2 or 3 lines of code.

pom :asian:

i couldn’t find that tutorial. then again i looked last night at like 3 in the morning and was half asleep. anyways, could you possibly give me a link?

thanks, matt.

[swf=http://www.macromotive.com/ebay/fill_square.swf width=400 height=400][/swf]

createEmptyMovieClip("paper", 100);
vertexX = new Array(50, 200, 350, 300, 350, 200, 50, 100);
vertexY = new Array(50, 100, 50, 200, 350, 300, 350, 200);
//
paper.onEnterFrame = function() {
	for (i=0; i<8; i++) {
		vertexX* += (Math.random()*10)-5;
		vertexY* += (Math.random()*10)-5;
	}
	paper.clear();
	paper.lineStyle(3, 0xFFFFFF, 100);
	paper.beginFill(0xFFFFFF, 100);
	paper.moveTo(vertexX[0], vertexY[0]);
	paper.lineTo(vertexX[1], vertexY[1]);
	paper.lineTo(vertexX[2], vertexY[2]);
	paper.lineTo(vertexX[3], vertexY[3]);
	paper.lineTo(vertexX[4], vertexY[4]);
	paper.lineTo(vertexX[5], vertexY[5]);
	paper.lineTo(vertexX[6], vertexY[6]);
	paper.lineTo(vertexX[7], vertexY[7]);
	paper.endFill(vertexX[0], vertexY[0]);
};

pom … how do you do a dynamic fill

im gonna have to go through that random motion tutorial when i get home. sounds interesting

Not my code, Shuga :stuck_out_tongue:

But if you look closely at Dan’s code, you shouldn’t have too much trouble finding the command…

pom :asian:

that’s exactly what i was looking for! that’s amazing. i think i’ll tweek it so that it stays much smaller and moves a little crazier, but besides that.

thanks a ton. absolutely amazing. this thread is site of the week.

matt.

omgosh … so cool

thx

Well isn’t it wierd a blob that was requested and look what is used in this example…
you can even download the fla…

http://actionscript-toolbox.com/movieclipobject.php

though I doubt they are still looking for an answer a year later…