New to flash,new to this forum

hello All,

I’m new to flash and have a question about the perspective tutorial i was wondering how to modify the code to make the text go from small to large.

Thanks, Sickboy

Try this…

onClipEvent (load) {
	z = 0;
	zspeed = 5;
	fl = 300;
}
onClipEvent (enterFrame) {
	scale = fl/(fl-z);
	_xscale = _yscale=20*scale;
	z += zspeed;
}

Change the 20 in the on enterFrame code to adjust the starting size of your text. The smaller the number of course the smaller the text starts off.

The other thing changed was the fl+z was changed to fl-z

Hope it works… It is untested. Let me know if it does.

hey there… welcome to kirupa!

You need to make sure your scaling factor is more than 1. In the tute the scaling factor is something like .6 if you started with a small object and had a scaling factor of 1.6 it would grow. Home this clears it up for you I tried to use the same language used in the tute.

By the way is your name inspired by trainspotting?

Peace

Drat Lost, posting at the same time again!! BLAST

lol, well I guess we will find out whos method works now. I didn’t test mine. So I am clueless as to if it works.

I guess we will see :evil: :stuck_out_tongue:

yeah I just explained the concept - though he would figure out the code being that the first part of the tute talks about scaling factor they should have the same effect, you just actually got into it - I mearly brushed the concept… I am pretty much a lazy butt… :-\ :rambo:

Hehe, allow me, please :stuck_out_tongue:

onClipEvent (load) {
	z = 0;
	zspeed = 5;
	fl = 300;
}
onClipEvent (enterFrame) {
	scale = fl/(fl-z);
	_xscale = _yscale=20*scale;
	z += zspeed;
}

The problem with your code, Lost, is that when z=300, which will happen, scale=fl/(fl-z)=300/0=infinity. I’m not sure that it is what you want.

And Ryall, you’re right, except for the fact that if the scaling factor is 1.6, your object is already big. Basically, your object get’s bigger is the scaling factor grows.

So let’s stay simple. You want your object to grow? Just put it far away, and make it come closer and closer and closer all the time :slight_smile:

onClipEvent (load) {
	// big z <-> far away
	z = 3000;
	zspeed = 5;
	fl = 300;
}
onClipEvent (enterFrame) {
	scale = fl/(fl+z);
	_xscale = _yscale=20*scale;
	// z decreases <-> object comes closer
	z -= zspeed;
}

pom :cowboy:

Ah very good info :slight_smile:

I was semi-close…haha :stuck_out_tongue:

well that was fast, Thanks for the quick responce…i’ll give it a shot tonight like i said i’m a rookie to flash so some of that was
overwhelming. but great!

Ryall “By the way is your name inspired by trainspotting?”

NA, the names from Social Distortion song title “sickboy”

also can you guys give me the names of some books on AS, I have Foundation Flash by friends of ED but it dose not get in to AS that much

Thanks, Sickboy

Watch out for the new book from Colin Moock. Coming out soon… Go to the random forum, a thread called “it’s coming” for more info.

pom :rambo:

Flash MX studio by friends of ED… great book that is all AS, and if you want to get tricky with AS get Flash Math Creativity by the same people… awesome books, and I’d definitly check out the one that ilyas suggested - I think that is going to be my next purchase.

Peace