This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#126 2008-08-13 18:12:11

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

Bluestribute wrote:

archmage wrote:


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.

Oh, that's what that was! I was wondering what I had done there! Awesome! Now I thin kI can finish Bomb Squad now


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#127 2008-08-13 18:14:10

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Ok, um, its not pointing. Its kinda just does nothing........

In one of the above posts I typed a script that can make a MC point to the mouse. Find that code and use it.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#128 2008-08-13 18:15:00

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

heres my little tutorial on buttons, I'm gonna show the actionscript and explain it's equivilant in scratch  smile

on(release){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<wait until><<  <not> << <touching[ mouse pointer <and> <mouse down?> >> >>
<change{ variable }by( 1



on(press){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<change{ variable }by( 1



on(rollover){
_root.variable+=1   
}


that is equal to

<wait until><touching[ mouse pointer
<change{ variable }by( 1



on(rollout){
_root.variable+=1   
}


is equal to


<wait until><touching[ mouse pointer
<wait until><<  <not> <touching[ mouse pointer >>
<change{ variable }by( 1


hope that helped and archmage if u see anything wrong please tell me

Last edited by deatheater (2008-08-13 18:17:18)

Offline

 

#129 2008-08-13 18:20:03

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

See, that's why I post here- get quick replies. And noob friendly. And which we anyone suggest for random numbers (liek in my bomb squad):

A big if(not…)
        }else{
code or:

var nums = [1, 2, 3, 4, 5];
    for (var i in nums) {
        nums[i] = nums.splice(Math.floor(Math.random()*nums.length), 1, nums[i]);
    }
    trace(nums);
    var num1 = nums[0];
    var num2 = nums[1];
    var num3 = nums[2];
    var num4 = nums[3];
    var num5 = nums[4];
    //
    trace(num1+" "+num2+" "+num3+" "+num4+" "+num5);
Which would work better? Because each time, the first number is 1
Or better yet, what's the equivalent of Repeat until (I can't find that post)?

Last edited by Bluestribute (2008-08-13 18:22:29)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#130 2008-08-13 20:57:27

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Apparently those are strings, so how can I check each ones value? And is there an easier way to make them variables? Otherwise, how will I find each ones value?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#131 2008-08-14 14:52:39

mletreat
Scratcher
Registered: 2008-05-01
Posts: 100+

Re: coding in flash actionscript 2.0 for beginners

deatheater wrote:

heres my little tutorial on buttons, I'm gonna show the actionscript and explain it's equivilant in scratch  smile

on(release){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<wait until><<  <not> << <touching[ mouse pointer <and> <mouse down?> >> >>
<change{ variable }by( 1



on(press){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<change{ variable }by( 1



on(rollover){
_root.variable+=1   
}


that is equal to

<wait until><touching[ mouse pointer
<change{ variable }by( 1



on(rollout){
_root.variable+=1   
}


is equal to


<wait until><touching[ mouse pointer
<wait until><<  <not> <touching[ mouse pointer >>
<change{ variable }by( 1


hope that helped and archmage if u see anything wrong please tell me

Hey deatheater - maybe you could make this into a project to share with the community?

Offline

 

#132 2008-08-14 16:46:54

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

mletreat wrote:

deatheater wrote:

heres my little tutorial on buttons, I'm gonna show the actionscript and explain it's equivilant in scratch  smile

on(release){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<wait until><<  <not> << <touching[ mouse pointer <and> <mouse down?> >> >>
<change{ variable }by( 1



on(press){
_root.variable+=1   
}


that is equal to

<wait until><< <touching[ mouse pointer <and> <mouse down?> >>
<change{ variable }by( 1



on(rollover){
_root.variable+=1   
}


that is equal to

<wait until><touching[ mouse pointer
<change{ variable }by( 1



on(rollout){
_root.variable+=1   
}


is equal to


<wait until><touching[ mouse pointer
<wait until><<  <not> <touching[ mouse pointer >>
<change{ variable }by( 1


hope that helped and archmage if u see anything wrong please tell me

Hey deatheater - maybe you could make this into a project to share with the community?

I'll wait till I'm a bit better and give a bigger tutorial in the community

Offline

 

#133 2008-08-15 10:38:50

mletreat
Scratcher
Registered: 2008-05-01
Posts: 100+

Re: coding in flash actionscript 2.0 for beginners

Sounds good  smile

Offline

 

#134 2008-08-15 14:35:49

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

I am making an AS save and load tutorial (in flash) so people can do it easily. Thanks again fullmoon for that site!


All your base are belong to us

Offline

 

#135 2008-08-15 14:41:28

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#136 2008-08-15 15:38:52

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534

Can it be anything or does it have to be the strawberry clock?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#137 2008-08-15 15:40:38

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

archmage wrote:

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534

Can it be anything or does it have to be the strawberry clock?

It can be anything.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#138 2008-08-15 15:41:47

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534

What the heck is clock day??????


All your base are belong to us

Offline

 

#139 2008-08-15 15:43:31

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

And I really wish now that I had waited to submit my game............should I delete and resubmit it, or is that against the rules? And why does all of the fruit have a clock on it????? Makes no sense whatsoever. Oh well. The voice acting on a project of mine which will be out in a bit is coming along nicely. The animation is not, but it will eventually......


All your base are belong to us

Offline

 

#140 2008-08-15 15:43:53

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

archmage wrote:

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534

What the heck is clock day??????

There is a group on NG called the clock crew. Today is a tribute to them.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#141 2008-08-15 15:46:07

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

Cyclone103 wrote:

archmage wrote:

Hey is a message to all newgrounds fans. Today is clock day on newgrounds.com. On clock day EVERY flash submitted with get a good score regardless of how good or bad it is. So if you want to submit a bad flash today is the day for it.

http://www.newgrounds.com/

Here is my submission
http://www.newgrounds.com/portal/view/454534

What the heck is clock day??????

There is a group on NG called the clock crew. Today is a tribute to them.

Well, I submitted my glitchy idea for a game XD lol, should check it out.


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#142 2008-08-15 15:51:41

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

Zomg I wish I had waited now.......oh well.


All your base are belong to us

Offline

 

#143 2008-08-15 15:52:43

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

U guys see Strawberry 2095 yet? Rotflol, its so funny!!!!!!!!!!!!!!!!!!!!!!!!!!


All your base are belong to us

Offline

 

#144 2008-08-15 15:57:38

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

What's better- an awesome score or great score? Cause my game [profanity] IceCar Racers has a great score, but first an awesome score XD


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#145 2008-08-15 15:59:26

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Awesome score is the best.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#146 2008-08-15 16:00:31

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

Awesome score is the best.

Oh… lol, well, that game is my skill level


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#147 2008-08-15 16:14:02

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

lol. I am hopefully coming out with an awesome game soon. Thanks for that TD tutorial btw archmage, that was useful.


All your base are belong to us

Offline

 

#148 2008-08-15 16:15:20

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

lol. I am hopefully coming out with an awesome game soon. Thanks for that TD tutorial btw archmage, that was useful.

Your game was actually really cool


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#149 2008-08-15 16:22:09

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

Thanks, glad you think so! I am actually making a full game out of it, although the button you had to touch looked horrible at smaller sizes. I will have to make a button which can look good at any size.......


All your base are belong to us

Offline

 

#150 2008-08-15 16:29:34

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Thanks, glad you think so! I am actually making a full game out of it, although the button you had to touch looked horrible at smaller sizes. I will have to make a button which can look good at any size.......

How did you get the words? Usually, when I put them, when you mouseover them it switches to the text pointer, like:

Usuualy looks like the traditional pointer
Text pointer is the |


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer