Two researchers at Adobe , Dr. Ariel Shamir and Dr. Shai Avidan, have developed a unique algorithm for intelligent resizing of images. Particularly impressive (see video below) is the ability to obscure and completely change an image, thanks to a "resize" extremely sophisticated and selective. In other words, this technique allows you to resize an image in a non-linear. Some areas of the image, then, are kept in scale providing an effect really curious.
Archive August 2007
Ridimesionamento dynamic intelligent image
Aptana IDE update: 9 Milestones
It is available to update the Aptana IDE , the Web development environment that supports Adobe AIR and Apple iPhone . Among the new improvements in the PHP section by updating the Code Assist functions on both parameters. Also improved the "color" of the code. Added support for latest Ajax frameworks including prototype.js and jQuery . Also improved handling of Javascript.

For the complete list of new features click here .
Reflex 1.1: add reflection effect to images
New version 1.1 of Javascript library SLR with which you can add reflection effects to images. The advantage of using this technique "unobtrusive" is the speed with which you can add these effects without having to actually spend time in creating the image of reflection.
This version has been tested on Mozilla Firefox 1.5 +, Opera 9 +, Safari and IE6. The minimum size for an image is 32 × 32. Once libreiria including:
1 |
Just enter class = "reflex" on the images where we want to apply that effect. By exploiting the properties of the class, you can manipulate the effects of reflection, which makes this very special library. You can, in fact, also distort the image by adding 3D effects. For example, here is how to add various features to rilfessione:
1 | "reflex idistance16 iborder2 iheight24" width = "200" alt = "" src = "images/example.jpg" / > < img class = "SLR idistance16 iborder2 iheight24" width = "200" alt = "" src = "images / example.jpg" /> |
For details see the official documentation .
On the same site you can download many other effects such as Edge, Corner, Glossy and many others, all dedicated to images.
Proto.Menu: Context menus in JavaScript with Prototype 1.6.0
Proto.Menu is a simple and lightweight (2Kb) solution for JavaScript to add functionality to the context menus HMTL pages. This library uses the recent release of Prototype 1.6.0_rc0 . Its main features are:
- Lightness: ~ 2 KB (~ 1.5 MB version)
- Unobtrusive: not intrusive
- Supports all browsers
- Customizable in terms of style-sheet
- Extremely fast
For its use is required:
- prototype.js 1.6.0_rc0
- Proven on the browsers: Firefox 1.5 +, Internet Explorer 6 +, Safari 3 +, Opera 9 +, Netscape Navigator 9 +
To use it simply include the library and prototype proto.menu:
Download Proto.Menu.js (or compressed version )
1 2 |
You can include your own CSS file
1 | "stylesheet" href = "Proto.Menu.css" type = "text/css" media = "screen" / > < link rel = "stylesheet" href = "Proto.Menu.css" type = "text / css" media = "screen" /> |
And its use is really simple, you create an array with links to show:
1 2 3 4 5 6 7 8 9 10 11 | [ var myLinks = [ : 'Back' , callback : function ( ) { alert ( 'back function called' ) } } , {Name: 'Back', callback: function () {alert ('Called back function')}}, : 'Forward' , callback : function ( ) { alert ( 'Forward function called' ) } } , {Name: 'Forward', callback: function () {alert ('Forward function Called')}}, true } , {Separator: true}, : 'Reload' , callback : function ( ) { alert ( 'Reload function called' ) } } , {Name: 'Reload', callback: function () {alert ('Reload Called function')}}, : 'Disabled option' , disabled : true } , {Name: 'Disabled option', disabled: true}, : 'Toggle previous option' , callback : function ( ) { {Name: 'Toggle previous option', callback: function () { = oLinks. find ( function ( l ) { return l. name == 'Disabled option' } ) ; var item = oLinks. find (function (s) {return l. name == 'Disabled option'}); = item . disabled == false ? true : false ; item. disabled = item. disabled == false? true: false; }} ] |
Menus are activated by passing the reference to the array created:
1 2 3 4 5 6 7 | "text/javascript" > < script type = "text / javascript"> new Proto.Menu ({ selector: '. contextmenu' / / context menu will be shown When element with class name of "contextmenu" is clicked className: 'myContextMenu', / / this is a class Which will be attached to menu container (used for css styling) menuitems: myLinks / / array of menu items }) </ script > |
Note the property selector indicates that the element related to the click context menu for this.
Right Click in AS3: custom context menus
Remove the context menu or simply responding to "right click" mouse is a possibility of Flash Player directly from ActionScript code is not allowed even in CS3. This feature would be attractive for both games for RIA applications. Paulius Uza has proposed a solution for ActionScript 3 (AS3) that works in tandem with Javascript. This "patch" is still in testing phase because it depends on your browser and Flash Player installed. You can help by testing application demo here .
It was also an aperitif "project" on Google Code :
The idea is fairly simple:
1-Use Javascript in the HTML container page to disable right-click on the top of the SWF.
2 - Capture the event and pass it to a function That communicates with Flash via the External Interface
3-In Actionscript the function Called from Javascript does whatever you need to display your own custom context-menu.
Prototype 1.6.0 release candidate
You have just released the release candidate of Prototype 1.6.0 with the latest updates to the entire system API. è stato migliorato e ora fornisce il contesto dell'oggetto che ha rilasciato l'evento. In particular, the method observe object Event has been improved and now provides the background object which issued the event. This "right" behavior can be overridden, however. This means that by default, this refers to the object that issued the event. It also introduced the ability to create custom events. Other improvements include the Function.prototype, the functions of DOM, Ajax, functions, classes and more. For a complete list see the CHANGELOG.
Download
- Download Prototype 1.6.0_rc0
- Get Prototype help on the rails-spinoffs mailing list or # prototype IRC channel
- Interact with the Core Team on the prototype-core mailing list
- Submit bug reports to Rails Trac
ActionScript: _parent and control frameworks
When "triggered" an event of an object context, which is the parent object that represents the scope of all variables, becomes the object itself. This feature, characteristic of Object Oriented programming, can be disorienting causing errors and bugs in the code. Moreover, in certain situations, can prevent access to some variables "before" available.
First of all we see a feature of ActionScript related to context management which, if included, will save us a few hours of unnecessary tests. When we have to do with graphics or simply MovieClips nested within each other, the property _parent , problem-solving context. For example, if the MovieClip padre_mc contiente figlio_mc another MovieClip and use the following code:
1 2 3 4 5 | / / Code inside padre_mc ( ) { figlio_mc. onRelease = function () { this ) ; // figlio_mc trace (this); / / figlio_mc this . _parent ) ; // padre_mc trace (this. _parent); / / padre_mc } |
Risalisre the "father", then, is clear and immediate.
With pure classes, code-only, or extension of the MovieClip property _parent is not available and could complicate things! Immaginiiamo to have a class MyClass :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | MovieClip { Class MyClass extends MovieClip { function MyClass () { / / Constructor } / / function myMethod () { this ) ; // myClass trace (this); / / myClass ; var num = 5; ; var cp = this; .... [ un oggetto ] ; var myObject = new [an object]; ( ) { myObject. onLoad = function () { this ) ; // myObject trace (this); / / myObject cp ) ; // myClass trace (cp); / / myClass } } |
, ovvero il puntatore alla classe MyClass . The context of MyMethod() is, of course, this , that is the pointer to the class MyClass . . The variable num , for example, has a life cycle enclosed within the method MyMethod() . It is therefore only visible within the method and will be destroyed on exit. . Same thing for the variable myObject that initializes an event, however, in this case onLoad . lasciandoci, apparentemente, senza il puntatore alla classe madre myClass . When triggered onLoad() context will become myObject leaving, apparently, without the pointer to the parent class myClass . , ha lo stesso contesto della variabile myObject ! A closer look at the code we see that the variable cp , defined in the method myMethod() , has the same context of the variable myObject ! dell'oggetto myObject in quanto condivide con esso lo stesso contesto. In fact the variable cp (class pointer) will be visible within the method onLoad object myObject as it shares the same context. ha necessità di “vivere” più al lungo del previsto visto che ha “allocato” un evento (di tutto questo se ne occupa Flash a nostra “insaputa”). In fact the method myMethod() not just because the object is deallocated myObject has the need to "live" over the longer than expected because it has "allocated" an event (all of this is dealing with Flash at our "unknown").
Advice
For events associated with buttons or MovieClips a good habit would be to use the form:
1 2 3 4 5 | my_mc. onRelease = myOnRelease; myOnRelease function () { this ) ; // _root trace (this); / / _root "Click me" ) ; trace ("Click me"); } |
In place of the more rapid and immediate:
1 2 3 4 | ( ) { my_mc. onRelease = function () { this ) ; // my_mc trace (this); / / my_mc "Click me" ) ; trace ("Click me"); } |
The advantage of using an external function is to have a neutral context and the possibility to access the function regardless of the MovieClip that controls it. In the second case, for example, if you want to force the execution of the code linked to the "click" of the MovieClip should I use a code of this type:
1 | ; my_mc. onRelease (); |
In practice I call the event as if it were a method. However, I have - in fact - to have the MovieClip my_mc . Either way, however, I can run the code directly calling myOnRelease() . Obviously, as shown in the examples, eye to contexts. . In the first case the context of myOnRelease() is the mother of the object where it is written, for example _root . In the second case, instead, the context is always the MovieClip my_mc !
Forcing a different context
We conclude with a tricks useful in many circumstances. in grado di forzare un contesto di un metodo o funzione. Flash provides a library, mx.utils with an object Delegate can force a context of a method or function. Its use is very simple:
1 2 3 4 5 6 7 8 | utils . Delegate ; import mx. utils. Delegate; / / // puntatore ad un MovieClip my_mc var, / / pointer to a MovieClip // un bottone my_btn var, / / a button function myFunction () { this ) ; trace (this); } create ( my_mc , myFunction ) ; my_btn. onPress = Delegate. created (my_mc, myFunction); |
The event onPress my_btn the button points to a "new" function created precisely with the context my_mc. When you click on the button my_btn, the code executed in myFunction() will have as context my_mc!






Latest Comments
Rosanna : Can anyone tell me how do I delete the Snap Shots window that opens automatically when I ...
blessed Maresca : I can not download any skypemote me spiegaaa
Matthew : Hello everyone, unfortunately Google does not allow the use of the API for Flash, but it will ...
Giovambattista Fazioli : @ GM: If you upload images to a different server (that WordPress can not ...
GM : Hi, sorry to resurrect an old post but I hope you can give me a hand. How do I, with this method, ...