Category 'ActionScript'


How to apply the technique of chroma key in Adobe Flash

The technique of Chroma Key , namely, the replacement of a particular color with another (or a different source), the last decade has exploded once again with considerable handedness, thanks to the increasingly widespread technology present in the film and in the processing of digital images.

Continued ...

Adobe Flash CS4: Creating an Ajax Loader or Activity Indicator

Create an Ajax Loader (or Activity indicator for those who are accustomed to using the Apple iPhone) to the Web is not a difficult thing: there are services that generate animated gif images of all kinds. However, the GIF format has the big disadvantage of not supporting the transparency as it should. The transparency in GIF current involves only one bit plane with the result that we do not have a uniform background color, image edges are noticeably wide and fragmented.

Continued ...

From Actionscript to Objective-C

I thought it might be helpful to those who have recently approached the development of applications for Apple iPhone, Adobe Actionscript compare - the language used in Adobe Flash and Adobe Flex is more widespread among new programmers - and Objective-C, the language used by Apple to develop its applications. Objective-C is in effect an object-oriented language in the pure sense, not that Actionscript is not, but Objective-C is definitely a plus as it is an extension of ANSI C and its syntax is a mix between C / C + + and Smalltalk, is a true OO (Object-oriented language).

Continued ...

Very short snippet: Actionscript extend an array by using the method shuffle ()

I had already spoken of how to implement the method shuffle () in Javascript and Actionscript . I realized, tuttaavia, not to have pointed out that even Actionscript is able to extend in the same manner Javascript, its object Array :

Continued ...

Very short snippet: shuffle () in Javascript and Actionscript

In PHP there is a handy feature called shuffle() which allows to mix an array (see Very short trick: take random elements from an array in PHP ). A great version for Javascript I found it here . Below is the code slightly revised:

Continued ...

Actionscript 3.0 for beginners: lesson # 5

Who started to develop code with scripting languages ​​such as Javascript or Actionscript the same, you may not know at all the concept of the given type. With some high-level languages, in fact, you are used to - at best - to declare variables without giving a specific data type, not counting those languages ​​that do not require any statement (such as PHP - not in strict version 5 ).

Continued ...

Very short trick: ADDED_TO_STAGE

per capire quando il nostro MovieClip è disegnato effettivamente sulla stage: As we have seen several times in the constructor of a class that extends a MovieClip it may be necessary to add the event ADDED_TO_STAGE to understand when our MovieClip is actually drawn on the Stage:

Continued ...

Very short trick: addEventListener () AS3, a handler more events

In Actionscript 3.0 you must use addEventListener() to intercept any event:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/ **
* Given a MovieClip mc, setting events and handlers
* /
( MouseEvent . CLICK , on_click ) ; mc. addEventListener ( MouseEvent . CLICK, on_click);
( MouseEvent . ROLL_OVER , on_roll_over ) ; mc. addEventListener ( MouseEvent . ROLL_OVER, on_roll_over);
( MouseEvent . ROLL_OUT , on_roll_out ) ; mc. addEventListener ( MouseEvent . ROLL_OUT, on_roll_out);
/ **
* Functions hander for the above events
* /
e : MouseEvent ) : void { on_click function (e: MouseEvent ): void {
/ / Click
}
e : MouseEvent ) : void { on_roll_over function (e: MouseEvent ): void {
/ / Roll over
}
e : MouseEvent ) : void { on_roll_out function (e: MouseEvent ): void {
/ / Roll out
}

Continued ...

Adobe AIR APIs and Feedburner: reloaded

I take inspiration by the excellent tutorial Napolux , Flex 3 and Adobe AIR APIs Feedburner , which shows how to write a simple application (or widget) Adobe AIR using Flex 3, to show how to accomplish the same thing using Adobe Flash CS3. If you wish, also, you can take advantage of the extension for creating Adobe AIR applications. It is not necessary for the purposes of this tutorial, compile your AIR application as an executable, you can use the code proposed as a simple Flash movie "affix" to your Web pages

Continued ...

Actionscript 3.0 for beginners: lesson # 4

We continue our example code TicTacToe (found in full on Google Code ) and begin to analyze it in detail.

Import definitions

With Actionscript 3.0 was done a great job of cleaning and accommodation nell'alberatura classes (contained in the packets, package ) used during development. In other programming languages, such as C for example, when you want to use a feature must explicitly "import" in the code. This operation of "import" is required to allow the compiler to have all the codes and definitions related to the features we want to use. ; Actionscript 3.0 mette a disposizione l'istruzione include che è identica all' #include del C/C++. In Actionscript 3.0, however, the statement import should not be confused with the equivalent C / C + + #include ; Actionscript 3.0 provides education include which is identical to ' #include the C / C + +. The latter, in fact, "include" the actual code which, if used or not, is compiled into the executable final. Education import is of the highest standard and is more "intelligent" at compile time. It is used primarily for access classes without specifying their full name. In alre words instead of using the forms of the type:

1
flash.display . MovieClip = new flash.display . MovieClip ( ) ; var myMC: flash.display. MovieClip = new flash.display. MovieClip ();

Continued ...