Zoomin'!

Hey,

I was wondering if anyone could help. Not sure if I should post this message here or in the ActionScript section.

I was wondering if anyone know how to get a zooming effect… have a look at SoFake .

I can imagine how half the stuff can be done, but I’m not sure about the transitions. If you press the last button for example, and then the first button it plays through the whole lot.

I don’t want to use this for a website or for a project. Its just one of those want to know things. I’m always building a little library for myself with various flash things. Interesting to have.

Thanx for any help and or suggestions

Markcq:toad:

I reckon you do that effect with just simple tweening.

If you use a picture bigger than the display area (with unwanted stuff round the excess space), you can put it in on a click then motion tween it out until only the bit you want is showing.

So it looks like it’s zooming, but you don’t have the trouble of making it go from tiny to large, as it already filled the screen when the picture loaded.

If that makes sense. :slight_smile:

If it didn’t I can whip up a quick example for you… :slight_smile:

that is tha part i do get…

the part i don’t get is to get the nice transition to play… from which button i press to the next…

without the zooming trasition it will loose all its power.

i recon some kind of action script will be needed for that but i’m not sure how to go about with that. :alien:

If you mean what I think you mean, then you just have to make each section + transition into a separate movie, place them on the main timeline (off the screen for example), then assign each button an onClick() function with gotoAndPlay() to call up and make visible the correct movie.

ok, but if i press button 4 for example then it must play one two and three… if i was sitting on 6 then it must play 5 and 4…

hmmm. maybe i can write an if statement that will check where it is sitting and then play it from there…

hehehe, this is what i love about programming and scripting… have to keep on your toes all the time and its so exciting when you get something right…

thanx for the help… i’ll have to play around a bit and see what i can come up with. :alien:

Cool. Post what you make, so we can see it. :slight_smile:

Just keep a flag of the current movie - a single global variable that holds a number to say what movie you’re on. Then check that to see what other movies to run.

cool, thanx for that advice i will try it… don’t know when yet, because it was just something i saw and thought i want to do something like that… but if and when i do it i will most definately post a copy of it

:alien:

do u familiar with function??

i’m familiar with functions… why? what did you have in mind… so far i have a basic setup… zooming from one to two to three to four to five to six, and back… but i only have one button… only need to figure out how to do to make the multiple buttons work…

each level sets a global variable with a number… i traced the values and tested through all levels to make sure the numbers are correct.

may be this could make it easier for u…

MovieClip.prototype.zoom = function(endWidth, endHeight) {
	this.onEnterFrame = function() {
		currentWidth = this._width;
		diffWidth = endWidth-currentWidth;
		zoomWidth = diffWidth/5;
		this._width += zoomWidth;
		//
		currentHeight = this._height;
		diffHeight = endHeight-currentHeight;
		zoomHeight = diffHeight/5;
		this._height += zoomHeight;
	};
};

call it

on (release) {
	zoom(this._width*2, this._height*2);
}

or u could insert fix value

on (release) {
	zoom(200, 40);
}

just a suggestion… :smiley:

thanx… will have a look at that and see how i can include that… never knows… anything possible :slight_smile:

:alien:

see this fla…

hey thanx!

wow… i’m sure i’ll be able to do something with that. :slight_smile:

if you have to see my version you will laugh… so i’m not going to show my version to you… hehehe.

thanx for the help again

:alien:

good luck with your sofake…:stuck_out_tongue:

let me know if you wanna visit Kuala Lumpur… hehehe. i buy you lunch or dinner. :alien:

hey!! kuala lumpur is not far from jakarta!! unless u take a bike…

ok, if you like to do it the hard way, take a bike… else fly… sorry, no transporters like in startrek (yet(), so i can’t beam you up :frowning:
:alien:

Travel.Prototype.goTo = function(destination){
if(transport<aeroplane){
transport = bike;
goToAndPlay(destination);
else{
transport = transporters;
destination = ! destination;
}
}

hehehehe… ok, you try that one first :slight_smile: