2011-09-09

FLASH CS3 - Action Script part 1

This tutorial should be after the basic. In basic, you should learn how to use tools. But to fast forward, how about let's those basic read on other web.

I will share you basic Action script, remember how to make this.. because this tutorial will be use the same method for next tutorial. the reason I use Flash 9 because flash 9 is near than flash 8&MX I use before.. And my pc not capable for flash 10.
oh yeah.. I forgot.. Flash not belong to macromedia again

let's try create this code in text file


package {
    
import flash.display.Sprite;
    public class 
fl001 extends Sprite {
        public function 
fl001(  ) {
            var 
iX:int;
            var 
iY:int;
            
graphics.lineStyle(11010);
            for (var 
i:int=0i<100i++) {
                
iX=(Math.random(  ) * 400)+10;
                
iY=(Math.random(  ) * 400)+10;
                
graphics.lineTo(iXiY);
            }
        }
    }


  • Just name it.. fl001.as
  • after that, let's open Flash 9.


  • Go to properties
  • in document class type fl001
  • save the document u named flash-as-001 or perhaps simple.. fl001
  • now run the flash (Ctrl+R) or pick menu Control | Test Movie
    you will have like this
  • different if you run again.
Okay.. You already create simple action script using Flash 9/cs 3!!

source: download here
Hint: change the dimension

2 komentar:

AIAR mengatakan...

nice info om:D
jadi pengen coba2 flash XD

Gustav mengatakan...

krn masih dasar sekali.. km bisa baca terus.. saat ini udah sampe tutorial ke 7. tutorial 2-4 km pasti ngerti deh..
udah punya softwarenya belum?