side-scroling shooter (help MEEE!!!) page 2

41 posts

Flag Post

None of the following is meant to be taken in an offense or insulting manner.

I’m saying that trying to make a point with a comment like “Using a method badly will give you bad results!” is a completely empty statement

Thats not what I’m saying at all. As I said, you must not understand because of your inexperience.

Second, on a similar note, you guys really seem to think that I’m lashing out at you. I’m commenting on how people love to accept the norm as the only way to do things.

Not at all. Plus, this has nothing to do with the ‘norm’. The only reason the opinions of others are brought up was to support the fact that there are more advanced ways to do things and that there are reasons these methods have been abandoned.

Third, OOP is actually slower than “oldschool” code, like I said before. The reason AS3 runs faster than AS2 is because Flash Player 9 is very optimized for it.

This doesnt necessarily have anything to do with AS3. You brought that up because you seem to have a distaste for it. Plus, unless you have good experience in AS3, it may not be wise to make comments about whether its better or not. I could care less about discussing AS3 right now.

The real idea here is that you can’t call someone out because they use a different method than you.

No one was calling anyone out except you. I was simply trying to help someone advance their coding by pointing them towards better practices. You were the one that jumped in with the “What? Says who?” up in arms attitude and seemed to take offense to the idea that someone was putting down a style of coding you share. You asked me a question, and I was answering it. I think if you knew how to use OOP properly, you’d have a different viewpoint.

You have your own reasons.

Mine are based on nearly a decade of experience in the professional world, testing, researching and implementing countless projects using every single possible way of doing it. Whats yours based on?

You can argue that a stone works just as well at pounding nails in as a hammer does, and that you can build a house with a stone just as easy. Same with coding. If you want to stick with Flash 5 style coding, go ahead. Its only going to affect you. If you want to stay behind…ok. All I’m saying is dont encourage others to stay behind with you because you refuse to learn how to use advanced styles properly; and that its not wise to contradict someone with more experience who’s tested your methods, previous methods and current methods extensively. At least not until you have spent a credible amount of time testing them yourself. Unless you have advanced experience in OOP and updated event models, you dont really have much credibility to make a valid argument against it. So far, all I can see is that you have refused to learn new methods and are trying to justify your reasons for staying back.

It must strike a chord in you because you refuse to acknowledge that there is a better way to do it.

Back to the original point: using MovieClip.onEnterFrame on the timeline is not that hard, and it helps a new user learn to do things right the first time. As Indie said, holding yourself back only limits yourself professionally, and I can guarantee you that you’d get fired from some companies I work with if you refused to learn new methods.

Like I said, this is fine and all for you, but dont go arguing and discouraging others from learning the newer, cleaner methods of coding. You’ll just be helping to make their abilities obsolete. I would at least like to point out to them what the professional world considers “best practice”, so they have the option. If they choose to stay with amateur styles afterwards, thats their free choice.

In any case, I believe there is sufficient information and classes available for dedicated developers on how to become efficient and versatile at the same time (contrary to what you may believe is possible), so I’ll leave you to your personal beliefs and hope that others find that info. This silly discussion is long past stale.

 
Flag Post

OK… Wow this is making me laugh!

 
Flag Post

but if you want a simple yet immensly powerfull coding that wont take to much time out of your life but has a few les posiblilitys:use as2

They weren’t really debating whether to use AS2 or AS3. Things like onEnterFrame, onPress, and onRelease are all part of AS2 and are widely considered to be better to use than onClipEvent and on handlers for the reasons listed in the best practices article that arcaneCoder quoted.

 
Flag Post

i just worded its funky, its ben fixed

 
Flag Post

ok i know this is an old topic and this isin a way a bump but its for honest help.

ok if anyone can help me my problem is this

onClipEvent (enterFrame) {
	if (this.hitTest(ship)) {
		this._visible = false;
		_root.ship.frame= 2;
	}
}

what i want to happen is if this(cannonupgrade) hits ship, this’ visiblity will be false and i want it to be that on the ship the ship goes to frame 2.

 
Flag Post

Tried gotoAndPlay or/and gotoAndStop?

 
Flag Post

well the ting is i cantget anything on it to work

 
Flag Post
onClipEvent (enterFrame) {
	if (this.hitTest(ship1)) {
		this._visible = false;
		_root.ship1.gotoAndStop(2);
	}
}

ok ive done this but nothing will work…i might put on a fla cuz i just dont know

 
Flag Post

what doesn’t work? have you tried setting a trace() inside the brackets of the if statement? if not, you may have a problem with setting the onClipEvent to the correct object, the hitTest not being run on the right object, etc… If the code inside the if statement IS being run and it just isn’t doing anything, than I have no idea what would be wrong without seeing the .fla

 
Flag Post

ok hers how it is…

scene1>upgrade>upgrader(c up, code here)
scene1>ship(ship1)

the parenthases is the instance name and other info

 
Flag Post

ok heres an .fla

http://www.mediafire.com/?azg3vjdiixm

please someone help

 
Flag Post

Seriously, use onEnterFrame = function() { blablabla } before Indie scolded you XD

Now that I got your file, I have no idea what I’m supposed to do lolz. And I can’t “upgrade” XD

 
Flag Post

all my fla is is just a basic enjine that eventualy become aa demo level

 
Flag Post

ok inorder to get to the hittest code do this:

ok to get to the hittest code…2click on the red box and then click it once again and theres the code

 
Flag Post

hey um ive been patient but im just wanting some help here…all the instuctiond to get to code are above me.

im just soing this to do some thing as simble as make an upgrade go away from the game and for my ship to goto another frame.

 
Flag Post

this works

onClipEvent (enterFrame) {
	if (this.hitTest(_root.ship)) {
		this._visible = false;
		_root.ship.gotoAndStop(2);
	}
}