Forum Topic: Make a Better Windows Emulator!

(359 views • 29 replies)

This topic is 1 page long.

<< < > >>
Shouting

Archon68

Reply To Post Reply & Quote

Posted at: 6/20/08 08:17 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

Ok. I've seen ALOT of crappy windows emulators around Newgrounds. A huge problem in most (besides the fact that they are annoying and/or suck) is that when there are multiple windows open, you can only see the one on top, and when you click on another that is behind it, it doesn't move above the rest. Here is the code to fix this. It goes on each window/program. Make sure you make a new layer in the program's MC named "draggable part" and make a box that will act as the part you can drag. If you want to have more than 3 programs to drag/swap layers, just add them into the array and make sure you put MY_WINDOW = _root.MY_WINDOW.getDepth();

onClipEvent(load){
	this._alpha = 0;
	this.useHandCursor = false;
}
onClipEvent(enterFrame){
	WINDOW1 = _root.WINDOW1.getDepth();
	WINDOW2 = _root.WINDOW2.getDepth();
	WINDOW3 = _root.WINDOW3.getDepth();
	
	windows = new Array(WINDOW1, WINDOW2, WINDOW3);
	
	windows.sort();
	this.onPress = function(){
		_root.mines.startDrag();
		_root.mines.swapDepths(windows[0]);
	}
	this.onRelease = function(){
		_root.mines.stopDrag();
	}
}

Hope that clears some stuff up for you people who want to make windows mocks.

I code in AS2, in case I forgot to mention it.

BBS Signature

None

Treerung

Reply To Post Reply & Quote

Posted at: 6/20/08 08:23 PM

Treerung DARK LEVEL 11

Sign-Up: 04/18/08

Posts: 571

Can you not make 5 topics in the forum everyday?

:'(

BBS Signature

Goofy

zrb

Reply To Post Reply & Quote

Posted at: 6/20/08 08:24 PM

zrb LIGHT LEVEL 11

Sign-Up: 08/08/06

Posts: 4,562

Can you not make 5 topics in the forum everyday?

I think it goes against his religion.

School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

Archon68

Reply To Post Reply & Quote

Posted at: 6/20/08 08:29 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

I am in the "5 topics a day" cult. Join or we'll kill your baby!

I code in AS2, in case I forgot to mention it.

BBS Signature

None

Super-Yombario

Reply To Post Reply & Quote

Posted at: 6/20/08 09:01 PM

Super-Yombario FAB LEVEL 06

Sign-Up: 03/16/07

Posts: 1,183

I'm christian. Gtfo my intarwebs... unless, y'know, it offends you...

RIP Ed McMahon - RIP Farrah Fawcett - RIP Michael Jackson
But wait, there's more...
RIP Billy Mays


None

twistr

Reply To Post Reply & Quote

Posted at: 6/20/08 09:06 PM

twistr LIGHT LEVEL 05

Sign-Up: 06/19/08

Posts: 59

At 6/20/08 09:01 PM, Super-Yombario wrote: I'm christian. Gtfo my intarwebs... unless, y'know, it offends you...

im atheist. Beat that.

don't fear the reaper.


None

Super-Yombario

Reply To Post Reply & Quote

Posted at: 6/20/08 10:39 PM

Super-Yombario FAB LEVEL 06

Sign-Up: 03/16/07

Posts: 1,183

Jewish people are cool...

RIP Ed McMahon - RIP Farrah Fawcett - RIP Michael Jackson
But wait, there's more...
RIP Billy Mays


None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/20/08 11:03 PM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

zomg its teh religion fightz omgz oh teh noez!

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

Angry

evil-kefka

Reply To Post Reply & Quote

Posted at: 6/20/08 11:12 PM

evil-kefka EVIL LEVEL 18

Sign-Up: 07/14/03

Posts: 97

I'm a Juggalo!

Even though that's not really a religion... but I win anyways! >:(


None

Archon68

Reply To Post Reply & Quote

Posted at: 6/21/08 07:57 AM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

Wow... this topic went from "Help with windows emulators" to a epic battle over Allah, Jesus, and Science.

