Bluestribute wrote:
I've tried a couple places and got no answers. SO now i will ask here:
1) How can i make something have "costumes". Would it just be a frame for each possibility and change accordingly?
2) I'm making Bomb Squad- should I use movieClips for the buttons or buttons for the buttons, and
3) If I use buttons for the buttons (you know, the things you click), how can I make it only switch (and stay) on 1 of the button clips if a certain condition is true?
1) Use movieClips and change frame for different costumes.
2)Use buttons placed inside movieclips.
3) Use if (condition==true){ gotoAndStop(the correct frame) }
Also, try to ask more AS questions on newgrounds. You can get quick responses there.
Last edited by archmage (2008-08-11 15:59:15)
Offline
archmage wrote:
Bluestribute wrote:
I've tried a couple places and got no answers. SO now i will ask here:
1) How can i make something have "costumes". Would it just be a frame for each possibility and change accordingly?
2) I'm making Bomb Squad- should I use movieClips for the buttons or buttons for the buttons, and
3) If I use buttons for the buttons (you know, the things you click), how can I make it only switch (and stay) on 1 of the button clips if a certain condition is true?1) Use movieClips and change frame for different costumes.
2)Use buttons placed inside movieclips.
3) Use if (condition==true){ gotoAndStop(the correct frame) }
Also, try to ask more AS questions on newgrounds. You can get quick responses there.
I'll say this again (cause i said it in another post):
They don't seem that helpful towards "noobs". Anyways, I guess I'll try that.
Offline
could u put up a scratch/flash translation thing, have the blocks in scratch and tell the equivilant in flash
Offline
deatheater wrote:
could u put up a scratch/flash translation thing, have the blocks in scratch and tell the equivilant in flash
![]()
I guess so. But really, all you need to know is here.
http://www.newgrounds.com/bbs/topic/638183
That is for actionscript. You will also need to find tutorials on google for the basics of flash animation.
Hmmm lets see.
<move( number )steps>
_x += Math.sin(_rotation*(Math.PI/180))*number;
_y += Math.cos(_rotation*(Math.PI/180))*-number;
<turn cw( number )degrees>
_rotation+=number
<point towards( mouse
//This rotates me to the cursor, you can set the x and y to other things though
adjside = this._x+0-_root._xmouse;
oppside = this._y+0-_root._ymouse;
angle = Math.atan2(-oppside, adjside);
angle = Math.round(angle/Math.PI*180);
this._rotation = 270-angle;
<switch to costume[ number
//on a movieClip symbol with multiple keyframes inside
gotoAndStop(number)
<size>
_xscale for horizontal size and _yscale for vertical size.
<go back( )layers>
You can set the depth of an MC with this
swapDepths(Number);
<pen up>
For pen like effects see
http://www.newgrounds.com/bbs/topic.php?id=295557
<abs( <round(
Math.abs() Math.round()
Just a few. It would be too much to type to show all of the different codes.
Last edited by archmage (2008-08-11 18:25:10)
Offline
thanks
Offline
perhaps u can do the rest when u have nothing to do
Offline
How can I set the rotation center (asking here because you know what that is, I'll get a quick response, and is "noob" friendly, Archmage )?
Offline
Bluestribute wrote:
How can I set the rotation center (asking here because you know what that is, I'll get a quick response, and is "noob" friendly, Archmage
)?
when ur turning it into a movie clip, see those white boxes with a black box in one of them, I think u set the rotation using those blocks, and noob means begginer I think
Offline
deatheater wrote:
Bluestribute wrote:
How can I set the rotation center (asking here because you know what that is, I'll get a quick response, and is "noob" friendly, Archmage
)?
when ur turning it into a movie clip, see those white boxes with a black box in one of them, I think u set the rotation using those blocks, and noob means begginer I think
I know what nnob is, just don't like it. Soudns mean. And I already made it a movie Clip, I just need to set the rotation so it doesn't look like its on ice
Offline
Bluestribute wrote:
deatheater wrote:
Bluestribute wrote:
How can I set the rotation center (asking here because you know what that is, I'll get a quick response, and is "noob" friendly, Archmage
)?
when ur turning it into a movie clip, see those white boxes with a black box in one of them, I think u set the rotation using those blocks, and noob means begginer I think
I know what nnob is, just don't like it. Soudns mean. And I already made it a movie Clip, I just need to set the rotation so it doesn't look like its on ice
IDK what to do, probably something with sine and cos, wait, make a movieclip called starter, and put this code in, might want to check with archmage with this script
onClipEvent(enterframe){
_x=_x.starter
_y=_y.starter
_x += Math.sin(_rotation*(Math.PI/180))*10;
_y += Math.cos(_rotation*(Math.PI/180))*10;
}
there I think, it should rotate around the starter which will decide were it moves that should work I think, and make sure ur characters 90 degrees angle is facing upwards , happy uh.. ummm..... flashing
Offline
I have a non-noob question. For a change lol! How do you create a "shared object"? I understand them to be a necessity for saving data as a cookie on the users computer. I already know the AS for saving and loading, but I do not know anything about how to create a shared object. I have looked all over. Is it even possible in CS3? People were only talking about it in reference to flash 8.
Offline
Cyclone103 wrote:
I have a non-noob question. For a change lol! How do you create a "shared object"? I understand them to be a necessity for saving data as a cookie on the users computer. I already know the AS for saving and loading, but I do not know anything about how to create a shared object. I have looked all over. Is it even possible in CS3? People were only talking about it in reference to flash 8.
Try here. You seem to have caught on to AS pretty fast!
Bluestribute wrote:
How can I set the rotation center (asking here because you know what that is, I'll get a quick response, and is "noob" friendly, Archmage
)?
The rotation center is the white circle on a movie clip you see when you free-tranform it (select the clip, hit Q). You can just drag it around, but be sure it stays in the same place for the beginning and end of a tween or it'll mess things up.
Offline
Thanks! I think I get it now!
Offline
I can't find where it is, but how would I use the Flash equivalent of <wait( )secsc> in a code. Here is what I'm using:
if (time>0){
time -= 1;
_root.timer = time;
}
And something that supposedly is a second, but I know it is useless to put (just timeout(1000)). Thanks! And I did post it somewhere else FYI, but they aren't helpful there…
Offline
Bluestribute wrote:
I can't find where it is, but how would I use the Flash equivalent of <wait( )secsc> in a code. Here is what I'm using:
if (time>0){
time -= 1;
_root.timer = time;
}
And something that supposedly is a second, but I know it is useless to put (just timeout(1000)). Thanks! And I did post it somewhere else FYI, but they aren't helpful there…![]()
Flash doesn't have a wait script. Wait isn't that useful anyways.
Just try something like this.
onClipEvent(enterFrame){
time++;
if (time>=90){
// on 30 frames per second 3 seconds have passed
}
}
You honestly need to look at more tutorials and stuff. I remember when I was learning AS I only asked questions if I absolutely could not find another answer somewhere. Most of the questions you are asking can be answered by making a search on google.
Offline
archmage wrote:
Bluestribute wrote:
I can't find where it is, but how would I use the Flash equivalent of <wait( )secsc> in a code. Here is what I'm using:
if (time>0){
time -= 1;
_root.timer = time;
}
And something that supposedly is a second, but I know it is useless to put (just timeout(1000)). Thanks! And I did post it somewhere else FYI, but they aren't helpful there…![]()
Flash doesn't have a wait script. Wait isn't that useful anyways.
Just try something like this.
onClipEvent(enterFrame){
time++;
if (time>=90){
// on 30 frames per second 3 seconds have passed
}
}
You honestly need to look at more tutorials and stuff. I remember when I was learning AS I only asked questions if I absolutely could not find another answer somewhere. Most of the questions you are asking can be answered by making a search on google.
I like figuring it out by myself, which is why I ask- gives me a chance to figure it out too. And I figured an easier way- just changing it by .1 and making the text box smaller, cutting off the decimal placs\es
Offline
Here is one I can't use google for- why isn't this working?
http://board.flashkit.com/board/showthread.php?t=774650
That has the .fla file. I can't even continue because for some reason the score is whack, and it is too bad to put on Newgrounds yet (I'll improve it after someone figures this out). I've spent like a couple hours trying to figure out why, using all kinds of ways to keep score…
Offline
Ok, how do ya make an object point towards another object?
Offline
Alright, I got this.
onClipEvent(enterFrame){ this.direction=Math.atan2(_root._ymouse,_root._xmouse) }
it works fine. Now, how do I make it point in that direction plus 90? I tried everything.....
Offline
Cyclone103 wrote:
Alright, I got this.
Code:
onClipEvent(enterFrame){ this.direction=Math.atan2(_root._ymouse,_root._xmouse) }it works fine. Now, how do I make it point in that direction plus 90? I tried everything.....
onClipEvent(enterFrame){
this.direction=Math.atan2(_root._ymouse,_root._xmouse)+90
}
Offline
Ok, um, its not pointing. Its kinda just does nothing........
Offline
Is there a way to change costumes in 1 frame? So I don't have hundreds of frames, but only 1?
Offline
Bluestribute wrote:
Is there a way to change costumes in 1 frame? So I don't have hundreds of frames, but only 1?
Nope, 1 frame per costume. You can put animated MCs insides the frames if you want though.
Offline
archmage wrote:
Bluestribute wrote:
Is there a way to change costumes in 1 frame? So I don't have hundreds of frames, but only 1?
Nope, 1 frame per costume. You can put animated MCs insides the frames if you want though.
How can I do that? And is there a way only if a certain condition is true?
Offline
Bluestribute wrote:
archmage wrote:
Bluestribute wrote:
Is there a way to change costumes in 1 frame? So I don't have hundreds of frames, but only 1?
Nope, 1 frame per costume. You can put animated MCs insides the frames if you want though.
How can I do that? And is there a way only if a certain condition is true?
Double click on an MC to get inside so you can add frames. Use gotoAndStop to control which frame the MC is on.
Offline