RE: Flash Q&A Thread 6 - We help! (Full Version)

All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy



Message


Sea -> RE: Flash Q&A Thread 6 - We help! (12/2/2009 21:20:30)

"'(' expected -- function onEnterFrame {"




EragonZZZZ -> RE: Flash Q&A Thread 6 - We help! (12/2/2009 21:30:22)

Oops. Sorry

function onEnterFrame() {
//code
}




Sea -> RE: Flash Q&A Thread 6 - We help! (12/2/2009 21:33:41)

:D thanks, worked...
but now he moved like a mile a day >.> oh well, it's no fun without bugs to swat.

*presses EragonZZZZ's rep +1 button* (imaginary FTW)

Edit: Fixed D:




flsg -> RE: Flash Q&A Thread 6 - We help! (12/4/2009 21:03:14)

I came back to see if anyone even bothered to turn to AS3
*goes back lurking*




Vampire and Human -> RE: Flash Q&A Thread 6 - We help! (12/4/2009 21:07:49)

@flsg: I will be soon, once I can find a good way to learn... mostly due to it seeming business disallows me from working with anybody unless I can use SFS for AS3... My coder is being buggy :S.




~JW~ -> RE: Flash Q&A Thread 6 - We help! (12/4/2009 21:08:47)

I might switch. Someone told me is was harder though.




Vampire and Human -> RE: Flash Q&A Thread 6 - We help! (12/4/2009 21:14:10)

Not the slightest ;), I heard the opposite. Super easy, though quite hard to transition from AS2. But, well... meh.

I'll go out through the interwebs and find some good guides/tutorials that'll help teach AS3, to help people switch over, if they please.




EragonZZZZ -> RE: Flash Q&A Thread 6 - We help! (12/4/2009 22:35:05)

Oh. Good timing. I've been using exclusively AS3 for forever now.

Collision Detection/Geometry Test

Move the shape around with your mouse.
Shape changes color when it collides with the other two shapes.

Up arrow adds vertices (triangle becomes square, square becomes pentagon, etc.)
Down arrow subtracts vertices (square becomes triangle, pentagon becomes square, etc.)

Click and hold to change how stuff renders.





Sea -> RE: Flash Q&A Thread 6 - We help! (12/5/2009 22:16:01)

^ like it...




MegaPoster404 -> RE: Flash Q&A Thread 6 - We help! (12/8/2009 17:08:07)

EragonZZZZ: You may want to work on something. When it goes down to -1 points on the figure (I assume this is how you coded it), the thing crashes.




EragonZZZZ -> RE: Flash Q&A Thread 6 - We help! (12/8/2009 19:36:31)

I'd fix that, but I can't think of a single scenario where I'd need -1 points on a shape =P

The incrementing thing has no bounds simply because I threw that on at the end so people could play with it.




~JW~ -> RE: Flash Q&A Thread 6 - We help! (12/9/2009 11:01:42)

Does anyone have any idea at ALL why this code isnt working:
(On a button)
on(release){
gotoAndStop(3);
}
It says "Invalid"




Davosaur -> RE: Flash Q&A Thread 6 - We help! (12/9/2009 11:20:50)

the Code works fine for me :S

sure its not a graphic?




~JW~ -> RE: Flash Q&A Thread 6 - We help! (12/9/2009 19:32:57)

Its fixed. :D
My Flash was updating.




//.Shadow.\\ -> RE: Flash Q&A Thread 6 - We help! (12/12/2009 14:20:21)

Well, I need some help. :) Im not stuck on the coding side of things just wondering if theres a better way to put this.

var randomMax = random(_root.damMax);
var damageDon = random(_root.damMin)+randomMax;

if(_root.damMax > _root.damMin){
trace("Miss");
}else{
trace("Hit");
}

Any ideas?




Sea -> RE: Flash Q&A Thread 6 - We help! (12/12/2009 15:17:11)

I need a bit of help too

i want to add boundaries, on the walls i have

