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

#176 2008-08-19 20:56:35

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

Re: coding in flash actionscript 2.0 for beginners

Yup, I know VB. All you really have to know is where to get each component of the form from, and how to change a property of an object. For example, you have a textbox. When a button is clicked, u want it to hide. Find out the number of the textbox. Assuming it is 1, double click the button on which the event occurs. Type the code:
Textbox1.visible=false

This sets the property, visible, to false, or hidden. You can see a full list of properties on the task bar on the right hand side of the form. That is basically it. If you have any specific questions, feel free to ask!


All your base are belong to us

Offline

 

#177 2008-08-19 21:29:11

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

Re: coding in flash actionscript 2.0 for beginners

Thanks! My class starts next week so I will ask anything then.

Offline

 

#178 2008-08-23 21:35:21

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

Re: coding in flash actionscript 2.0 for beginners

archmage wrote:

_y += Math.cos(_rotation*(Math.PI/180))*-number;

Are you sure it is -number? Is that cause of the way that the screen origin is the top left, and y positions are reversed?


All your base are belong to us

Offline

 

#179 2008-08-23 21:42:46

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

Re: coding in flash actionscript 2.0 for beginners

Although, judging by the way that it worked, i would have to say that it is correct. By the way, it will only render the frame after it has executed the script, correct?


All your base are belong to us

Offline

 

#180 2008-08-23 21:46:22

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

Re: coding in flash actionscript 2.0 for beginners

Ok, how do you reference the location of another object? I have the movieclip and instance named "P1" and am referencing it as P1._x and P1._y. Is this the proper way? It is not working. My object is not showing up anywhere on the screen. I have also tried referencing it as P1.x and P1.y, P1.X and P1.Y, and P1._X and P1._Y. Still, my efforts prove fruitless.......if I can JUST get this part to work, everything will function flawlessly. Wanna know what happens? The first point functions as it should, no glitches or anything. The second point literally falls to the bottom, and offscreen.......so what am I doing wrong?

Last edited by Cyclone103 (2008-08-23 21:53:41)


All your base are belong to us

Offline

 

#181 2008-08-23 22:06:40

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

Re: coding in flash actionscript 2.0 for beginners

Try using _root.P1._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

 

#182 2008-08-24 11:18:45

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

Re: coding in flash actionscript 2.0 for beginners

OH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Ok. That might work..........thanks!


All your base are belong to us

Offline

 

#183 2008-08-24 11:54:01

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

Re: coding in flash actionscript 2.0 for beginners

Yup, it works. Thanks Archmage, you rock!!!!!!!!!!!!!!!!!!!!!! I got it to work, now all I have to do is add some more points in, and add the proper API..........


All your base are belong to us

Offline

 

#184 2008-08-24 12:52:21

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Yup, it works. Thanks Archmage, you rock!!!!!!!!!!!!!!!!!!!!!! I got it to work, now all I have to do is add some more points in, and add the proper API..........

You didn't put _root before it? That is the basics! Everyone knows that!

Last edited by Bluestribute (2008-08-24 12:52:46)


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

 

#185 2008-08-24 13:01:27

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

Re: coding in flash actionscript 2.0 for beginners

Cept me lol! I was mostly focusing on the API to begin with.


All your base are belong to us

Offline

 

#186 2008-08-24 13:05:49

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Cept me lol! I was mostly focusing on the API to begin with.

