How to make this ETSY.COM Time Machine

This is cool. I want to make it.

How do you do it?

http://www.etsy.com/time_machine.php#goods

I am about medium skilled in my AS

Thats not very medium skilled. Thats very advanced. :stunned:

[whisper]He’s saying HE is medium skilled, not the website.[/whisper]

thanks niraj, it can be done tho, anyone got any suggestions? :esmirk:

man… thats crazy!!

I know that, I was trying to be nice :wink:

I thought it was a very diplomatic reply… :slight_smile:

That effect could be done using concepts from senocular’s 3d tute: http://www.kirupa.com/developer/actionscript/3dindex.htm

and with a little extra trig (to get the images in a spiral)…

And I believe Bit-101 has a tutorial on “throwing” movie clips, but it was written for Flash 5 and painfully outdated…

Basically, just need to put together a whole bunch of pretty advanced stuff…

it’s not that hard as I see it :slight_smile:

add every clip z position (from far to nearest)
determin clip size on z position (and visibility if it goes behind screen or it’s too far (but that can do _alpha property based on z position)

position clips around center and use z value for making them bigger or smaller

apply some easing on rotation and that’s it

and then you change z value to all movies and they keep spinning and coming

:slight_smile: LOL just like devonair said

so z value (distance) influences x, y, width, height and alpha
you just need to figure right evaluations

so z value (distance) influences x, y, width, height and alpha
you just need to figure right evaluations

yup thats so true, but in the end its pretty ****in hard. I’m up for making this thingy though. Whos with me!

Ill make a start.

write some stuff down etc.

Thanks for the replies guys, I will be working hard on this the next couple of days (this is part of my University project). Will post up all the code I come up with!

http://www.devincheevers.com/3D/click_zoom.html

So this is basically senocluar’s tutorial with different images, but its a start! I’ve got some questions on the code is this, will post them soon.

This is the code

[INDENT]// creat an array to store file paths
filePaths = new Array();
for (i=0; i<5; i++) {
filePaths* = “images/image”+(i+1)+".jpg";
}

this.createEmptyMovieClip(“theScene”, 1);
theScene._x = 300;
theScene._y = 300;
theScene.depth = 1;

selectStar = function () {
cameraView.target.x = this.x;
cameraView.target.y = this.y;
cameraView.target.z = this.z;
};

displayStar = function (cameraView, focalLength) {
var x = this.x-cameraView.x;
var y = this.y-cameraView.y;
var z = this.z-cameraView.z;
if (z<0) {
this.z = this.z+5000;
this.x = 500-Math.random()1000;
this.y = 500-Math.random()1000;
x = this.x-cameraView.x;
y = this.y-cameraView.y;
z = this.z-cameraView.z;
}
// end if
var scaleRatio = focalLength/(focalLength+z);
this._x = x
scaleRatio;
this._y = y
scaleRatio;
this._xscale = this._yscale=100scaleRatio;
this.swapDepths(Math.round(-z));
};
objectsInScene = new Array();
for (i=0; i<5; i++) {
attachedObj = theScene.attachMovie(“star”, “star”+i, theScene.depth++);
targetJPEG = filePaths
;
targetMC = _root.theScene[“star”+i].goBTween.img_con_mc;
// load the target image into the target movieclip
loadMovie(targetJPEG, targetMC);
attachedObj.x = 500-Math.random()*1000;
attachedObj.y = 500-Math.random()1000;
attachedObj.z = i
500;
attachedObj.onPress = selectStar;
attachedObj.display = displayStar;
objectsInScene.push(attachedObj);
}
// end of for

cameraView = new Object();
cameraView.x = 0;
cameraView.y = 0;
cameraView.z = 0;

cameraView.target = new Object();
cameraView.target.x = 0;
cameraView.target.y = 0;
cameraView.target.z = 0;
focalLength = 400;

easeToTarget = function () {
cameraView.x = cameraView.x+(cameraView.target.x-cameraView.x)/5;
cameraView.y = cameraView.y+(cameraView.target.y-cameraView.y)/5;
cameraView.z = cameraView.z+(cameraView.target.z-cameraView.z)/5;
var i = 0;
while (i<objectsInScene.length) {
objectsInScene*.display(cameraView, focalLength);
i++;
}
// end while
};
theScene.onEnterFrame = easeToTarget;
[/INDENT]

First thing I want to figure out it is why is it infinite? I mean there are only 5 images but then it goes back to one. This is the first thing I want to get rid of in helping me recreate etsy.com’s time machine.

Thanks :player:

have you seen the other sorting types of the site aswell ?

btw you have that in a .fla already ? and where did you get the code?

absolutely crazy

////

var z = this.z-cameraView.z; // lowers the z

if (z<0) {
this.z = this.z+5000; // puts z to 5000 so it can lower again

thats how it loops i guess

http://www.kirupa.com/developer/acti…pt/3dindex.htm

The code is from one of senoluars 3D Tutorials, yeah I have seen the other sorting types, really cool!

lol, WHERE? haha put it between link tags, kirupa cuts off the url

oh btw i think i can create the circle

attachedObj.x = 500-Math.random()*1000;
attachedObj.y = 500-Math.random()1000;
attachedObj.z = i
500;

x and y are important, create a circle * 5 or so, then devide it by the rarray length, then * current i;

i got the code from someone. sourcefiles are at my internship … but the .swf is here: http://www.grede.nl/other/dstyled

Thanks Greggeh, changed the code to this:

if (z<0) {
removeMovieClip(this);

}

And it doesn’t loop!

http://www.kirupa.com/developer/actionscript/shape_camera.htm

Check out the bottom of the page that star animation, thats where the code is from. The whole Tutorial is pretty good.

How would I get the thing is to zoom through automatically rather than having to click.

Like the ETSY on does, it just plays thorugh?

x = this.x-cameraView.x;
y = this.y-cameraView.y;
z = this.z-cameraView.z;

add

z–;

?

where would I put that code?