PDA

View Full Version : jumping nstead of smooth



mucho
March 19th, 2004, 05:54 PM
Hi All,

Seticus would prolly be the best one for this topic (I think he is most familiar with the script alread ...sorry).

I've created adapted this script to the best of my knowledge and want to develop it further. when I click on the buttons to browse pictures, the mast / or the container don't seem to be in the right position, in addiotn the transition is not smooth - rather jumpy...

Help appreciated,

thanks a lot,

m.

Seticus
March 19th, 2004, 06:44 PM
Alright, let me start by saying that the script of fumeg was a really exceptional one, because he used it to import swf's with mousetrails, so I had to create masks an all of those things. BUT if it is only pictures you're loading into the mc, use the following script:stagew = Stage.width+4;
//register the width of the stage
stageh = Stage.height+4;
//register the height of the stage
container._width = 0;
//Initial width of the container
container._height = 0;
//Initial height of the container
function uploadMovie(sel) {
loadhere._alpha = 0;
//Setting the alpha to 0
loadhere.loadMovie(sel+".jpg");
//loading the picture
_root.onEnterFrame = function() {
if (loadhere.getBytesLoaded() == loadhere.getBytesTotal()) {
loadhere._x = (stagew-loadhere._width)/2;
//centers the image
loadhere._y = (stageh-loadhere._height)/2;
//ditto
container._width += (loadhere._width-container._width)/3;
//changes the dimension of the container
container._height += (loadhere._height-container._height)/3;
//ditto
if (Math.round(container._width) == loadhere._width & Math.round(container._height) == loadhere._height) {
loadhere._alpha += (100-loadhere._alpha)/3;
//fade the picture in
}

}
};
}Use 30+ fps for smooth easing...

mucho
March 19th, 2004, 06:48 PM
AHHHH NICEEEEE....

Seticus, thanks....how the hell did you get that done so fast... amazing!
exactly how I want it to work...

Now, I'm fiddleing to make it easily updatablke with XML... uahh

thanks gain!

m.

Seticus
March 19th, 2004, 06:52 PM
you're welcome and good luck :)