onClipEvent(enterFrame){
	if(Key.isDown(Key.UP)){
	if(_root.player.hitTest(this)){
								 speed=0;
								 }
	}
	if(Key.isDown(Key.RIGHT)){
		if(_root.player.hitTest(this)){
		speed=10;
	}
	}
	if(Key.isDown(Key.LEFT)){
		if(_root.player.hitTest(this)){
		speed=10;
	}
	}
	if(Key.isDown(Key.DOWN)){
		if(_root.player.hitTest(this)){
		speed=10;
	}
	}
}




it wont let me move anywhere when i hit the, what's wrong? what's the proper code?
I only want it if you try to go past the boundary




MegaPoster404 -> RE: Flash Q&A Thread 6 - We help! (12/14/2009 7:33:09)

Well, I'm assuming that you didn't make the boundary four separate movie clips, so it's just one rectangle, and flash hit tests count everything in the area of the movieclip including empty space as being hit.

Also, your code makes it so if you hit a wall, you'll never be able to move again :/

The code is doing exactly what you told it to do, but not what you wanted it to do.




biG frend -> RE: Flash Q&A Thread 6 - We help! (12/14/2009 10:38:41)

Wrong flash doesn't hit.test void using one mc to hold all your boundaries is a solid idea.

What you need to do sea is tell the player mc in the boundary code that the players x or y cannot go any further (depending on what side your detecting collision for )




Sea -> RE: Flash Q&A Thread 6 - We help! (12/14/2009 15:59:10)

it's on the y axis...




Denolth -> RE: Flash Q&A Thread 6 - We help! (12/15/2009 16:11:01)

Sea, instead of changing the speed, you can just change the character's x and y. If the character walking speed is 10, it will the following:

If you don't want the character to go to the left, on the boundarie, add this:

onClipEvent(enterFrame) {
	if(this.hitTest(_root.player)) {
		_root.player._x += 10;
	}
}


If you don't want the character to go to the right, just change the + symbol to -, like this:

onClipEvent(enterFrame) {
	if(this.hitTest(_root.player)) {
		_root.player._x -= 10;
	}
}


Now, if you don't want the character to go up, add this:

onClipEvent(enterFrame) {
	if(this.hitTest(_root.player)) {
		_root.player._y += 10;
	}
}


But if you don't want it to go down, just change the symbols:

onClipEvent(enterFrame) {
	if(this.hitTest(_root.player)) {
		_root.player._y -= 10;
	}
}


This code should be added to the boundaries. If you can avoid changing the speed, do it. This way, the speed will always be 10 and the character won't be able to go where it shouldn't.




Sea -> RE: Flash Q&A Thread 6 - We help! (12/15/2009 17:14:07)

:o i never thought of subtracting it =/

Razackie was trying to show me (as he learned boundaries from //.Shadow.\\) but it didn't work.




razackie -> RE: Flash Q&A Thread 6 - We help! (12/16/2009 2:51:37)

I didn't learn it off shadow I learned it off the newgrounds boards. But yeah, the code worked for me :/




Sea -> RE: Flash Q&A Thread 6 - We help! (12/17/2009 20:23:10)

I'm back! But not for a coding problem... (surprisingly :P)

I'm more seeking a tutor for as3 (or as2, either one :D )

thanks




Atriax -> RE: Flash Q&A Thread 6 - We help! (12/22/2009 7:38:15)

I'm working on a little project of my own.
But, i have a problem.
The character is key controlled, (similar to RotRC) and I can't figure out how to change the standing still animation to the walking animation.
I would also like to add borders, so the character can't leave the screen.




hucki -> RE: Flash Q&A Thread 6 - We help! (12/22/2009 8:21:51)

I'm currently using AS3, and I'm starting to use AS files.
However, I'm stuck on one thing.
I've made this as an example:
http://dazalem.com/Click.zip

What I want it to do, is have the AS file run a function that can be found in the FLA.
I don't know how to access the FLA function though, as it comes up with an error saying that the function doesn't exist.
I know that I could just code everything in the FLA, or everything in the AS file, but for the thing that I'm using this for, I need to access some art from the FLA, and the code can't be done in AS3.

Thanks for all of your help!




Page: <<   < prev  2 3 [4] 5 6   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.1367188