I code in AS2, in case I forgot to mention it.

BBS Signature

None

StaliN98

Reply To Post Reply & Quote

Posted at: 6/21/08 10:54 AM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 6/21/08 07:57 AM, Archon68 wrote: Wow... this topic went from "Help with windows emulators" to a epic battle over Allah, Jesus, and Science.

And don't forget the Flying Spaghetti Monster


None

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 6/21/08 11:12 AM

Coolio-Niato LIGHT LEVEL 28

Sign-Up: 06/30/05

Posts: 1,774

onRelease(){
       this.swapDepths(_root.getNextHighestDepth());
}

That is the only thing it should take. You WAYYYY overcoded.

=)

BBS Signature

None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/21/08 11:14 AM

GuyWithHisComp LIGHT LEVEL 27

Sign-Up: 11/10/05

Posts: 4,008

window1.onPress = changeDepth;
window2.onPress = changeDepth;
window3.onPress = changeDepth;
function changeDepth ():Void
{
	this.swapDepths( getNextHighestDepth() );
}

That is basically all that is required, with less code.

BBS Signature

None

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 6/21/08 11:18 AM

Coolio-Niato LIGHT LEVEL 28

Sign-Up: 06/30/05

Posts: 1,774

At 6/21/08 11:14 AM, GuyWithHisComp wrote: window1.onPress = changeDepth;
window2.onPress = changeDepth;
window3.onPress = changeDepth;
function changeDepth ():Void
{
this.swapDepths( getNextHighestDepth() );
}

That is basically all that is required, with less code.

Heh I was gonna do the frame function coding, but wanted to keep with the movieclip coding he had going on. Anyway, point is, this thread is a waste of space.

=)

BBS Signature

None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/21/08 11:43 AM

GuyWithHisComp LIGHT LEVEL 27

Sign-Up: 11/10/05

Posts: 4,008

At 6/21/08 11:12 AM, Coolio-Niato wrote: AYYYY

Damn, beat me by 2 minutes.

BBS Signature

None

ssjskipp

Reply To Post Reply & Quote

Posted at: 6/21/08 12:05 PM

ssjskipp LIGHT LEVEL 15

Sign-Up: 10/16/03

Posts: 860

XD, I love how we jumped from discussion on too many topics to religion...then back to the REAL topic...

But yeah, why are you even posting something like this? Iduno 'bout all of you, but I feel most of the [insert os here] Emulators fail pretty horribly...they're just a bunch of goto's....

"Give a man a match, and he'll be warm for a minute, but set him on fire, and he'll be warm for the rest of his life."


None

Archon68

Reply To Post Reply & Quote

Posted at: 6/21/08 12:35 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

At 6/21/08 11:12 AM, Coolio-Niato wrote: onRelease(){
this.swapDepths(_root.getNextHighestDept h());
}

That is the only thing it should take. You WAYYYY overcoded.

I tried that, but it didn't work with any more than 2 windows. This works with up to 10.

I code in AS2, in case I forgot to mention it.

BBS Signature

Angry

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 6/21/08 01:08 PM

Coolio-Niato LIGHT LEVEL 28

Sign-Up: 06/30/05

Posts: 1,774

Depths Change

Don't even lie.

=)

BBS Signature

None

Archon68

Reply To Post Reply & Quote

Posted at: 6/21/08 01:17 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

But it doesn't work if you want to have an interface or a start bar. I don't want windows to be above the start menu or the other interface elements.

I code in AS2, in case I forgot to mention it.

BBS Signature

None

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 6/21/08 01:26 PM

Coolio-Niato LIGHT LEVEL 28

Sign-Up: 06/30/05

Posts: 1,774

At 6/21/08 01:17 PM, Archon68 wrote: But it doesn't work if you want to have an interface or a start bar. I don't want windows to be above the start menu or the other interface elements.

Depths Change
Depths Fla

Dude just shut up. Your code is useless. Above are the things with a start bar that swaps depths to the depth higher than the highest element.

=)

BBS Signature

None

SamIam

Reply To Post Reply & Quote

Posted at: 6/21/08 01:50 PM

