00:00
00:00
Newgrounds Background Image Theme

Herozaitama just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Foss: Transitions

3,288 Views | 37 Replies
New Topic Respond to this Topic

Foss: Transitions 2005-09-28 18:39:38


I was thinking we could help out n00bs just as the Virtual Camera has done by making a transitions class for them to have easy transitions done via actionscript and API. So if anyone wants to add in little scripts to this (or indeed fix up my otherwise lazy code) feel free

Here is the source so far note that I am ill and I whipped this up in 20 mins

class trans {
public var fps;
// Wipe
public function wipe(color, alp, duration, x, y, xtgt, ytgt) {
_root.createEmptyMovieClip("fader", 999);
with (_root.fader) {
lineStyle(0, 0, 0);
beginFill(color, alp);
var bounds:Object = _root.getBounds(_root);
trace(bounds);
moveTo(0, 0);
lineTo(bounds.xMax, 0);
lineTo(bounds.xMax, bounds.yMax);
lineTo(0, bounds.yMax);
lineTo(0, 0);
endFill();
_x = x;
_y = y;
}
_root.fader.fps = this.fps;
_root.fader.onEnterFrame = function() {
this._x += (xtgt/duration)/fps;
this._y += (ytgt/duration)/fps;
};
}
// Fade
public function fade(color, alp, duration) {
_root.createEmptyMovieClip("fader", 999);
with (_root.fader) {
lineStyle(0, 0, 0);
beginFill(color, alp);
var bounds:Object = _root.getBounds(_root);
trace(bounds);
moveTo(0, 0);
lineTo(bounds.xMax, 0);
lineTo(bounds.xMax, bounds.yMax);
lineTo(0, bounds.yMax);
lineTo(0, 0);
endFill();
_x = _y=0;
}
_root.fader.fps = this.fps;
_root.fader.onEnterFrame = function() {
this._alpha -= (alp/duration)/fps;
trace(this._alpha);
};
}
}

And here is something you can put in frame 1 to test it out

var fadem:trans = new trans();
fadem.fps = 20;
fadem.wipe(0xFFF000, 20, 2,0,0,550,400);


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 07:16:43


I cannot beleive nobdy replied
This could be a realy cool thing for n00bs


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 07:53:37


its because we need examples :p


website :: hugostonge.com

my job :: we+are

Response to Foss: Transitions 2005-09-29 08:31:05


Yeah, and will you make some other cool effects? Or will your lazy ass wait for others to make more? ;-)

Response to Foss: Transitions 2005-09-29 09:29:31


You 2 are dicks. This is a FOSS thread you dumbass meaning we all modify it how we want. You dont need examples because everything you need is in the first post. Dont call me fucking lazy when your dumb ass hasnt contributed at all


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 10:15:08


This is a Flash 8 code right?

I doubt a lot of bad Flash artist's have Flash 8 yet(that includes me)


wat

Response to Foss: Transitions 2005-09-29 11:29:30


What do you mean by transition?

You mean like George Lucas transition?

Response to Foss: Transitions 2005-09-29 13:14:14


At 9/29/05 10:15 AM, Thomas2005 wrote: This is a Flash 8 code right?

I doubt a lot of bad Flash artist's have Flash 8 yet(that includes me)

No silly this code can be used in flash MX as well because it doesnt use any new peices of code
:P
Obviously you dont know OOP

At 9/29/05 11:29 AM, T-H wrote: What do you mean by transition?

You mean like George Lucas transition?

Yes hence the code above


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 13:21:27


At 9/29/05 01:14 PM, Ninja-Chicken wrote:
At 9/29/05 11:29 AM, T-H wrote: What do you mean by transition?

You mean like George Lucas transition?
Yes hence the code above

Didn't really read into it cos you didn't post an example :P

Response to Foss: Transitions 2005-09-29 13:25:02


At 9/29/05 01:21 PM, T-H wrote:
At 9/29/05 01:14 PM, Ninja-Chicken wrote:
At 9/29/05 11:29 AM, T-H wrote: What do you mean by transition?

You mean like George Lucas transition?
Yes hence the code above
Didn't really read into it cos you didn't post an example :P

For god sakes its just pure code copy and paste it theres your example
But for those of you lazy people out there here is an example of the wipe function
(this is just the code I wrote above as an example put into a swf and put on imageshack fo' your lazy asses

http://img95.imagesh..e=transitions1gx.swf


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 13:29:33


We want to see how it works and WHAT IT LOOKS LIKE though. Why are you getting so damn defensive?


BBS Signature

Response to Foss: Transitions 2005-09-29 13:30:55


At 9/29/05 01:29 PM, Atomic_Sponge wrote: We want to see how it works and WHAT IT LOOKS LIKE though. Why are you getting so damn defensive?

Im not getting defensive because noones insulting me. Dude dont get emo im just saying everybody keeps bugging me about getting an example of something I have already given them the code for. Though if you read there is an example above so use that if you intend on adding something.

emo

- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 13:32:08


I'm getting Syntax Errors...


wat

Response to Foss: Transitions 2005-09-29 13:34:03


At 9/29/05 01:32 PM, Thomas2005 wrote: I'm getting Syntax Errors...

Thats because when you copy code from a thread some of it doesnt fit on and it screws up just go check all the lines that flash reports as an error and fix it
and I dont think youll be able to help because you obviously know didly squat about OOP and not much about AS


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 13:45:40


At 9/29/05 01:34 PM, Ninja-Chicken wrote: Thats because when you copy code from a thread some of it doesnt fit on and it screws up just go check all the lines that flash reports as an error and fix it
and I dont think youll be able to help because you obviously know didly squat about OOP and not much about AS

which goes to, once again, reinforce my point that, when hes in the mood, NC sure can be a dick. of course, in his defence, copying and pasting code is quite simple. gee, anyone can do it. but, thanks to the efforts of NC, you too can be an asshole...

...in three easy steps.

BBS Signature

Response to Foss: Transitions 2005-09-29 13:49:39


At 9/29/05 01:45 PM, authorblues wrote:
At 9/29/05 01:34 PM, Ninja-Chicken wrote: Thats because when you copy code from a thread some of it doesnt fit on and it screws up just go check all the lines that flash reports as an error and fix it
and I dont think youll be able to help because you obviously know didly squat about OOP and not much about AS
which goes to, once again, reinforce my point that, when hes in the mood, NC sure can be a dick. of course, in his defence, copying and pasting code is quite simple. gee, anyone can do it. but, thanks to the efforts of NC, you too can be an asshole...

...in three easy steps.

Hey I have been completely polite and you come here and call us both assholes
Authorblues you can be an asshole sometimes : )

<3

Cmon guys if anyone wants to mod this then just do so otherwise just let it die


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 14:04:38


If this code was aimed at newbies then you want the least number of parameters possible for simplicity. If it were me I would get rid of x, y, xtgt, ytgt and in the code just use 0, 0, Stage.width, Stage.height. The color alpha and duration are okay but adding an extra function for just a black screen wipe would be ideal. Anybody know if Flash can overload methods? If it can then this is perfect for it. I'll get around to testing it in a bit. If you wanted it to be extra spiffy with easing functions you could use actionscripted tweens (in fact this is one of the best places I've seen for them yet.) SInce this is a FOSS I might get around to adding actionscripted tweens to it sometime.

Response to Foss: Transitions 2005-09-29 14:22:28


I don't know about OOP,but I sure as hell know enough about AS to get by so shut the fuck up and go fuck yourself.


wat

Response to Foss: Transitions 2005-09-29 14:28:00


At 9/29/05 02:22 PM, Thomas2005 wrote: I don't know about OOP,but I sure as hell know enough about AS to get by so shut the fuck up and go fuck yourself.

right why are you being hostile?
Dude go learn some mannors and whilst your away learn AS

dick head

- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 15:43:00


At 9/29/05 02:28 PM, Ninja-Chicken wrote:
At 9/29/05 02:22 PM, Thomas2005 wrote: I don't know about OOP,but I sure as hell know enough about AS to get by so shut the fuck up and go fuck yourself.
right why are you being hostile?
Dude go learn some mannors and whilst your away learn AS
dick head

Excuse me, folks. Here's a translation in English for you:
Dude, go learn some manners and while YOU'RE away, learn AS.

Seriously, I don't get why he's being so defensive. It's not like that throw up of an excuse for a FOSS is worth a topic of it's own, anyways. I like how he says the other is being hostile, and right away calls him a dickhead. Sigh.. typical british. Tea time!

Response to Foss: Transitions 2005-09-29 15:46:20


okay go away fwe nobody likes you and also its a transition not a translation
see you thought you were being witty but really you just cant read


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 15:48:23


