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

#151 2008-08-15 16:31:57

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Nice. Clock Day. I am sorry, but I have to agree with the commenters on those games. The funny thing is, archmages is better by far, but bluestribe has a score of 5 and archmage of 3.2 and not that if not for bluestributes ten.

Offline

 

#152 2008-08-15 16:39:03

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

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 |

I used static text. You probably used dynamic or user input.


All your base are belong to us

Offline

 

#153 2008-08-15 16:40:31

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Bluestribute wrote:

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 |

I used static text. You probably used dynamic or user input.

… (<--- that means I feel like an idiot or something like that[I forgot 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

 

#154 2008-08-15 17:29:12

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

LOL that's...that's low, archmage. I was wondering why everything had clocks on it, I just got an NG account today.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#155 2008-08-15 19:57:52

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

Bobby500 wrote:

Nice. Clock Day. I am sorry, but I have to agree with the commenters on those games. The funny thing is, archmages is better by far, but bluestribe has a score of 5 and archmage of 3.2 and not that if not for bluestributes ten.

u mean my [] IceCar Driver? Lol, I know… Anyways:

I want to make an animation during my game. I can't find the equivalent's to:

<wait(  )secsc>
<repeat(

And only Scratch members know what those blocks mean, so I can't post naywhere else. And I DID look around first

If you want to use <wait>, try adding more frames to your timelines. At 15 fps, adding fifteen frames will cause the animation to wait 1 sec. As for "repeat", use:

for (var i:Number = 4; i > 0; i--) {
    //Your code here
}

where i is the number of times to repeat.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#156 2008-08-15 19:59:54

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

Re: coding in flash actionscript 2.0 for beginners

fullmoon wrote:

Bluestribute wrote:

Bobby500 wrote:

Nice. Clock Day. I am sorry, but I have to agree with the commenters on those games. The funny thing is, archmages is better by far, but bluestribe has a score of 5 and archmage of 3.2 and not that if not for bluestributes ten.

u mean my [] IceCar Driver? Lol, I know… Anyways:

I want to make an animation during my game. I can't find the equivalent's to:

<wait(  )secsc>
<repeat(

And only Scratch members know what those blocks mean, so I can't post naywhere else. And I DID look around first

If you want to use <wait>, try adding more frames to your timelines. At 15 fps, adding fifteen frames will cause the animation to wait 1 sec. As for "repeat", use:

for (var i:Number = 4; i > 0; i--) {
    //Your code here
}

where i is the number of times to repeat.

Wow. Must have taken a little whlie considering I deleted that post seeing i thought that wait wasn't in Flash (but the frame thing seems cool). I wanna try the repeat! I think I will! Thanks!


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

 

#157 2008-08-16 17:59:18

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

Re: coding in flash actionscript 2.0 for beginners

Is this correct for having an instance go to another instance?:

_x = _root.birdy
_y = _root.birdy


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

 

#158 2008-08-16 18:30:44

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

Is this correct for having an instance go to another instance?:

_x = _root.birdy
_y = _root.birdy

_x=_root.birdy_x

or _xbirdy

or birdy._x

or _x.birdy

one of those, do the same for y

Offline

 

#159 2008-08-16 18:36:46

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

Re: coding in flash actionscript 2.0 for beginners

deatheater wrote:

Bluestribute wrote:

Is this correct for having an instance go to another instance?:

_x = _root.birdy
_y = _root.birdy

_x=_root.birdy_x

or _xbirdy

or birdy._x

or _x.birdy

one of those, do the same for y

I did the first one. Obviously than it is the variables messing up


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

 

#160 2008-08-16 18:41:22

halfbaked_fullmoon
Scratcher
Registered: 2008-08-16
Posts: 2

Re: coding in flash actionscript 2.0 for beginners

no, use _root.birdy._x

Offline

 

#161 2008-08-16 21:35:56

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

Re: coding in flash actionscript 2.0 for beginners

halfbaked_fullmoon wrote:

no, use _root.birdy._x

thats the 3rd one I had up yes I think u use that

Offline

 

#162 2008-08-17 11:20:06

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

Re: coding in flash actionscript 2.0 for beginners

I am going to make a Word document with all of the useful Actionscript that I know, not just by itself, but in context, such as
onRelease{
getURL("siteofchoiceURL","_blank")
}
being the script for a button opening a URL of choice in a new, blank window. I will post it on my site as a download as soon as I am done.


All your base are belong to us

Offline

 

#163 2008-08-18 00:10:26

jwiens
Scratcher
Registered: 2007-10-17
Posts: 39

Re: coding in flash actionscript 2.0 for beginners

whats the difference between AS3 and AS2. I like using AS2 because it's easier to find help online.

Offline

 

#164 2008-08-18 00:59:44

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

Re: coding in flash actionscript 2.0 for beginners

jwiens wrote:

whats the difference between AS3 and AS2. I like using AS2 because it's easier to find help online.

AS3 is up to 10 times more efficient. Thats the main reason why most people 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

 

#165 2008-08-18 01:55:56

VisibleMan
Scratcher
Registered: 2008-08-11
Posts: 7

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

jwiens wrote:

whats the difference between AS3 and AS2. I like using AS2 because it's easier to find help online.

AS3 is up to 10 times more efficient. Thats the main reason why most people use it.

It also has more toys.  And, it's actually x30 faster.  Go figure.

I started working with it a while back and then switch back to AS2.  I think it's time I took another stab at it.

Offline

 

#166 2008-08-18 21:20:13

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

Re: coding in flash actionscript 2.0 for beginners

The Newgrounds tutorial wasn't very good on duplicating movie clips. I know how, but when I did it, none of them counted if they hit the character. How can I do it so they sense the character (each duplicate) and hide accordingly, but add 1 more rain drop each time?


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

 

#167 2008-08-18 22:02:52

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Anybody know virtual Basic?

Offline

 

#168 2008-08-18 22:08:45

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

Re: coding in flash actionscript 2.0 for beginners

Bobby500 wrote:

Anybody know virtual Basic?

Cyclone103. He told me that's why he's good at Flash


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

 

#169 2008-08-18 22:50:10

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

The Newgrounds tutorial wasn't very good on duplicating movie clips. I know how, but when I did it, none of them counted if they hit the character. How can I do it so they sense the character (each duplicate) and hide accordingly, but add 1 more rain drop each time?

if(this.hitTest(_root.character)){
duplicate sprite script
remove sprite script
}else{
y+=2
}

that might work  smile

Offline

 

#170 2008-08-18 22:52:33

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

Re: coding in flash actionscript 2.0 for beginners

deatheater wrote:

Bluestribute wrote:

The Newgrounds tutorial wasn't very good on duplicating movie clips. I know how, but when I did it, none of them counted if they hit the character. How can I do it so they sense the character (each duplicate) and hide accordingly, but add 1 more rain drop each time?

if(this.hitTest(_root.character)){
duplicate sprite script
remove sprite script
}else{
y+=2
}

that might work  smile

That doesn't look like AS2 deatheater…


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

 

#171 2008-08-18 23:18:09

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

deatheater wrote:

Bluestribute wrote:

The Newgrounds tutorial wasn't very good on duplicating movie clips. I know how, but when I did it, none of them counted if they hit the character. How can I do it so they sense the character (each duplicate) and hide accordingly, but add 1 more rain drop each time?

if(this.hitTest(_root.character)){
duplicate sprite script
remove sprite script
}else{
y+=2
}

that might work  smile

That doesn't look like AS2 deatheater…

if(this.hitTest(_root.character)){
duplicateMovieClip(_root.raindrop,raindrop,whatever the depth is);
removeMovieClip(this);
}else{
y+=2
}


something more like this, and it is in as2

Offline

 

#172 2008-08-19 00:41:11

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

The Newgrounds tutorial wasn't very good on duplicating movie clips. I know how, but when I did it, none of them counted if they hit the character. How can I do it so they sense the character (each duplicate) and hide accordingly, but add 1 more rain drop each time?

//Use this to check if the hero is touching duped MC 1 through 20
for (i=0;i<20;i++){
//The names of the duped MCs start with dupe and end with a number from 1 to 20
if (_root["dupe"+i].hitTest(this)){
trace("You got hit");
}
}

To delete them use
removeMovieClip(target);


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

 

#173 2008-08-19 09:15:07

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

Re: coding in flash actionscript 2.0 for beginners

Cool. I was wondering how to tell if something is touching a duped MC............


All your base are belong to us

Offline

 

#174 2008-08-19 13:41:08

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Can Cyclone103 give a quick tut on Virtual basic because my programming class uses it and I want to be ahead.

Offline

 

#175 2008-08-19 18:51:41

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Not sure here but I think Cyclone knows Visual Basic. I've never heard of Virtual Basic.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

Board footer