Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A Thread 6 - We help!

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A Thread 6 - We help!
Page 4 of 8«<23456>»
Forum Login
Message << Older Topic   Newer Topic >>
12/2/2009 21:20:30   
Sea
Member

"'(' expected -- function onEnterFrame {"
AQ DF MQ  Post #: 76
12/2/2009 21:30:22   
EragonZZZZ
Member

Oops. Sorry

function onEnterFrame() {
//code
}
AQ  Post #: 77
12/2/2009 21:33:41   
Sea
Member

: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:

< Message edited by Sea -- 12/2/2009 21:34:20 >
AQ DF MQ  Post #: 78
12/4/2009 21:03:14   
flsg
Member

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

_____________________________

My flash gallery
my game thread

flsg, proud old member of AQ(still playing :O)
AQ  Post #: 79
12/4/2009 21:07:49   
Vampire and Human
Member

@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.
AQ  Post #: 80
12/4/2009 21:08:47   
~JW~
Member
 

I might switch. Someone told me is was harder though.
Post #: 81
12/4/2009 21:14:10   
Vampire and Human
Member

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.

< Message edited by Vampire and Human -- 12/4/2009 21:16:02 >
AQ  Post #: 82
12/4/2009 22:35:05   
EragonZZZZ
Member

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.

AQ  Post #: 83
12/5/2009 22:16:01   
Sea
Member

^ like it...
AQ DF MQ  Post #: 84
12/8/2009 17:08:07   
MegaPoster404
Member

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.

< Message edited by MegaPoster404 -- 12/8/2009 17:09:28 >
DF MQ  Post #: 85
12/8/2009 19:36:31   
EragonZZZZ
Member

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.
AQ  Post #: 86
12/9/2009 11:01:42   
~JW~
Member
 

Does anyone have any idea at ALL why this code isnt working:
(On a button)
on(release){
gotoAndStop(3);
}
It says "Invalid"
Post #: 87
12/9/2009 11:20:50   
Davosaur
Member
 

the Code works fine for me :S

sure its not a graphic?

< Message edited by Davyo -- 12/9/2009 11:21:43 >
Post #: 88
12/9/2009 19:32:57   
~JW~
Member
 

Its fixed. :D
My Flash was updating.
Post #: 89
12/12/2009 14:20:21   
//.Shadow.\\
Member

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?
AQ DF MQ  Post #: 90
12/12/2009 15:17:11   
Sea
Member

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
AQ DF MQ  Post #: 91
12/14/2009 7:33:09   
MegaPoster404
Member

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.
DF MQ  Post #: 92
12/14/2009 10:38:41   
biG frend
Member

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 )
AQ DF MQ  Post #: 93
12/14/2009 15:59:10   
Sea
Member

it's on the y axis...
AQ DF MQ  Post #: 94
12/15/2009 16:11:01   
Denolth
Sailing


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.
AQ DF MQ AQW Epic  Post #: 95
12/15/2009 17:14:07   
Sea
Member

:o i never thought of subtracting it =/

Razackie was trying to show me (as he learned boundaries from //.Shadow.\\) but it didn't work.
AQ DF MQ  Post #: 96
12/16/2009 2:51:37   
razackie
Member

I didn't learn it off shadow I learned it off the newgrounds boards. But yeah, the code worked for me :/
AQ DF MQ AQW Epic  Post #: 97
12/17/2009 20:23:10   
Sea
Member

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
AQ DF MQ  Post #: 98
12/22/2009 7:38:15   
Atriax
Member

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.
Post #: 99
12/22/2009 8:21:51   
hucki
Member

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!
AQ DF MQ AQW Epic  Post #: 100
Page:   <<   < prev  2 3 [4] 5 6   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A Thread 6 - We help!
Page 4 of 8«<23456>»
Jump to:



Advertisement




Icon Legend
New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Content Copyright © 2018 Artix Entertainment, LLC.

"AdventureQuest", "DragonFable", "MechQuest", "EpicDuel", "BattleOn.com", "AdventureQuest Worlds", "Artix Entertainment"
and all game character names are either trademarks or registered trademarks of Artix Entertainment, LLC. All rights are reserved.
PRIVACY POLICY


Forum Software © ASPPlayground.NET Advanced Edition