import mx.transitions.*; import mx.transitions.easing.*; TransitionManager.start(some_mc, {type:Fade, direction:Transition.IN, duration:3, easing:Strong.easeOut}); Legenda: Blinds La classe Blinds mostra l’oggetto clip filmato mediante rettangoli che scompaiono o compaiono. Fade La classe Fade applica all’oggetto clip filmato una dissolvenza in entrata o in uscita. Fly La classe Fly fa comparire l’oggetto clip filmato facendolo scorrere da una direzione particolare. Iris [...]
Archive for the ‘Languages’ Category
TransitionManager in Actionscript 3, Flash, AIR and Flex
Posted in Actionscript, Flash, Flex, tagged Actionscript, air, Flash, Flex on April 28, 2009 | Leave a Comment »
STRUTS 2 Best Practices
Posted in Java on August 21, 2008 | Leave a Comment »
La bibbia di struts 2 è su: http://struts.apache.org/2.0.11.2/docs/guides.html 1) nei tag struts delle pagine jsp può essere invocata la action tramite elemento action=”” che può contenere: il name della <action name=”” >.. oppure contestuale esempio “#{action.Cerca}” che chiama il metodo Cerca della classe action (pojo class) associata 2) i nomi delle azioni sono mappati su [...]
How to get components and data from an ItemRenderer of a List in Adobe Flex 3
Posted in Actionscript on March 31, 2008 | Leave a Comment »
var tl:TileList = TileList( event.currentTarget ); var thumb:Thumbnail = Thumbnail(tl.indexToItemRenderer(ind)); var img:Image = thumb.image;
How to alternate row color in tables with CSS
Posted in CSS, HTML, Javascript on June 7, 2007 | Leave a Comment »
<style type=”text/css”> tr.s1{ background-color: #e0e0e0; color: black; } tr.s2{ background-color: #ffffff; color: black; } </style> <table> <tr class=”s1″><td>ciao</td><td>come</td></tr> <tr class=”s2″><td>stai</td><td>io</td></tr> <tr class=”s1″><td>bene</td><td>grazie</td></tr> <tr class=”s2″><td>saluti</td><td>ciao</td></tr> </table>
How to collapse a DIV – Javascript – HTML
Posted in How To, HTML, Javascript on June 6, 2007 | Leave a Comment »
Suppose you have a block of text you want to be collapsible clicking a link. Here is the code: <script language=”javascript”> function switchDiv(id_div) { if(document.getElementById(id_div).style.display == ‘none’) { document.getElementById(id_div).style.display = ‘block’; } else { document.getElementById(id_div).style.display = ‘none’; } } </script>
CDATE – System.InvalidCastException – Cast from string to type Date is not valid
Posted in .Net, Computer Science, Languages on April 19, 2007 | Leave a Comment »
Suppose you have the code: Dim date_datetime as DateTime date_datetime = CDate(Textbox1.Text) And you get the error: Exception Details: System.InvalidCastException: Cast from string “dd/MM/yyyy” to type ‘Date’ is not valid Maybe you have some collision between Regional settings and your .Net settings… No problem – do not use CDate but use this piece of code: [...]
Capture global keyboard events on Flex 2 and Actionscript 3
Posted in Actionscript, Flash, Flex, Languages, RIA on March 21, 2007 | Leave a Comment »
If you want to capture global keyboard events maybe you put this line of code in the constructor method of your actionscript 3 class: addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); or this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); but maybe it doesn’t work? Simple! because you have to add the listener to the stage object giving focus to it… stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
XML Select with Microsoft SqlServer 2000
Posted in SqlServer 2000, TSQL, XML on March 4, 2007 | Leave a Comment »
Avete mai provato ad aggiungere la clausola FOR XML AUTO in fondo a una select fatta su SQLServer 2000? Provate, otterete come risposta un recordset di una riga una colonna con dentro una bella stringona che è un XML Fragment contenente la risposta alla Vs query. La sintassi generale per avere resultset in formato XML [...]
Set JAVA_HOME in Microsoft Windows systems
Posted in Java, Windows on February 27, 2007 | Leave a Comment »
To set correctly JAVA_HOME in Windows 2000, XP, 2003 (and also Vista) systems follow this instructions: 1. Right click on the My Computer icon on your desktop and select properties 2. Click the Advanced Tab 3. Click the Environment Variables button 4. Click New 5. Enter JAVA_HOME as the variable name and the directory where [...]
Flex Textarea – Create and Get a Selection
Posted in Actionscript, Flex on February 19, 2007 | Leave a Comment »
How to create a selection on a Textarea or TextInput: myTextArea.setSelection(fromIndex, toIndex); How to create a selection on a RichTextEditor: myRTE.textArea.setSelection(0, 10); How to get a selection from a TextArea or TextInput: var mySelectedTextRange:TextRange = new TextRange(myTextArea, true); How to get a selection from a RichTextEditor: public var mySelectedTextRange:TextRange = myRTE.selection;