• Realaxy ActionScript Editor

    Spring comes (I mean season of course 🙂 ). Sun becomes more bright and hot. Girls wear less clothes 😉

    So being in a good mood I’m glad to announce a new promising Flash IDE named “Realaxy ActionScript Editor”. Realaxy is based on a new cutting-edge technology from JetBrains – Meta Programming System, MPS, which permits to forget all boring and miserable limits of your programming language and reach a new development level with more abstract models and constructs. This new concept is named Language Oriented System and its description can be found at JetBrains site.

    And the first step forward was done by Ivan Dembitskiy and Evgeniy Potapenko who will present Realaxy ActionScript Editor beta atCreative Future in Moscow, April 23rd. Thus if you have an opportunity you can register and see the Editor by your own eyes. By the way, don’t forget to take a flash-drive 😉

    Although Realaxy is still beta you can look at several podcasts of the editor. They are really impressive! As well you can become a beta-tester if you post brief information about Realaxy in your blog and send a mail to ivan.dembicki [at] gmail.com having [betatest] as a subject.

    So far we have a new blossoming ActionScript IDE. I do hope it will be real alternative to Flash Builder or IntelliJ IDEA.

  • A few mouse tricks in flash

    There are two common tasks for mouse which require some tricks.

    Showing hand cursor over movieClip:

    Enabling doubleClick:

    To be continued…

  • Sistine Chapel 3D

    Have you ever seen frescoes of Michelangelo in Sistine Chapel? Now you have an opportunity to do this using 3D Flash.

  • Top 10 Changes in Flex 4

    Almost a year ago Jon Rose on InfoQ published an article “Top 10 Changes in Flex 4”. This article is still actual for you if you intend to examine new Flex 4, released not so late.

  • New flash player versions

    February 2nd 2010 Adobe release Flash Player version 10.0.45.2.You can download it here:
    http://www.adobe.com/support/flashplayer/downloads.html

    And more recent news. Yesterday Flash Player 10.1 Beta 3 became available for download. You can find a list of fixes and improvements on Ted Patrick blog.

  • AIR 2.0 Beta 2 was released

    February 2, Adobe announced the release of Adobe® AIR® 2 public beta. Very brief news 😉

  • Flex SDK 3.5A released

    Flex SDK 3.5A (3.5.0.12683) was released a week ago. It contains quite a few changes comparing to its previous release. You can download it at official Adobe site.

  • How to prevent caching of swf files

    Standard methods

    You may know there are several methods to prevent caching of swf (or other) files:

    1) Adding fake random parameter to the url of the file. In this case the best practice is adding the current time as parameter:
    in ActionScript 3:

    in Javascript:

    But then a browser will never cache the content. Therefore it’s not the best solution especially when the size of swf is quite large.

    2) Using META tags in html headers like Pragma: No-Cache or Expires:
    Expires tag says to browser when the file should expire from the cache


    Pragma: No-Cache directs the browser to not cache the file at all.

    All these methods are described at official Adobe site: http://kb2.adobe.com/cps/147/tn_14743.html

    Using Expires HTTP-Header

    The most of web-servers have ability to add http-header to response of particular file or site\folder in general. My solution is adding Expires header to files which you are trying to prevent caching. Expires value should specify the current date. Hence browser will always receive expired data.

    So what happens when browser receives expired data? An expired item can be still valid. So browser performs validation of the item by sending If-Modified-Since request to the server. The server checks modification date of requested file. And according to result it either sends a new content or response with status code 304 (not modified).

    So if you specify immediate expiration of content in HTTP-header then as soon as you update a file it will be cleared from cache and reloaded by browser. If the file is not changed then browser will get it from cache.

    You can refer very nice article of Wayne Shea about cache expiration here:
    http://articles.sitepoint.com/article/save-cash-optimize-cache

    Add Expires header on server side

    You can find the ways to add Expires header on IIS below.

    IIS 5

    You need to select a file or folder and select Properties… in context menu. Then select HTTP-Headers tab and check Expire Content Expiration and after check Expire Immediately:

    IIS 7

    Select HTTP Response Headers in feature list. Right-click -> Set Common Headers… Check Expire Web Content -> Immediately :

  • Ant in FlashDevelop

    If you need compile your Flex\Flash project, you have to make two steps:

    1. Install Ant
    2. Find the file \Settings\ToolBar.xml in your FlashDevelop directory and append the following lines before </toolbar> tag:

    I imply you use the latest FlashDevelop version (3.0.6 RTM).

  • FlashDevelop shortcuts

    I noticed that many people don’t know very useful shortcuts in FlashDevelop. Therefore I listed them below. Many of them can be used in advanced text editors like Notepad++ (edit section and further).

    Development shortcuts

    Ctrl+SPACE = Autofill.
    Ctrl+Alt+SPACE = Autofill with class name.
    Ctrl+Shift+SPACE = Shows method parameters hint if cursor is inside method call.
    Ctrl+Shift+1 = Template generation. You can generate:

    • Getters and setters if you are on field definition.
    • Class field if you are on undeclared variable.
    • Function if you are on undeclared function.
    • Event handler if you are on undeclared event handler.
    • All public methods and properties inherited by current class from the interface under cursor

    Ctrl+B = Snippet insertion. Snippet is unparameterized code template. In instance, condition or loop. You can add/edit snippets by Tools->General Tools->Snippet Editor…
    Ctrl+J = Activating TypeExplorer window. It helps to find the class by the first letters of class name. You can open the class at once.
    F5, Ctrl+Enter = Compile project
    Ctrl+Shift+K = Insert color
    Ctrl+Shift+I = Insert GUID.

    Code navigation

    F4 = Goto method/class/property declaration.
    Shift+F4 = Come back from there
    F12 = Goto Next error.
    Shift+F12 = Goto Previous error.
    Ctrl+[ = Goto next statement (declaration of variables or function, condition statements, new operator etc.)
    Ctrl+] = Goto previous statement
    Ctrl+Shift+F = Expand/collapse current line
    Ctrl+Shift+A = Collapse all
    Ctrl+Shift+E = Expand all
    Ctrl+G = Goto line number…

    Edit

    Double click on word = word selection
    Ctrl+U = converts selected word to uppercase
    Ctrl+L = converts selected word to lowercase
    Ctrl+right arrow = Goto next word
    Ctrl+left arrow = Goto previous word
    Ctrl+up arrow = Scroll up the window
    Ctrl+down arrow = Scroll down the window
    Ctrl+/ = Goto previous subword (separate word or subword starting with capital letter. For example, the subword “Count” in word “filesCount”)
    Ctrl+\ = Goto next subword
    Alt+Home = Goto real line start but not the first not-null symbol of the line like Home key.
    Ctrl+Home= Goto file begin.
    Ctrl+End = Goto file end.
    Ctrl+D = Duplicate the line
    Ctrl+T = switches the current an the previous lines
    Ctrl+Shift+D = Deleted the current line
    Ctrl+Q = comment line
    Ctrl+Shift+Q = uncomment line

    Search

    Ctrl+F = Search window
    Ctrl+H = Replace window
    Ctrl+I = Replace in Files window
    F3 = Goto next word usage
    Shift+F3 = Goto previous word usage

    Windows managements

    Ctrl+S = Saves the Tab
    Ctrl+Shift+S = Save as…
    Ctrl+W = Close the current tab
    Alt+F4 = close FlashDevelop
    Ctrl+N = Opens new blank tab
    Hold CTRL and pressing TAB several times = switching tabs in forward direction
    Hold Ctrl+Shift and pressing TAB = switching tabs in backward direction
    Ctrl+TAB = Goto last active tab
    Ctrl+PgUP = Goto between tabs from right to left
    Ctrl+PgDown = Goto between tabs from left to right
    Alt+Shift+Enter = Go to fullscreen

    I hope this shortcut list will help you use FlashDevelop more efficiently.