Strike Force Heroes 2
The explosive sequel to the hit game Strike Force Heroes!
3.97 / 5.00 8,515 ViewsObsolescence
Defeat the enormous mechanical beasts--and become one of them.
4.01 / 5.00 42,294 Viewsok, i have flash cs4 and whenever i try to add actionscript to anything it says current selection cannot have actions applied to it so....... why does it do that and how can i get around it?
At 5/8/10 02:24 PM, mdpreado wrote: ok, i have flash cs4 and whenever i try to add actionscript to anything it says current selection cannot have actions applied to it so....... why does it do that and how can i get around it?
It is because you made an as3 document and you have to code in the timeline or .as files. You need to go new->as2 document. Or a better option is learn as3.
you are under AS3 I'm guessing you are used to AS2/1, AS3 doesn't allow AS to be added inside of objects you have to use classes for that. change the actionscript setting to AS2
File>Publish settings>Flash>ActionScript drop down box.
If you're trying to add actions directly to Movie Clips or Buttons - you can't do it that way in AS3. You have to create class files instead.
Indescriptive topic names have left me in despair!
what's wrong with this actionscript?
onClipEvent (enterFrame) {
// right
if (Key.isDown(Key.RIGHT)) {
_rotation = _rotation+move;
}
// left
if (Key.isDown(Key.LEFT)) {
_rotation = _rotation-move;
}
// up
if (Key.isDown(Key.UP)) {
if (move<8) {
move++;
}
} else if (move>0) {
move--;
}
// down
if (Key.isDown(Key.DOWN)) {
if (move>-10) {
move--;
}
} else if (move<0) {
move++;
}
// enter
if (Key.isDown(Key.ENTER)) {
_x = 200;
_y = 200;
_rotation = 0;
move = 0;
}
// _x & _y position
if (_rotation>180) {
_y = _y+(move*Math.cos(Math.PI/180*_rotation)
);
_x = _x-(move*Math.sin(Math.PI/180*_rotation)
);
}
if (_rotation<180) {
_y = _y-(move*Math.cos(Math.PI/180*_rotation)
);
_x = _x+(move*Math.sin(Math.PI/180*_rotation)
);
}
At 5/8/10 04:30 PM, mdpreado wrote: what's wrong with this actionscript?
Are you getting errors? or is it just not working as expected? a bit more information is needed.
At 5/8/10 04:30 PM, mdpreado wrote: what's wrong with this actionscript?
Well...
- You didn't use code tags
- You are coding on a MovieClip
- You are coding in AS2
- You didn't explain what it is supposed to do
- You didn't explain what is happening instead
- You didn't post any relevant error messages
Please, post more information.
Statement block must be terminated by '}'
Syntax error.
i copied this code so i don't get know all this jiba jaba
At 5/10/10 01:28 PM, mdpreado wrote: Statement block must be terminated by '}'
Syntax error.
i copied this code so i don't get know all this jiba jaba
Did you try...terminating the statement block by adding "}"? As in, put '}' at the end of the code.
Also, you blatantly state that you copied the code, and that you have no idea how it works...
You won't learn anything like this. It's a really counter-productive way of practicing Actionscript.
At 5/10/10 01:49 PM, mdpreado wrote: there is one
Another one maybe?
I copied and pasted your code into FlashDevelop, and the snippet you posted is missing a curly bracket at the end. The clipEvent is never closed this way.
At 5/10/10 01:58 PM, mdpreado wrote: thats not a snippit?
Yes, yes it is. Do you even know what that means?
This is completely irrelevant. Your problem is that you're missing a curly bracket at the end. That's it.
At 5/10/10 02:33 PM, mdpreado wrote: mayb im stupid
yes you are, that one closes the if statement's block.
indent your code!
At 5/10/10 02:33 PM, mdpreado wrote: mayb im stupid
*Facepalm*
I have no idea what you've written on that picture. But please, for the love of Joe. Just add. Another. Curly. Bracket.
There is a missing curly bracket. Add it. It's after the one already there. You need to add another one. Just put a curly bracket at the end. To close the clipEvent statement. Just add one more curly bracket at the end, after the one that's already there.
It's not that hard really...
yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee h
cheers i know its hard helping a stupid person
At 5/10/10 02:45 PM, mdpreado wrote: yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee h
cheers i know its hard helping a stupid person
It's even harder to help you.
MODERATOR CLOSE THIS NOW CAUSE ITS POINTLESS
At 5/11/10 04:29 PM, mdpreado wrote: MODERATOR CLOSE THIS NOW CAUSE ITS POINTLESS
It should be left open to make an example of people like you. Its not often callum gets angry, you've been very naughty , let this thread be open to people so that we may mock you.
that is all gents
At 5/8/10 02:24 PM, mdpreado wrote: ok, i have flash cs4 and whenever i try to add actionscript to anything it says current selection cannot have actions applied to it so....... why does it do that and how can i get around it?
In AS3 object can't have code placed on them. trust me... it's better that way.
At 5/11/10 04:59 PM, HDXmike wrote:At 5/11/10 04:29 PM, mdpreado wrote: MODERATOR CLOSE THIS NOW CAUSE ITS POINTLESSIt should be left open to make an example of people like you. Its not often callum gets angry, you've been very naughty , let this thread be open to people so that we may mock you.
that is all gents
k im a attention seeker
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
............ hum
obvious troll is obvious?
ahhh... how i missed ng