And as previously, each display objects hold properties we can access through our script. ActionScript 3.0 still have the properties we used to know, but have slight changes in the naming, mostly are the name that using underscore like _x, _y, _width, _height, etc and now simply x, y, width, height, etc. Some of this properties are not only changed in naming, but also how the value represent. For example :
//ActionScript 2.0 mymovie._x = 100;// x position value = 100 mymovie._xscale = 200;// x scaling to 200% mymovie._alpha = 10;// alpha channel to 10% //ActionScript 3.0 mymovie.x = 100;// x position value = 100 mymovie.xscale = 2;// x scaling to 200% mymovie.alpha = 0.1// alpha channel to 10%
For button symbols now are instances of a new class, SimpleButton and Graphics become Shape. And dynamic text become instances of TextField. ActionScript 3.0 now will not allow us to place code inside Button or MovieClip. All code must be written in timelines or sepparate ActionScript files.
]]>var mysound:Sound = new Sound(); mysound['myownvalue'] = 2;
In ActionScript 3.0, we can not longer do that workaround. Sealed classes enforced are not only in compile time, but also in runtime. So we must note which objects are dynamic and which are not. And here is the list of dynamic classes that commonly used :
- Array
- Object
- Date
- Dictionary
- Error
- MovieClip
- RegExp
- StyleSheet
- URL Variables
- XML and XMLList
For better debuging, it is highly recommended to assign type to the functions. For example :
function doubling(val:Number):Number{ return val * 2; }
or
var doubling:Function = function(val:Number):Number{ return val * 2; }
In ActionScript 2.0, if you want to create a function that received no parameters, you must used Void type in the parameter list. In ActionScript 3.0 you must just leave the parameter list empty. And void (no capitalized) type is use as the function return type itself which defined the function to return nothing. And in ActionScript 2.0, if you not give anything at the parameter list, it means the function could receive arguments passed to it by the caller, and get the arguments using the arguments object in the function. But in ActionScript 3.0, by omitting parameter list, it really mean that the function will not received anything. And if you try to pass any arguments, it will return error. Instead, to able to receive arguments, you must use a new parameter type known as … (rest) in the parameter list and will written as …[argumentsArray] where the argumentsArray is name of the Array containing the arguments.
So function would look like :
function traceall(...vals):void{ trace(vals); } traceall("1", "a", true);//traces 1,a,true
And there were so many schemes using in the tricks. Some of them use money game schemes like HYIP or Internet Investment. I do not said that all of Internet Investment is always a SCAM, but lot of them were. And some schemes pretends as online store selling interesting stuffs like electronic equipment, computer, cellphone or other things. Mostly they offering half of the normal price. And as always, when it sounds too good to be true, then mostly it is untrue.
I still try to get SCAM website I ever saw for examples. But since I never save any of them, it would need more time than I expected.
]]>At early years of internet booming, there was only few domain name extension such as .com and .gov. But today, more and more new extension were added to the list in order to accommodate large internet user all around the world. And to make it simple, I will try to explain about these domain names in categories.
The categories would be by:
1. Public regular / common
2. Regional
3. Business Lines
Public regular / common domain name
This kind of domain name can be registered and used by everybody. There is no limitation to whom it may be registered. As long as you have money to pay for it and no one own it, you can register and use it. Usually, the price is about 7USD - 10USD /year. It is not expensive at all. The domain name have extensions we are very familiar with. Like .com, .net, .info, .org, .ws.
Regional domain name
This domain name, used exclusively in a country. The original extension is the country code it self.
For example :
1. Indonesia = .id
2. Japan = .jp
3. Hongkong = .hk
4. China = .ch
5. Singapore = .sg
But you can’t register to use this regional extensions (example : paulus.id). Instead, there a domain administrator which maintain a sub domain name to use with the extension. This sub domain name you can use will be vary depend on the regional domain administrator policy.
For in Indonesia, there is PANDI who administer this sub domain name. And the sub domain name for Indonesia is :
1. .co.id (for company)
2. .ac.id (usually for educational institute)
3. .go.id (special for government )
and more
To use this domain extensions, you have follow the regional policy. So you can not register in anonymous as .com or other.
Business Lines
And this last category, is domain name extension which made to identify special business line of the company using it. Example :
1. .tv (for tv station)
2. .edu (for educational)
3. .org (organizations)
4. .info (information provider, such as wikipedia. But can also use for others)
5. .gov (government, but usually for US government other country will use the regional extensions)
6. .mil (militar, as the .gov, this also used by US military)
and more.
This kind of domain name usually ask for your business title to verify the registration. But for .org and .info I don’t think they will do that as I could register to use them easily.
Ok, now we have know the domain extensions that formed the domain name, and we will move on.
A phishing usually create a domain name sound or look a like the real domain name they want to mimic. For example, if they want to mimic the google site to fools your eyes, the might be create a domain name like example below :
- gogle.com
- gooogle.com
- goooogle.com
etc.
So you must remember how to write the domain name correctly. Specially if it is for your online banking. Write it down if necessary (but don’t write down your user id and password of course).
Beside that way above, they (phisher) can also create a sub domain name, like :
- google.mydomain.com
- google.freehosting.com
- google_activate_account.anotherhosting.com
- etc.
Pay attention to the domain name. Sub domain name is separated by dot (.) from the main domain name. Sub domain can be anything they want. But the main domain name will tell you if it real or not. Usually the phishing site will use a free hosting or free web for placed their web pages that mimic some original pages. This is to prepare a complete escape and will be almost impossible to track down the real person behind the scheme. So the only way and safest way to deal with them, is to be aware.
There is another kind of fraud, that fools visitor to spent money in their site. We call it SCAM. I will write about this too. Too many victims falls in to it.
]]>So what is new in ActionScript 3.0 ?
1. Runtime exceptions
2. Runtime variable typing
3. Sealed classes
4. Method closures
5. E4X
6. Regular expressions
7. Namespaces
8. int and uint data types
9. New display list model
10. New event model
Differences ?
Script Placement
You can only placed your script in Timeline or in Class files. You can’t placed your script in a button, or movieclip, etc as you used to in ActionScript 1.0 and 2.0
Variables
- In ActionScript 1.0 and 2.0 you can define variable using or without “var”. In ActionScript 3.0, using “var” is a must.
- ActionScript 3.0 did not accept naming conflicts in a scope. example, can not re define a variable. Variable must defined only onces in a scope. If you try so, you will get error.
For example :
1 2 3 4 5 | var x = value; // ok ... var x = another value; // error; you can only use var once |
As in ActionScript 2.0 you can specifying a variable type. But in ActionScript 2.0, variable type only used in compile time error checking. In ActionScript 3.0, variable type will retain in playback or runtime. And as mentioned above, ActionScript 3.0 we have new variables types, int (integer) and uint (unsigned integer). And you can use “*” (untyped) for special type which represent no type. Which can hold value for any kinds of type.
But it is better to specify type, as it lead to better error checking. And performance.
Also, in Action Script 3.0 we have different data types default value. Here the list:
1 2 3 4 5 6 7 | var untyped:*; // undefined var boolean:Boolean; // false var number:Number; // NaN var integer:int; // 0 var unsignedInteger:uint; // 0 var string:String; // null var object:Object; // null |
The int and uint variables types are 32-bit integers.
One other type to mention is the special void type. In ActionScript 2.0 it was capitalized, and no longer in ActionScript 3.0. This type is only applies to functions.
If you interested to have some cheat sheets for ActionScript, you can visit http://www.actionscriptcheatsheet.com
]]>Dendam Hatiku sedang terbakar API LAKNAT Maaf, bukan ku ingin jahat, tapi kau tanamkan dendam yang melekat lekat di hati hingga sulit tuk lepas Kau terus menyerang dan menginjak sedang kau sendiri terus melunjak simpan gertakmu untuk anak anak.. yang lain boleh gentar, tapi maaf aku tidak.. Baru saja kau nyalakan api api laknat yang membakar hati kau kobarkan dendam dalam hati awas meledak, sempatkah kau lari sembunyi .. Paulus T.
ENTAH entah apa yang di kepala entah pula yang dirasa terasa kini hanya hampa seakan hilang sang asa semakin besar rasa cinta besar pula kudapat gundah tak tahu mengadu ke mana tumpahkan sesal yang kurasa tak ada lagi air mata seakan semua telah sirna menguap hilang di udara bersama asa dalam dada belum lama keluarkan tawa belum puas rasakan suka tiba tiba kini telah punah sirna entah ke mana apa salah telah kubuat apa dosa telah kutanam mencoba cari tahu jawabnya entah dan entah Paulus T.
I still remember the first time I open the Flash IDE. It was still in version 3, and I still in fourth semester in the University. In the multimedia class, I have an assignment to create animation using Flash. I don’t ever even heard about this thing before. So that the first time I learn and try the tweening and shape motion. I got A for that assignment. I love this thing, but then after that multimedia class, I don’t touch Flash for years.
Got back to Flash (still named Macromedia Flash) in 2000 at job. At that time, Flash was already in version 5 with the new improvement of Action Script. Now we identify it as Action Script 1.0 which was an amazing improvement from the original Action Script. But then, I still not much got into the programming. My job required me to create animation for a Flash based web portal for a big cigarettes company. And then to maintain flash animation for an Electronic company website. Flash animation, tweening etc was my daily activity then. I start learn the Action Script but still limited to just some few function needed to control the time line.
One or two year(s) after that, Macromedia then release the version 6 or known as Macromedia Flash MX. There were more improvement at the Action Script. Added with new feature called Remoting. A lot of people around the world seem very interested the Flash Remoting. Some of them even create component to use the Remoting with other platform, such as PHP. Macromedia only release component to use the Remoting with proprietary platform like ColdFusion and .Net framework.
After that version, then released Flash MX 2004 with Action Script 2.0. More changes to the Action Script. Together with it there were also Flex came out from the Macromedia Lab. After MX 2004, there is no more MX version. Following the MX 2004, it was Flash 8.
Then Macromedia bought by Adobe group and now we know Flash as Adobe Flash.
There is only One person I know as a Macromedia Certified Developer. The one and only in Indonesia. Not me of course. But it happened to be my friend. I learn a lot from him.
Adobe Flash now bundled with Adobe Creative Suite package. With more advanced Action Script version 3.0. A lot more different compared to version 1.0 and 2.0. Only run at Flash Player 9.0 or above. With this CS3, you would still able to create Flash using ActionScript 2.0 but will absolutely missing the greatest advantage offered by version 3.0 Action Script.
It is a whole new thing. And a lot to learn in order to adapt the AS 3.0. But all the efforts are worthed.
So here I will open a discussion about using the Action Script 3.0. I won’t talk about creating animation using the tween in time line. Here I will talk about Scripting and Programming.
Enjoy..
]]>