RE: Flash Q&A thread 3 (Full Version)

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



Message


Umbrix -> RE: Flash Q&A thread 3 (7/22/2007 16:22:40)

Yeah. I can't say I really understand. Sorry :(

If you -could- find that, i'd appreciate it very much!




Myhos -> RE: Flash Q&A thread 3 (7/23/2007 10:08:28)

quote:

ORIGINAL: flsg

OMG, someone posted?! Impossible lol
Myhos: if it stays with the pointer, how can it point to the direction of the pointer? I don't understand lol...

What i mean is that the object points toward the pointer and if you move your mouse then the pointer will still point in the the direction of mouse

ex:

(pointer be here)---> mouse be here



//Now i move the mouse up:



Mouse be here

(pointer be here) ^





EragonZZZZ -> RE: Flash Q&A thread 3 (7/23/2007 17:24:43)

Thats less scripting and more trigonometry.
So it's going to be hard. Trust me, deriving trigonometric equations isn't fun...did it by accident once when I was trying to do rotation with VBA and PowerPoint. Had to keep a line the same length as I rotated it...by moving the endpoint around. Hell.




flsg -> RE: Flash Q&A thread 3 (7/24/2007 9:48:41)

once I saw a method in the Math class that simplifies lots of things...just enter some x and y coordinations and it gives you the angle...forgot which...
I'm going to check it




somebody621 -> RE: Flash Q&A thread 3 (7/24/2007 10:50:25)

pfft
Math.atan2(mouse's x - pointer's x, mouse's y - pointer's y);
Convert that angle from radians into degrees, and there you go.




flsg -> RE: Flash Q&A thread 3 (7/24/2007 11:17:44)

somebody621: yeah that's right! lol
and welcome back XD




EragonZZZZ -> RE: Flash Q&A thread 3 (7/24/2007 16:18:50)

ohhh whoops.
I must've been thinking of something else.
Yeah, the only problem I had was figuring out how you did an inverse tan with flash lol.




SirSchmoopy -> RE: Flash Q&A thread 3 (7/24/2007 16:34:12)

i need help with a lil' problem. i wanna make it so the thing i made rolls the random number, then subtracts it from the other thing, without me haing to right down every number frum 1-1000000000000000000000000000000234232456436142005349090783......and 4....
im kinda confused can u plz help me?




flsg -> RE: Flash Q&A thread 3 (7/25/2007 10:36:52)

SirSchmoopy: what? XD
I think you mean get a series of unique random numbers right?
create an empty array, each time you get a random number, check if there's already this number in the array, if not, put it in the array, else, re-generate another number




dominic_r_monroe -> RE: Flash Q&A thread 3 (7/25/2007 11:02:20)

