Category 'Flash CS3'


Effects on the bitmap with perlinNoise ()

The class BitmapData allows you to easily apply effects useful for various purposes. We have already seen how to create a "fog TV" with a few lines of code ( Flash CS3 to create fog effect TV in 1 second ). Now we will deal with another effect "spectacular" which, as we shall see later, allows the creation of interesting visual effects, as in the example shown below: the parameters varied to observe the different effects, clicking the mouse on the image generated This can be moved.

Loading Flash ...

On this occasion I also added a new simple component (Check) in Undolibrary ! So update your SVN repository. The source is available here: MapEffect.zip

Continued ...

Papervision3D: BasicView

Papervision3D 2.0 (GreatWhite) is still developing and there are many functions that are added almost weekly. In April, was inaugurated on the developer blog ( http://dev.papervision3d.org/ ), however, release 2.0, is not officially released yet is often hard to snatch the true potential. One of the recent innovations introduced, however, is the new object BasicView an environment that creates 3D with very few lines of code. It is enough to create this object to have the scene, viewport and camera in one fell swoop.

Continued ...

undolibrary: Actionscript 3.0 library on Google Code

I opened a project on Google Code : undolibrary. For now, this library contains only one component (Knob - knob) to be used with Actionscript 3.0. I mention this because this component is a prerequisite to a series of tutorials / sources in Flash that I wanted to make available.

Loading Flash ...

Google Code

First of all I introduce the concept of Google Code for those who were foreign. Google Code is a free service provided by Google in order to share code, but, above all, to share and collaboratively with a versioning system (subversion) and wikis useful to development teams (primarily open source) or to individual programmers. On the Google Code site include:

You can search for other projects, with a purpose-built search engine. Many development groups, made up of teams that are located in distant geographical areas, taking advantage of this sharing to work together, backed by a well established versioning system (checkout / checkin not to overlap or supprot to create branch - spinoff projects) . Libraries and tools such as Papervision3D , Tweener or AS3corelib , for example, are located right on Google Code enjoying one side of a host of other development and public access to download the source and documentation.
Important point, then, is the possibility - open a project - to set access and viewing. If you want to protect your work or make it completely private rather than public.

Continued ...

Creating custom events in ActionScript 3.0

Creating custom events in ActionScript 3.0 is simple. Use them, then, allows you to use the method addEventListener() and make our object of all standards. ) BottoneEvent . If we created a class, such as Bottone , this is correct to associate with one or more events through a special class (derived from the class Event ) BottoneEvent . We could make all the events that affect the operation of our subject: the click, mouse over, or any other event! As well as defining our personal basis. The skeleton - generic - a custom event class is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package {
/ *
** @ Name: BottoneEvent.as
** @ Description: Class derived from Event to manage their own custom event
** @ Author: undo = =
** @ Web: http://www.undolog.com
** @ Email: @ g.fazioli undolog.com
* /
.*; import flash.events .*;

BottoneEvent extends Event { BottoneEvent extends public class Event {

String = 'pluto' ; // codice qualsiasi, anche 'mioevento' in minuscolo public static const MIOEVENTO: String = 'bar', / / any code, even 'mioevento' in lower case

Valore : Number = NaN ; public var value: Number = NaN;
/ *
** @ Name: BottoneEvent
** @ Description: constructor
* /

type , bubbles , cancelable ) ; super (type, bubbles, cancelable);
Value = v ; this. Value = v;
}

/ *
** @ Override
* /
clone ( ) : Event { override public function clone (): Event {
this . type , this . Value , this . bubbles , this . cancelable ) ; KnobEvent return new (this. type, this. Value, this. bubbles, this. cancelable);
}
}
}

Continued ...

FIVe3D: effects of a cube! Waiting for Flash 10

Most likely, when it comes out the new version of Adobe Flash, 3D libraries to "low level" as FIVe3D will end up badly! However, before the "Trash", here is an example of what can be achieved (with the latest release 2.1):

Loading Flash ...

The code of the demo above is quite articulate, so I do not propose entirely online. Insertion, however, some interesting pieces of code.

Update: for the source click here

Continued ...

Google AJAX Language API tutorial on the operation

I respond with this post, at the request of Andrea on how to insert the translator of Google in your web. There are several ways to take advantage of machine translation services available from Google and beyond. We can use plugins written by others, a simple JavaScript script from Google itself or mixed learning to use the API, ie a set of callable functions - as we shall see - in various ways.

