Be a Supporter!
Response to: Clock Countdown Posted February 10th, 2009 in Game Development

For changing the colour of the clock press F1 in Flash and look up textFormat.color. Hex for red is 0xFF0000

Response to: globalToLocal(); syntax? Posted February 10th, 2009 in Game Development

At 2/10/09 07:37 AM, 4urentertainment wrote: What if the player was in another MC. How do I shapeFlag hitTest then???

Change all the _x and _y values in the enterframe code to _parent._x and _parent._y
Or just put the code on the external MC, instead of the nested one

Response to: globalToLocal(); syntax? Posted February 10th, 2009 in Game Development

The shapeflag hitTest seems to work fine to me, although it won't register until the MC is buried in the wall.
Adapted version here

Response to: [as2]array For Mcs ? Posted February 10th, 2009 in Game Development

Two MCs on stage, instance names: mc1, mc2
Code on main timeline:

mcArr=[_root.mc1,_root.mc2];					//THIS IS AN ARRAY

for(var i in mcArr){									//LOOP THROUGH ARRAY
	mcArr[i].onEnterFrame=function(){		//FOR EACH ITEM
		this._y+=2;										//MAKE IT FALL ON ENTERFRAME
	}															//
}																//
Response to: Using the same object many times Posted February 10th, 2009 in Game Development

At 2/10/09 05:51 AM, aplusads21 wrote: How do i create an instance with actions on it

I'm not sure which approach you're taking

Drag one instance of a movie clip from the library to the stage. Select it, on stage, and press F9. Paste your actions. Then just copy that on-stage MC and paste it as many times as you want, the code will come with it.

Response to: Using the same object many times Posted February 10th, 2009 in Game Development

At 2/10/09 05:35 AM, Deathcon7 wrote: Your grandma was obviously not strong in the force.

She was geriatrically procedural

Response to: music in flash problems! Posted February 10th, 2009 in Game Development

stopAllSounds(); on a timeline frame should do the job

Response to: Tast My game> Posted February 10th, 2009 in Game Development

Buttons on start screen too dark
Graphics look great
Like the idea of drag-on faces
Not sure about #4, looks out of place amongst the rest - no full body?
Maybe animate some shit in the background, give alternative backgrounds
Always nice to make some easter eggs/unlockables to add more depth, see the 'Dress My Babe' series for some good ideas on that - makes it more of a game
You might need to adjust depths, hair on MeWe overlays hat
Add a 'mute' button
That's about it. Looks good, just needs something extra to make it stand out

Response to: Using the same object many times Posted February 10th, 2009 in Game Development

Place an instance on stage, with the actions on it, then simply copy/paste multiple times.

It's either that or use (AS2) Duplicated Movie Clips/attachMovie to replicate an instance on stage or from the library. If you're doing that, you can add your actions as you create the new MC.

And then there's always classes, as Nano says, but they killed my grandma so I don't like them.

Response to: AS: Custem Cursor Posted February 10th, 2009 in Game Development

At 2/9/09 11:49 PM, baboop wrote: dude that seems way harder then the code i would use for a custom cursor.....here this is what i would
do.............

onClipEvent(enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
}

No offence, but games using that code cause irritating cursor flashing (particularly with Firefox) when the browser's not in focus. The movement of cursor to mouse should happen onMouseMove, not onEnterFrame, to save CPU, and the Mouse.hide() should only be run once in a while, not on every frame, to get rid of the original cursor in case someone right-clicks etc.

Something like this is better (untested)

onClipEvent(load){
	cnt=0;targ=100;Mouse.hide();
}
onClipEvent(mouseMove){
	cnt++;if(cnt>targ){cnt=0;Mouse.hide();}
	_x=_root._xmouse;
	_y=_root._ymouse;
}
Response to: Flash Sound Posted February 10th, 2009 in Game Development

At 2/9/09 10:59 PM, Deathcon7 wrote: Check out AS: Main.

AS: Sound, specifically. Although you don't HAVE to use actionscript, you can just drag a sound file straight from the library to a frame on any timeline

Response to: AS: Quality Toggling Posted February 10th, 2009 in Game Development

At 2/10/09 04:10 AM, Stromming wrote: Any ideas?

Not sure. Even if you had it running on an enterFrame, I doubt it'd be enough to cause CPU overload. Check the other parts of your script for recursive functions (ones that keep calling themselves indefinitely) or infinite for/while loops.

