Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emulate the OSX Screensaver

Status
Not open for further replies.

cybercampbell

Programmer
Sep 19, 2004
2
GB
Hi all

I've been trying this for about a week and It's not realy working. I got so frustrated I've just scrapped it and I'm starting again.

what i'm trying to do is emulate the OSX screensaver...the pictures that crossfade and zoom in and out and move alittle to the corner....It's hard to explain but those of you with OSX will know what I mean. It very smooth and presents a nice soothing presentation of the images.

can anyone please give me a starting point....here and the deatils of how it may work.

I have the images loaded in externaly...The first image fades in and then as it slightly zooms it moves of the the side a little and then it crossfade with the second image, then it does the same and so on amd so on.

maybe 6 images in total.

I was told that all the fx could be done using math as opposed to tweening....this did my head in as that was beyond me but i'm willing to learn.

The FX (zoom/moves) could be random, I think that would be beter anyway.

and mabye to could help with the loading if the 2nd image was the load while the 1st image is doing the FX and then the 3rd image to load while the 2nd image it doing its thing etc. etc.

please let me know your thought on this.

Cheers
Chris
 
OK

I have this:

myPicture.counter = 0;
myPicture.onEnterFrame = function() {
//changing bahaviours depending on various conditions
if (this.counter == 0) this.xSpeed = -2;
if (this._x <= 0) {
this.xSpeed = 3;
this.alphaSpeed = -2;
}
if (this.counter == 30) this.ySpeed = 1;

//applying the behaviours
this._x += this.xSpeed;
this._y += this.ySpeed;
this._alpha += this.alphaSpeed;

this.counter++;
}

Although i'm not to sure how to implement it.

I am a novice when it comes to actionscript.

any ideas?

cheers
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top