SamIam FAB LEVEL 28

Sign-Up: 04/13/06

Posts: 884

At 6/20/08 10:39 PM, Super-Yombario wrote: Jewish people are cool...

The guy from Assassin's Creed is Jewish


None

Archon68

Reply To Post Reply & Quote

Posted at: 6/22/08 07:26 AM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,482

The guy from Assassin's Creed is Jewish

RANDOM. Don't make this topic go back to religeon!

I code in AS2, in case I forgot to mention it.

BBS Signature

None

CaiWengi

Reply To Post Reply & Quote

Posted at: 6/22/08 07:50 AM

CaiWengi EVIL LEVEL 07

Sign-Up: 09/17/04

Posts: 1,517

At 6/22/08 07:26 AM, Archon68 wrote:
The guy from Assassin's Creed is Jewish
RANDOM. Don't make this topic go back to religeon!

Sorry if people are getting boreed with all the topics youve made about this bloody thing.

Sig by ApothicFlash <3

BBS Signature

Happy

ElementalStudio

Reply To Post Reply & Quote

Posted at: 6/22/08 07:52 AM

ElementalStudio DARK LEVEL 13

Sign-Up: 05/05/07

Posts: 67

wow thanks im gunna use that

Have any questions Email me or
PM me on Newgrounds

BBS Signature

None

DougyTheFreshmaker

Reply To Post Reply & Quote

Posted at: 6/22/08 08:32 AM

DougyTheFreshmaker NEUTRAL LEVEL 02

Sign-Up: 07/30/07

Posts: 520

Use the Flex framework.

We should take care not to make the intellect our god; it has, of course, powerful muscles, but no personality.
Freshmaking
Brainscrape

BBS Signature

None

MichaelHurst

Reply To Post Reply & Quote

Posted at: 6/22/08 12:42 PM

MichaelHurst FAB LEVEL 23

Sign-Up: 04/18/07

Posts: 4,623

At 6/20/08 11:12 PM, evil-kefka wrote: I'm a Juggalo!

Haha, yeah Ninja!

Modest Mouse, The Shins, Bedouin Soundclash, Cloud Cult, Shiny Toy Guns, and The American Analog Set.
Listen to them.

BBS Signature

None

Wiiporter

Reply To Post Reply & Quote

Posted at: 6/22/08 12:46 PM

Wiiporter DARK LEVEL 12

Sign-Up: 06/03/07

Posts: 260

Isn't the object of a Windows emulator usually to make it suck ass? Just saying...

you are probably not funny


None

Super-Yombario

Reply To Post Reply & Quote

Posted at: 6/22/08 12:47 PM

Super-Yombario FAB LEVEL 06

Sign-Up: 03/16/07

Posts: 1,183

At 6/21/08 01:50 PM, Hylian-Mafia wrote:
At 6/20/08 10:39 PM, Super-Yombario wrote: Jewish people are cool...
The guy from Assassin's Creed is Jewish

Irony, or coincidence?

RIP Ed McMahon - RIP Farrah Fawcett - RIP Michael Jackson
But wait, there's more...
RIP Billy Mays


None

MichaelHurst

Reply To Post Reply & Quote

Posted at: 6/22/08 12:52 PM

MichaelHurst FAB LEVEL 23

Sign-Up: 04/18/07

Posts: 4,623

Ok, this is getting way too off-topic

But Archon why did you post this here? The flash forum is mostly for asking questions and such. Maybe if you discovered something amazing that's never been done before, then you could post it here. But this isn't too new or exciting, so I wouldn't suggest making your own thread for it.

Modest Mouse, The Shins, Bedouin Soundclash, Cloud Cult, Shiny Toy Guns, and The American Analog Set.
Listen to them.

BBS Signature

Crying

didit

Reply To Post Reply & Quote

Posted at: 6/22/08 04:49 PM

didit DARK LEVEL 03

Sign-Up: 06/01/08

Posts: 6

i dont have a religion.... its just they all look the same... and when grooped up, every thing supports this...

i make NOTHING...


All times are Eastern Standard Time (GMT -5) | Current Time: 11:11 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!