Response to: Colorful fonts? Posted February 10th, 2009 in Game Development

At 2/10/09 03:56 AM, ozdy wrote: Hello NGers,

I would like to know whether you can advise me on how I can make colorful fonts (fonts composed of more than one color). A good example is Mushroom Tower Defense. The font used throughout the game (based on comic sans I think) has two distinct colors, and somehow you can change both of them independently via function calls.
Has any of you an idea how it is done?

Best,
Ozdy

The outside colour is a glow filter (search GlowFilter in the Flash help files on how to change this dynamically via AS). The actually (inside) text colour can also be changed dynamically by using setTextFormat & TextFormat.color

Response to: please help me! this makes no sense Posted February 10th, 2009 in Game Development

At 2/9/09 11:52 PM, LostVoices wrote: you dynamic text box is DEFIENTLY rendering html thats the only thing that will make it do it

Actually, it's the input text box being set as html, and the dynamic textbox NOT being set as html, that will cause this

Response to: awomeness collab Posted February 9th, 2009 in Game Development

3.5 average is required to start a collab.
This says 3.0, but it's been raised since then.

Response to: Nice ass, honey Posted February 9th, 2009 in General

At 2/9/09 08:41 PM, Smidly wrote: then I'll be in a tomcruisemovvvvvvvvie

As in, the non-speaking actor that no-one cares about, who gets killed early in the plot? Cool.

Response to: so whats your career? Posted February 9th, 2009 in General

I'm a professional twat and get paid handsomely for it. Now mind your own, you nosy bastard.

Response to: I need a fighting game tut Posted February 9th, 2009 in Game Development

FlashMX/AS2 was released in 2002, you'll be hard-pressed to find AS1 tuts for what you want (I found little on Google), since most people have moved on. You may want to consider upgrading to MX or MX2004, if not Flash 8 or CS3/4. If/when you've got AS2 or 3, check out AS: Main and/or AS3: Main

Response to: I need some help with Flash CS4 Posted February 9th, 2009 in Game Development

I haven't upgraded from CS3 yet, but if you press F1 while in Flash and then click 'Using Flash' in the left-hand column, there's a list of things to learn, including a drawing section.

Also, there's always Google

Response to: Quick question on Saving. Posted February 9th, 2009 in Game Development

No, it's not possible to use JUST Flash to save that kind of data. You can save variables to a user's PC using Flash cookies (sol files), but to make something like a page counter you need ASP, PHP, CGI or similar, and probably an online database (although a Flash-specific multiplayer server will probably offer other options)

These tuts are for AS2, not sure which version you're on

AS: Flash/PHP Webpage Hit Counter
AS: Flash & PHP by shazwoogle
AS: Load External Data/Cross-Domain
AS: Loading/Unloading Data by shazwoogle

Response to: somebody help me please with flash Posted February 9th, 2009 in Game Development

You can check for regular events, ie. every 5 seconds, by comparing the time/5 with int(time/5)

New fla, code on main timeline frame 1:

time=0;												//TIME
div=5;												//DIVISOR TO CHECK
cnt=0;												//FRAME COUNTER
fps=24;												//FRAMES PER SECOND

onEnterFrame=function(){				//ENTERFRAME
	cnt++;											//INCREMENT COUNTER
	if(cnt>fps){									//HAS REACHED ONE SECOND
		time++;cnt=0;							//ADD A SECOND TO TIME, RESET COUNTER
		trace(time);								//TRACE
		if(time/div==int(time/div)){		//IS DIVISIBLE BY div (IE, 5)
			DOSOMETHING();				//TRIGGER EVENT
		}												//
	}													//
}														//


function DOSOMETHING(){				//TRIGGERED FUNCTION
	inte=div+"x"+time/div;					//UPDATE OTHER TEXTFIELD
	trace(inte);									//
}														//

Sample fla file

Response to: Very Simple Preloader Posted February 9th, 2009 in Game Development

Actionscript 2:

AS: Preloader by Snubby
AS: Preloader

Actionscript 3:

Simple Preloader

Response to: hitTests problem Posted February 9th, 2009 in Game Development

The code works, download the fla at the bottom of my last post and test it.

Response to: hitTests problem Posted February 9th, 2009 in Game Development