Is there anyone here who doesn't mind teaching me Althorne just has pure facts and i can't remember coding with him. The sto is full :(




SirSchmoopy -> RE: Flash Q&A thread 3 (7/25/2007 11:09:29)

no, i mean, lets say theres the number 100. it rolls a number, lets say 2. then it subtracts the number 2 from it and makes it 98. however, i dont want to right a code where it says when the number is 2 or sumtin, minus 2 from 100, for every single number that exsists.




flsg -> RE: Flash Q&A thread 3 (7/25/2007 11:36:04)

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...




Rain -> RE: Flash Q&A thread 3 (7/25/2007 12:00:55)

Plz help

I need to learn to draw in flash... I am a very good ActionScripter but I need some drawing tuts...




Umbrix -> RE: Flash Q&A thread 3 (7/25/2007 15:17:05)

Anybody else have any ideas for Fire? I'd really appreciate it! :p




flsg -> RE: Flash Q&A thread 3 (7/25/2007 17:10:06)

Rain: lol, I looked at your Java code(right?) in your gallery, I hope you're as good as in AS[:)]
like programming, drawing needs practice too, here:(I'm too lazy to find the good site, sorry)
http://www.google.ca/search?source=ig&hl=en&q=flash+drawing+tutorial&meta=
umbrix: I didn't find my fire, so here's another one:
http://as3.betaruce.com/tut/fire/fire_f8.html




SirSchmoopy -> RE: Flash Q&A thread 3 (7/25/2007 17:12:28)


quote:

ORIGINAL: flsg

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...

lets say there's a monster. above him is a dynamic text for his hp. when i generate the random number, it subtracts that number from his hp. but, i dont want to write for every number, a code saying minus this certain amount from the hp.




flsg -> RE: Flash Q&A thread 3 (7/25/2007 17:13:44)

SirSchmoopy: then why don't you just use monsterHp-=random(MaxNumber)?




SirSchmoopy -> RE: Flash Q&A thread 3 (7/25/2007 17:35:31)

now ur confusing me! whts the maxnumber thingy? my brain hurts....




flsg -> RE: Flash Q&A thread 3 (7/25/2007 18:12:22)

just replace the number by the max number value+1
why don't you check the actionscript help documentation?




Myhos -> RE: Flash Q&A thread 3 (7/26/2007 8:26:05)

quote:

ORIGINAL: SirSchmoopy

now ur confusing me! whts the maxnumber thingy? my brain hurts....


All right what he means is that you have a variable called monster HP

so you need to put in the key frame:

 var monsterHp = 100;
monsterHp -= random (99) +1;


now what the code says is "New Variable called monsterHp which is = to the value of 100. now - it by a random number between 0 and 99 and add the value of 1 to it"

Or even better would be:

 var monsterHp = random (99) +1 




dominic_r_monroe -> RE: Flash Q&A thread 3 (7/26/2007 15:37:17)


quote:

ORIGINAL: flsg

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...



Althorne the way he teaches

(some kinda coding)
4t#dsdsffdsffsdfd
sdfsfdsfsfdfdawdfs
adfdfdsfdfsdsdff

(replace weird language with what it does it ussually has 3 or 4 lines)




petermaxo -> RE: Flash Q&A thread 3 (7/26/2007 15:56:36)

I am working on an AQ style RPG and for monsters I just made one big movie clip with all of them in it and put the following code.

this.onEnterFrame = function(){
if(_global.ename == "mon1"){ //if the enemy's name is something...
this.gotoAndStop(1) //goto the frame of the movie clip with that monster on it.
}if(_global.ename == "mon2"){ //repeat
this.gotoAndStop(2)
}if(_global.ename == "mon3"){
this.gotoAndStop(3)
}...
}

when I have the movie clip in a scene, the movie goes back to the begining.




flsg -> RE: Flash Q&A thread 3 (7/26/2007 17:46:23)

dominic_r_monroe: lol if Althorne sees this he'll never talk to you again lol
petermaxo: wow, I didn't understand the problem, but I know that you won't get far with this code(no offense)
first of all, what is the "this" you refers to? the code can't be on a movieclip, since you'll need to use "onClipEvent(enterFrame)"
which means that the "this" you're refering can't be the mc, so of course when you write this.gotoAndStop(frame), the movieclip doesn't do the action...

second, why would you want to use onEnterFrame? Isn't putting the mc to the right frame once enough? You're telling the mc to go to the desired frame each 1/12 seconds(or 1/24, depend on your FPS)

third, if you thought a little bit, this code will NEVER work. Imagine if AQ used your way. 600+ monsters means 600+ if()? No way.




EragonZZZZ -> RE: Flash Q&A thread 3 (7/26/2007 19:12:33)

lol, flsg just tore yo method apart.
Just kidding. But yeah...no go, man, no go.

Instead...give each frame the name of the monster (say its "monster1")
Then, when the monster name is given, say gotoAndStop(monstername)




SirSchmoopy -> RE: Flash Q&A thread 3 (7/27/2007 10:15:24)

quote:

ORIGINAL: flsg
why don't you check the actionscript help documentation?

wht AS help documentation?
also, why wuld i add 1 to it????? i just want it to subtrace the EXCACT number from his hp
http://img171.imageshack.us/my.php?image=scrollerew0.swf Im using it for the gun in this game i press a button, that does 2 things:
1. make a bullet animation.
2.generates a random number of how much damage it does.




Page: <<   < prev  10 11 [12] 13 14   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.1132813