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

#201 2008-08-28 16:44:09

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

Re: coding in flash actionscript 2.0 for beginners

I realized,  but 2 is probably better to start with.


All your base are belong to us

Offline

 

#202 2008-09-12 22:43:56

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

...http://www.soft32.com/download_353.html   flash mx...

Is the soft32 download one safe?

Last edited by keroro645 (2008-09-12 22:56:39)

Offline

 

#203 2008-09-12 22:48:21

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

Re: coding in flash actionscript 2.0 for beginners

keroro645 wrote:

Is the soft32 download one safe?

Yes, also please don't quote the entire post because its pretty long.


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

 

#204 2008-09-12 22:55:49

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

keroro645 wrote:

Is the soft32 download one safe?

Yes, also please don't quote the entire post because its pretty long.

Oh i didnt how long it was leme fix

Offline

 

#205 2008-09-12 23:00:39

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

Can you make games with mx?

Offline

 

#206 2008-09-13 01:24:32

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

Re: coding in flash actionscript 2.0 for beginners

keroro645 wrote:

Can you make games with mx?

Yes  smile

Offline

 

#207 2008-09-13 10:48:50

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: coding in flash actionscript 2.0 for beginners

deatheater wrote:

keroro645 wrote:

Can you make games with mx?

Yes  smile

good cause i dont feel like signing up for adobe.com

Offline

 

#208 2008-09-13 15:51:47

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

Re: coding in flash actionscript 2.0 for beginners

Hey, in CSS or the language for websites, is it possible to put if statments? Like if B link clicked change page X to show Y project but if G link pressed, chnge page X to show R Project? So that way I can put tons of projects on one page that only display 1 at a time depending on what link you clicked?

Last edited by Bobby500 (2008-09-13 15:52:45)

Offline

 

#209 2008-09-16 18:13:22

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

Re: coding in flash actionscript 2.0 for beginners

Also, I really need an extreme indepth tutorial on how to do animation. I mean tell me how to do EVERYTHING!!!

Edit: Oops, I forgot to mention that I needed this for Visual basic. Whoops.

Last edited by Bobby500 (2008-09-16 20:42:37)

Offline

 

#210 2008-09-16 20:36:40

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

Re: coding in flash actionscript 2.0 for beginners

Bobby500 wrote:

Also, I really need an extreme indepth tutorial on how to do animation. I mean tell me how to do EVERYTHING!!!

You need to be good at doing normal art firstly. But honestly, I can't draw that well at all. Thats why I usually offer coding advice instead of animation advice.

At any rate learning how to draw well takes a lot of practice. Try searching google or newgrounds for tutorials.


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

 

#211 2008-09-17 06:11:18

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

Re: coding in flash actionscript 2.0 for beginners

Sorrry archmage, I forgot to mention that the question was for visual basic. And I need the coding, what to save the picture as, where to put it, everything concering it because I can't get it to work.

Last edited by Bobby500 (2008-09-17 06:12:29)

Offline

 

#212 2008-09-27 17:59:02

jom
Scratcher
Registered: 2008-01-31
Posts: 27

Re: coding in flash actionscript 2.0 for beginners

you should make a fullon thing completly converting scratch into flash

with all
<move(  )steps><turn cw(  )degrees><point towards( <go to[ <change x by( <change y by( <if on edge, bounce><direction><x position><set y to( <set x to( <glide(  )secs to x sad   )y sad  <go to x sad   )y sad  <turn cw(  )degrees><stop all><repeat until><stop script><wait until><if><end><forever if><when I receive[ <broadcast[ <broadcast[  ]and wait c><forever><wait(  )secsc><when[  ]clicked><when[  ]key pressed><{  }>((  <+>  ))((  <->  ))((  </>  ))<pick random(  )to( <(  <<>  )><(  <=>  )><<  <and>  >>((  <mod>  ))<<  <not>  >><abs( <round(  and any more i f a forget

Last edited by jom (2008-09-27 18:01:15)


my company jybobards http://scratch.mit.edu/galleries/view/18083
dark knights skynet http://scratch.mit.edu/galleries/view/25533

Offline

 

#213 2008-09-27 18:23:25

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

Re: coding in flash actionscript 2.0 for beginners

Jom, there are other sites that explain flash commands so I am not going to bother. Just check out the link in the bottom of the first post.


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

 

#214 2008-09-28 23:44:24

dwayne12
Scratcher
Registered: 2008-09-28
Posts: 2

Re: coding in flash actionscript 2.0 for beginners

Someone should post a tutorial for Actionscript 3, isn't it completely different? Might give some newbies a run for their money tongue

Offline

 

#215 2008-09-29 09:13:35

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

Re: coding in flash actionscript 2.0 for beginners

dwayne12 wrote:

Someone should post a tutorial for Actionscript 3, isn't it completely different? Might give some newbies a run for their money tongue

Yeah I agree, someone should post an AS3 tutorial. I only have flash 8 which only supports AS2 so I can't give the tutorial. AS3 is very different but I heard that it is more like other languages and it promotes good coding habits.


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

 

#216 2008-10-04 12:57:10

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

umm, noob question... do i do this on a flash doc, AS file, Flash javascript file, flash project or what? :s. Sorry i just discovered flash 8 on my cpu so i have no idea about anything...

Edit: nevermind, its a flash doc :p. WOOT!!! my first thing don on flash!

Last edited by yambanshee (2008-10-04 13:01:23)

Offline

 

#217 2008-10-04 13:01:47

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

Re: coding in flash actionscript 2.0 for beginners

yambanshee wrote:

umm, noob question... do i do this on a flash doc, AS file, Flash javascript file, flash project or what? :s. Sorry i just discovered flash 8 on my cpu so i have no idea about anything...

1. open flash
2. make movie clip symbol and click on it
3. click on the scripting box at the bottom of the screen and start coding.


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

 

#218 2008-10-04 15:10:28

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

right... i actually made everything you said on the torturial, however the hit test doesint seem to work? another question, how do i make if certin buttons are pressed for example A: mine seems to be having trouble with that... I atempted something like this

Code:

onClipEvent(enterFrame){
if(Key.isDown(Key.A)){
_x-=5;}
if(Key.isDown(Key.D)){
_x+=5;}
if(Key.isDown(Key.W)){
_y-=5;}
if(Key.isDown(Key.S)){
_y+=5;}
}

Last edited by yambanshee (2008-10-04 15:12:43)

Offline

 

#219 2008-10-04 16:39:32

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

Re: coding in flash actionscript 2.0 for beginners

yambanshee wrote:

right... i actually made everything you said on the torturial, however the hit test doesint seem to work? another question, how do i make if certin buttons are pressed for example A: mine seems to be having trouble with that... I atempted something like this

Code:

onClipEvent(enterFrame){
if(Key.isDown(Key.A)){
_x-=5;}
if(Key.isDown(Key.D)){
_x+=5;}
if(Key.isDown(Key.W)){
_y-=5;}
if(Key.isDown(Key.S)){
_y+=5;}
}

Flash only has a few keycodes that you can simply type what the key is.

Try looking at this.

http://www.newgrounds.com/bbs/topic/417702


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

 

#220 2008-10-05 05:13:51

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

yambanshee wrote:

right... i actually made everything you said on the torturial, however the hit test doesint seem to work? another question, how do i make if certin buttons are pressed for example A: mine seems to be having trouble with that... I atempted something like this

Code:

onClipEvent(enterFrame){
if(Key.isDown(Key.A)){
_x-=5;}
if(Key.isDown(Key.D)){
_x+=5;}
if(Key.isDown(Key.W)){
_y-=5;}
if(Key.isDown(Key.S)){
_y+=5;}
}

Flash only has a few keycodes that you can simply type what the key is.

Try looking at this.

http://www.newgrounds.com/bbs/topic/417702

hey thanks. Nearly made a 2 player tag game now, just that the sencing aint working well. ive set it so that a variable changes when one touches another. problems: i dont know how to get it so it looks something like this when translated to scratch [blocks]<if><touching[ P2 ]>
  <if><( <{ It }> <=> 1 )>
  <set{ It }to( 0 )
  <else>
  <set{ It }to( 1 )
  <end>
<end>
[/blocks]

http://www.newgrounds.com/portal/view/463187 my first flash game :s!

Code:

onClipEvent(enterFrame){
    if (this.hitTest(_root.Floor)){
        _y-=4;}
    }

    onClipEvent(enterFrame){
    if (this.hitTest(_root.Left wall)){
        _x+=5;}
    }

    onClipEvent(enterFrame){
    if (this.hitTest(_root.Right wall)){
        _x-=5;}
    }

    onClipEvent(enterFrame){
    if (this.hitTest(_root.Roof)){
        _y+=2;}
    }

It keeps telling me i have errors: **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 7: ')' or ',' expected
         if (this.hitTest(_root.Left wall)){

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 9: Unexpected '}' encountered
         }
Yet i dont understand whythese errors are occuring

Last edited by yambanshee (2008-10-05 10:12:05)

Offline

 

#221 2008-10-31 06:31:12

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

~bumb~

Offline

 

#222 2008-10-31 08:58:25

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

Re: coding in flash actionscript 2.0 for beginners

onClipEvent(enterFrame){
    if (this.hitTest(_root.Floor)){
        _y-=4;
    }
    if (this.hitTest(_root.Left wall)){
        _x+=5;
    }   

    if (this.hitTest(_root.Right wall)){
        _x-=5;
    }
       if (this.hitTest(_root.Roof)){
        _y+=2;
    }
}

That should work. But if it doesn't then its probably because you can't have white space in your MC names.

Last edited by archmage (2008-10-31 09:07:39)


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

 

#223 2008-11-04 09:40:34

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

I made a small RPG, and i want to display the score once you finish the game. There is a variable named time and one named life. when i display the variable 'score' it says NaN. any help please?


Code:

onClipEvent(enterFrame){
    _root.score=time*life
}

Offline

 

#224 2008-11-04 09:45:54

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

Re: coding in flash actionscript 2.0 for beginners

yambanshee wrote:

I made a small RPG, and i want to display the score once you finish the game. There is a variable named time and one named life. when i display the variable 'score' it says NaN. any help please?


Code:

onClipEvent(enterFrame){
    _root.score=time*life
}

nan is Not a Number.

If the variables time and life are in root and the code is on an MC then you need to put _root. before you list your variables.

When ever you want to refer to the main stage (unless your code is on the stage) you must use _root.

You can also scroll the background by altering _root._x and _root._y.


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

 

#225 2008-11-04 11:33:04

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

yambanshee wrote:

I made a small RPG, and i want to display the score once you finish the game. There is a variable named time and one named life. when i display the variable 'score' it says NaN. any help please?


Code:

onClipEvent(enterFrame){
    _root.score=time*life
}

nan is Not a Number.

If the variables time and life are in root and the code is on an MC then you need to put _root. before you list your variables.

When ever you want to refer to the main stage (unless your code is on the stage) you must use _root.

You can also scroll the background by altering _root._x and _root._y.

Thanx! that helps me alot! another question, can you post a flash document without using something like newgrounds, for example, embeding it into this post? one more, how do i make textboxes move? i made a sort of scrolling effect with everything that shouldent scroll counteracting the scrolling by moving their x and ys, however textboxes with things such as score, life ect... still move.
While im at it, does flash have colour sencing?

Last edited by yambanshee (2008-11-04 12:15:51)

Offline

 

Board footer