Plugins

I will not dwell on this solution, as I think is not really relevant to the request of Andrew , if I understood well. Furthermore, it is essentially a solution valid only for the blog and not to use custom and generic. I can only point out to users by WordPress , Global Translator , perhaps the most simple, practical and popular plugins of this type.

Pre script by Google

The easiest way to translate your website or your blog is to add a simple JavaScript script provided by Google. Just go to the site translate.google.com tab and click on 'Tools'. From this page you can preset the translation functions or leave the default. The script is very simple:

1

and as a result we obtain:

Google Translate

Continued ...

AS3Corelib: library for MD5, SHA1 and JPG / PNG Encoder

AS3corelib project is a library written in ActionScript 3, which contains a series of classes and utilities to extend the development with ActionScript 3. Support is included for MD5 and SHA 1, encoders for JPG and PNG, and JSON serialization for strings, numbers and dates APIs. This libreia is very useful in the development of Flash applications and able to give it their best in tandem with Adobe AIR!

Of the various packages present the most interesting and com.adobe.crypto com.adobe.images. The first allows you to handle MD5, SHA1, SHA224 and SHA256, so very simple: the method using hash() is passed the string and returns the source-code! The package even allows images to get the encoder JPG or PNG bitmap from a simple Flash!

1
encode ( image : BitmapData ) : ByteArray public function encode (image: BitmapData ): ByteArray

The result ByteArray representing the encoding to JPG, Flash, permitting, can be saved directly to disk! To learn more you can follow this video tutorial on how to save a PNG image - from a video object - on disc by as3corelib .

Continued ...

Papervision3D: Bitmap handle like FIVe3D

Starting from the example shown in FIVe3D: Bitmap treat , let's see how to achieve the same effect using Papervision3D 2.0 (Great White), as well as continue to analyze the operation of this beta Great White.

Loading Flash ...

Continued ...

FIVe3D: Bitmap treat

With the release 2.1 of FIVe3D you can also manipulate objects Bitmap , so as to overcome the initial limitation of this library only vector. e ruotarlo a nostro piacimento: If we include a Bitmap in the library and esprotiamo to be able to create an instance dynamically using ActionScript, you can easily create an object Bitmap3D and rotate at will:

Loading Flash ...

Continued ...

Flash 10 Astro: 3D vs. native Papervision3D

Adobe has announced some new features for some time (Hydra filters for advanced graphics and a better text handling) that will be present in the next release of Flash. In particular has attracted the attention of the introduction of 3D (Z axis), then the ability of Flash to manipulate objects in a three-dimensional world. Adobe says that the same is actually a 2.5D, as is often stated, a kind of "simulation" of a real three-dimensional world. In fact you can rotate a symbol Flash flow around the z axis, but despite this, the symbol remains flat in the three-dimensional space! A little 'what happens when you distort a bitmap in Photoshop! This, then, has nothing to do with projects like Papervision3D , Away3D , Sandy and many others, which contain a number of features (camera, scenes, textures, etc ...) absent "emerging in the abstraction." In essence, Adobe does not want to completely overlap with 3D designs of third parties, but only provide a native layer to improve the performance of existing 3D libraries.

Anyway, the important thing is that Adobe seems geared to introduce these features to a higher dimensional level, not helping at all libraries complete and complex as Paparevision3D. For some time, in fact, we use two basic techniques to expand the functionality of Flash: low-level APIs and high-level API.

The low-level APIs are generally written in C / C + + and Flash are part of the core, then fill in the player. This method, while it ensures a higher execution speed, the other increases The size of the Flash Player.

The high-level APIs are written in Actionscript and are not native to the core. In other words are very similar to the libraries that we could write to us, with the difference that is provided directly from Adobe. As with the release of Flash 5, the first introduction of the XML object was completely in Actionscript, creating many performance problems!
The advantage is that these libraries are compiled only when necessary and then discharged into the SWF file. As is the case today with the Tween object (see fl.motion fl.transition .* or .*) entirely written in Actionscript (also parallel projects like this are born Tweener (caurina.transitions.Tweener) or TweenerMax .
For this reason, the Papervision community is not entirely happy with the choice of using high-level API, in practice the same "level" of Papervision3D. This, in fact, may not affect the future performance of 3D libraries.

However it will end, the important thing is that Papervision3D is not dead, indeed!

Continued ...