• English (17)
  • Bahasa Indonesia (17)
  • Page 2 of 9«12345»...Last »

    Functions

    Posted by Paulus T on Jan 6th, 2008
    2008
    Jan 6

    Functions in flash can be defined in two ways. First you can create a function using :
    function [function name]([parameters]){[codes]}
    and second way, you can also write :
    var [function name] = function([parameters]){[codes]}
    Both way with give you the same result. But by using variable defining (the second way), you can only define the function once in one timeline.

    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

    SCAM

    Posted by Paulus T on Jan 5th, 2008
    2008
    Jan 5

    At wikipedia, scam is defined as a confidence trick. It may refer to all type of tricks I have wrote about before. But here I will define it differently. I classified SCAM as tricks which using website as the media to convince people spending money without any suspicious. And by the time the victims realize they have been tricked, the money is gone.

    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.

    Page 2 of 9«12345»...Last »