everyone get off N-C's back.
He gives you a FOSS, and you flame him in return....he isn't being defensive...he's pissed off because no-one understands its....copy & paste so you can test it yourself and see how you like it....now, go away unless you have something decent to say.
go on.
shoo.
fuck off.

Response to Foss: Transitions 2005-09-29 15:49:27


At 9/29/05 03:46 PM, Ninja-Chicken wrote: okay go away fwe nobody likes you and also its a transition not a translation
see you thought you were being witty but really you just cant read

Moron, I was TRANSLATING what you said in noob, to english so everyone could understand you. See, you thought you had more than an ounce of common sense, but i guess you were wrong. <antiban>And who's this fwe? </antiban>

Response to Foss: Transitions 2005-09-29 15:50:23


thanks NC, you did get defensive but it doesn't matter.

i'll try out the code in a bit, this is a cool idea and hopefully could bring some life to Inglors FOSS topic. i hope you can post a few more deifferent types though, and more of an explanation for us non ASers.


WEBSITE

BLOG ~ Dont fuck around with my dog. All that I can see I steal. ~

NG FFR ~ Automatic for the people.

BBS Signature

Response to Foss: Transitions 2005-09-29 15:51:16


okay then your clearly new here so please dont flame and go and read the BBS rules


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 15:53:21


At 9/29/05 03:50 PM, _Mogly_ wrote: thanks NC, you did get defensive but it doesn't matter.

i'll try out the code in a bit, this is a cool idea and hopefully could bring some life to Inglors FOSS topic. i hope you can post a few more deifferent types though, and more of an explanation for us non ASers.

Yeah see the idea was I was gonna get all the regs to add a function or 2 and then we could release it to n00bs like the virtual camera only I got a bunch of wannabe flashers on here flaming away
I though someone could do a box out thing for it and I was thinking of doing a bunch of little squares that all fall off screen
Ill do an updasted version soon and hopefully the n00bs will go away


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 15:53:38


At 9/29/05 03:51 PM, Ninja-Chicken wrote: okay then your clearly new here so please dont flame and go and read the BBS rules

And the award of the night, goes toooooo.....

Foss: Transitions

Response to Foss: Transitions 2005-09-29 15:53:40


At 9/29/05 03:49 PM, lolkatrina wrote:
At 9/29/05 03:46 PM, Ninja-Chicken wrote: okay go away fwe nobody likes you and also its a transition not a translation
see you thought you were being witty but really you just cant read
Moron, I was TRANSLATING what you said in noob, to english so everyone could understand you. See, you thought you had more than an ounce of common sense, but i guess you were wrong. <antiban>And who's this fwe? </antiban>

"More wood for their Fires, Love Neighbors"
okay...a bfeif explanation of system of a downs song:
Flaming is picking up here.
Stop the Flaming and complement some elses hard work...kay?

Response to Foss: Transitions 2005-09-29 15:56:33


At 9/29/05 03:53 PM, lolkatrina wrote:
At 9/29/05 03:51 PM, Ninja-Chicken wrote: okay then your clearly new here so please dont flame and go and read the BBS rules
And the award of the night, goes toooooo.....

okay WTF is a regocnition?

your level 1
2 posts
no movies
and your calling me a n00b?
STFU and go away before you get your ass banned


- Matt, Rustyarcade.com

Response to Foss: Transitions 2005-09-29 15:57:55


At 9/29/05 03:53 PM, Ninja-Chicken wrote:
At 9/29/05 03:50 PM, _Mogly_ wrote: thanks NC, you did get defensive but it doesn't matter.

i'll try out the code in a bit, this is a cool idea and hopefully could bring some life to Inglors FOSS topic. i hope you can post a few more deifferent types though, and more of an explanation for us non ASers.
Yeah see the idea was I was gonna get all the regs to add a function or 2 and then we could release it to n00bs like the virtual camera only I got a bunch of wannabe flashers on here flaming away
I though someone could do a box out thing for it and I was thinking of doing a bunch of little squares that all fall off screen
Ill do an updasted version soon and hopefully the n00bs will go away

cool idea. it would be good to make a little .Fla for it with a bunch of different transitions in the libary. for example there could be a few animated ones, and a few that are just ASed. If you want some animated ones when this properly takes off i'll start contributing.

and people who dont like FWE, just ignore him, if he spams back, he gets banned... simple!


WEBSITE

BLOG ~ Dont fuck around with my dog. All that I can see I steal. ~

NG FFR ~ Automatic for the people.

BBS Signature