Well, now you know mister. DONT FORGET! (woops, my planner said don't write in all caps XD or talk to Leroy the plastic doll)


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

 

#187 2008-08-24 14:24:29

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

Re: coding in flash actionscript 2.0 for beginners

K lol blues. And who is leroy the plastic doll?


All your base are belong to us

Offline

 

#188 2008-08-24 14:27:02

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

K lol blues. And who is leroy the plastic doll?

Someone on my planner. But remember- whenever it is something not related to it (like a different sprite) use _root. (I forget how Archmage put it)


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

 

#189 2008-08-24 14:44:55

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

Re: coding in flash actionscript 2.0 for beginners

Bluestribute wrote:

Cyclone103 wrote:

K lol blues. And who is leroy the plastic doll?

Someone on my planner. But remember- whenever it is something not related to it (like a different sprite) use _root. (I forget how Archmage put it)

_root refers to the stage. When you refer to _root.P1 you are referring to MC P1 on the stage. If your code is on the stage already you can refer to P1 using simply P1 because the code is already on the stage. You can refer to MC that are within MCs as well. Lets that that B1 is inside MC P1. Then you may refer to B1 like this: _root.P1.B1. If your MC is inside another MC you can also refer to the MC that the MC is within using _parent.


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

 

#190 2008-08-24 15:33:31

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

Re: coding in flash actionscript 2.0 for beginners

Ok, thanks! By the way archmage, is it possible to use API to create a 3d randomly generated runaround? It would be awesome!!!!!!!!!! Backface culling takes forever or so I hear.......


All your base are belong to us

Offline

 

#191 2008-08-24 19:26:55

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Ok, thanks! By the way archmage, is it possible to use API to create a 3d randomly generated runaround? It would be awesome!!!!!!!!!! Backface culling takes forever or so I hear.......

Err not really sure. I haven't really tried a lot of 3D stuff.


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

 

#192 2008-08-24 20:06:08

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

Re: coding in flash actionscript 2.0 for beginners

That actually surprises me. Ok, thanks anyway.


All your base are belong to us

Offline

 

#193 2008-08-24 20:11:07

Juzzy
Scratcher
Registered: 2008-08-24
Posts: 100+

Re: coding in flash actionscript 2.0 for beginners

Wow archmage, you are pretty cool. You know how to program in scratch and flash actionscript!


If you are reading this turn around, walk 3 steps, and do the chickendance
smile  big_smile  smile  big_smile  Which smiley is happier?

Offline

 

#194 2008-08-24 20:29:30

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

Re: coding in flash actionscript 2.0 for beginners

Juzzy wrote:

Wow archmage, you are pretty cool. You know how to program in scratch and flash actionscript!

Thanks man  smile  I also do java and pascal.


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

 

#195 2008-08-24 20:34:41

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Ok, thanks! By the way archmage, is it possible to use API to create a 3d randomly generated runaround? It would be awesome!!!!!!!!!! Backface culling takes forever or so I hear.......

it might be possible, though it would be hard to make random dungeon, since I think u can make 3d blocks and stuff in flash, which are made up of lots of squares a.k.a polygons. if u use polygons u might be able to make the angle of which u view, the hard part would be polygons interacting together, which would be really hard

Offline

 

#196 2008-08-28 00:06:06

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

Re: coding in flash actionscript 2.0 for beginners

This is a message to all actionscript fans. I found something that just blew my mind!

http://nonoba.com/

This site gives you an API to develop your own multiplayer games and will manage the servers and everything. If you want to make a multiplayer game I strongly recommend checking this site out.


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

 

#197 2008-08-28 14:53:37

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

Re: coding in flash actionscript 2.0 for beginners

Really???? Awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Omg I Need That So Badly!!!!!!!!!!!!!!!!!!!!!!!! Thanks So Much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


All your base are belong to us

Offline

 

#198 2008-08-28 15:21:23

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Really???? Awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Omg I Need That So Badly!!!!!!!!!!!!!!!!!!!!!!!! Thanks So Much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

One thing tho. Its AS3 only as I found out.


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

 

#199 2008-08-28 16:14:31

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

Re: coding in flash actionscript 2.0 for beginners

Oh. Still, its pretty cool. I will start out with AS2, and move on to 3 as soon as I am proficient enough. Now, with deprecated methods, can you still use them, or will they not work? I know it suggests you not use them.


All your base are belong to us

Offline

 

#200 2008-08-28 16:35:37

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

Re: coding in flash actionscript 2.0 for beginners

Cyclone103 wrote:

Oh. Still, its pretty cool. I will start out with AS2, and move on to 3 as soon as I am proficient enough. Now, with deprecated methods, can you still use them, or will they not work? I know it suggests you not use them.

AS3 is very different. This web page compares the 2 languages and shows you what has changed.

http://livedocs.adobe.com/flex/3/langref/migration.html


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

 

Board footer