Make sure you have changed your 'wall' instance name to 'ground', as Magicalmonkeyguy said. If it still doesn't work, you'll have to be more specific about exactly HOW it's failing.

Here's a more basic hitTest code that works, but doesn't include jumping etc. It will only work for downfall, not sideways, but is relatively easily adapted.

onClipEvent (load) {
	var ground:MovieClip=_root.ground;
	var yvel:Number=0;
	var gravity:Number=1;
	var speed:Number=10;

}
onClipEvent (enterFrame) {
	yvel+=gravity;
	_y+=yvel;
	if(ground.hitTest(this)){
		while(ground.hitTest(this)){
			_y-=0.1;
		}
	}
	if(Key.isDown(Key.RIGHT)){_x+=speed;}
	if(Key.isDown(Key.LEFT)){_x-=speed;}
}

Fla

Response to: Big Sound problem Posted February 9th, 2009 in Game Development

Check Afro-Ninja's post in AS: Sound

Response to: Disable movement in certain... Posted February 9th, 2009 in Game Development

Being abusive towards people who are trying to help you is not generally a good plan. You didn't actually clarify what kind of game you're making in your first post, so it's not really surprising you didn't get the answers you needed.

onClipEvent (enterFrame) {
	speed = 6;
	if (Key.isDown(87) && !_root.pgo) {
		this._y -= speed;
		this._rotation = 0;
		while(this.hitTest(_root.enemy)){this._y += speed/10;}
	}
	if (Key.isDown(83) && !_root.pgo) {
		this._y += speed;
		this._rotation = 180;
		while(this.hitTest(_root.enemy)){this._y -= speed/10;}
	}
	if (Key.isDown(68) && !_root.pgo) {
		this._x += speed;
		this._rotation = 90;
		while(this.hitTest(_root.enemy)){this._x -= speed/10;}
	}
	if (Key.isDown(65) && !_root.pgo) {
		this._x -= speed;
		this._rotation = 270;
		while(this.hitTest(_root.enemy)){this._x+= speed/10;}
	}
	if (Key.isDown(65) && Key.isDown(83) && !_root.pgo) {
		this._rotation = 220;
	}
	if (Key.isDown(65) && Key.isDown(87) && !_root.pgo) {
		this._rotation = 320;
	}
	if (Key.isDown(68) && Key.isDown(83) && !_root.pgo) {
		this._rotation = 130;
	}
	if (Key.isDown(68) && Key.isDown(87) && !_root.pgo) {
		this._rotation = 45;
	}
}
Response to: The Flash 'Reg' Lounge Posted February 7th, 2009 in Game Development

FF Collabs

OK, hai guyz i iz new here (only vaguely active still, but now have a 6Mb ADSL conn and am going to be getting more active if I can spare the time), but there seems to be an overpowering number of Collab threads on the first page of the Flash forum. Is it time to have a clampdown again (long term regs will remember), or is it all cool?
I guess I should ask Tom for my BBS mod privileges back before too long

BTW thanks liiiiiiiiiiaaaaaaaaaaam for the warm welcome back. Old man indeed. I'll whup you with mah walking stick, you little whippersnapper

Response to: Odd Position Problem .:as2:. Posted February 7th, 2009 in Game Development

At 2/7/09 09:29 AM, Archon68 wrote:
At 2/7/09 09:24 AM, Archon68 wrote: And that video was the .swf file.
Well, it was a video of the .swf file. Not the actual thing. :-)

Yeah I see what you mean, I thought that was your desktop. Only suggestion I can really offer is that you have a conflict somewhere with depths or other MCs elsewhere in the coding

Response to: Odd Position Problem .:as2:. Posted February 7th, 2009 in Game Development

Video doesn't really show anything apart from the bottom right corner of the Flash stage.
In terms of the code, it appears to work fine.

I created a new fla, placed a button MC on stage and added that code to it, created a new MC with linkage "AdoozyFalsch", and added

numFalsches=0;
numWindows=1;

to the main timeline. On double-clicking the button, a new MC is attached at 400, 310.

Try doing it yourself in a new fla

Response to: Version much? Posted February 7th, 2009 in Game Development

There are a few tuts and links to CS3-specific sites in AS3: Main, but you don't specify whether it's coding or graphic help you need. Otherwise, I guess Google is as good as anywhere to start looking.