author: Krasimir Tsonev

Hi there, I'm . Senior front-end engineer with over 13 years of experience. I write, speak and occasionally code stuff. Follow me on Twitter, GitHub, Facebook or LinkedIn

#ActionScript


Flash CS5 is not working

posted in ActionScript on 2013-12-19   ,
That's one of those blog post which I'm using as documentation. When I find a bug and I fix it I feel that I have to write the whole process somewhere, because if I meet the same problem in the future I'll really want to save some time. Today I open my Flash CS5 and apparently I can't paint on the stage. read more comments

Security sandbox violation error even with crossdomain.xml

posted in ActionScript on 2013-06-26   , ,
Again, a very nice surprise by Adobe. I have a flex application which makes cross-domain requests to another server holding REST API. There is a crossdomain.xml file, but the request still doesn't work. read more comments

Flash, nodejs sockets and cross-domain policy file

posted in ActionScript on 2013-06-13   , ,
Ok, that was a long journey. I took an already build project and I had to make some changes. It's a complex system involving flex applications, nodejs and a mobile site. Before to start making changes I had to setup the project and make it work on my local machine. I spend few days doing this. At the end I successfully compile the flex application and made the necessary corrections. I uploaded the new swf file and of course it didn't work. read more comments

A strange IOErrorEvent.IO_ERROR event dispatched

posted in ActionScript on 2013-06-11   , ,
Really simple GET request from a flex based application. However it fails if GET parameters are passed. read more comments

The Flash Builder debugger failed to connect to the running application.

posted in ActionScript on 2013-06-07   , ,

I really don't like FlashBuilder. Mainly because I'm losing a lot of time just to setup the project. Usually when I receive the files I need around 10 hours just to compile successfully. The reasons for those problems are different Flex SDK, different directories' tree, wrong paths, missing libraries or fonts. Today I encounter a brand new type of problem. read more comments

Compiling iOS application under Windows with Flex SDK

posted in ActionScript on 2013-03-06   , ,

As you may know, Apple doesn't allow creation of iOS applications just like that. Especially under Windows. It's somehow a complex process, which requires several steps in a specific order. However it is still possible and you can do that without Mac. read more comments

Few things that you may not know about ActionScript

posted in ActionScript on 2012-06-30  
Christophe Herreman shows few interesting stuff about ActionScript. read more comments

Adobe\'s strategic transformation and the Flash Platform

posted in ActionScript on 2011-11-20   , ,
Adobe is in the midst of a fundamental transformation. We are transforming from software in boxes to solutions in the cloud, and to a world of touch interfaces on devices, and social connections everywhere. This is a time of both innovation and change for Adobe and for the Adobe community ...Read the full article here. read more comments

Colorize your output in FlashDevelop

posted in ActionScript on 2011-10-08   ,
Did you ever wonder how to change the color of your traces in FlashDevelop. It's possible and it is really helpful feature. read more comments

Joel Hook\'s Introduction to Robotlegs

posted in ActionScript on 2011-08-27  
Great articles by Joel Hook about RobotLegs.Introduction to Robotlegs – Part 1: Context and mediatorsIntroduction to Robotlegs – Part 2: ModelsIntroduction to Robotlegs – Part 3: Services read more comments

AS3: Tracing in Flash/Flex

posted in ActionScript on 2011-08-16   , ,
Inspired by the article of Dru Kepple I decided to share my experience in Debugging processes in flash/flex enviroment. read more comments

AS3: DataGrid with custom ItemRenderers

posted in ActionScript on 2011-08-11   , ,
One of the big advantages of Flex framework is that you can use a lot of ready components. The DataGrid is really helpful. Especially when you want to list big amount of data and provide ability to edit the information directly in the grid. These days I finished a test task which uses DataGrid and decided to share my experience. read more comments

A RobotLegs Book

posted in ActionScript on 2011-07-22   , ,
@Stray and @Joel Hooks finished their book for RobotLegs. Definitely it is something that you should read. More information here. read more comments

AS3: Creating Facebook Application

posted in ActionScript on 2011-07-08   , ,
Facebook became one of the most popular social platforms these days. I just finished a flash based game that uses their API and decided to share my experience. read more comments

AS3: Dealing with multi-language data in your application

posted in ActionScript on 2011-06-16   , ,
I'm a big fen of the MVC pattern. I like the idea to store my data in one place and be able to get it fast. In most of my projects I used a class called Storage for similar purpose. It supports a multi-language data saving, so I decided to share it with you. read more comments

5 useful ActionScript 3 tips

posted in ActionScript on 2011-05-24   , ,
Sometimes, when you work on some project, you find something that is small, but very interesting and useful. Usually I'm adding such kind of things in classes that I like to call helpers. The following tips are part of my helpers. read more comments

AS3: dynamic text field to curve (TextField on an arcing path)

posted in ActionScript on 2011-05-04   , ,
[2]Most of the articles here are tightly connected to my daily work. As you probably know from one of my latest posts (runtime font loading/embedding) I worked a lot with texts these days. There was a request for producing curved text from a dynamic field. Of course it wasn't so easy to create such a feature. I wrote a simple class that did the job and I decided to share it. read more comments

AS3: runtime font loading (embedding)

posted in ActionScript on 2011-04-25   , ,
Flash is wonderful technology and has many advantages. Before a couple of years it was really popuplar to use it for displaying fonts that are not installed on the user's machine. Flash is still powerfull tool for such kind of tasks. These days I worked on a project which had to use a lot of fonts. It wasn't possible to embed all of them so I decided to implement runtime embedding. read more comments

AS3: converting XML to JSON object

posted in ActionScript on 2011-04-02   , ,
I'm absolutely sure that you are using external data in your flash/flex applications. It is a good practice to transfer information in XML format. Most of the projects that I'm working on also use XML and in most of them I have a class that converts the data to JSON object. The problem with this workflow is that the parser's logic is always different because the XML is different. These days I wrote a class that solved this problem and directly converted every given XML file to a JSON object. read more comments

FlashDevelop scripting: open file by name (part 2)

posted in ActionScript on 2011-03-29   , ,
After a couple of days of using my script for file opening I decided to rewrite it and add more functionalities. read more comments

FlashDevelop scripting: open file by text selection

posted in ActionScript on 2011-03-20   , ,
FlashDevelop is one of the most preferred editors for the flash development. I've been also using it last few years. I found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel. That's why I decided to invest time in solving this task and found that I can write my own C# script and run it. read more comments

Convert Adobe Flash FLA files into HTML and reach more devices

posted in ActionScript on 2011-03-13   , ,
"Wallaby" is the codename for an experimental technology that converts the artwork and animation contained in Adobe® Flash® Professional (FLA) files into HTML. This allows you to reuse and extend the reach of your content to devices that do not support the Flash runtimes. read more comments

Creating simple WYSIWYG editor with AS3 (Flex)

posted in ActionScript on 2011-02-11   , ,
There are dozen of JavaScript WYSIWYG editors available, but most of them are too complicated and a little bit buggy. From time to time I'm using my own tool to provide such kind of functionality. It accepts and exports valid html. I decided to share it with you and explain how I built it. read more comments

Creating mp3 player with RobotLegs (basics tutorial)

posted in ActionScript on 2011-02-09   , ,

Have you ever wondered how to optimize your ActionScript applications? Have you searched for a nice framework that will save you a lot of time and will organize your structure? If yes then RobotLegs is for you. In this article I'll show you how to use it to create a simple mp3 player which loads a configuration xml file, parse it and play mp3 files.

read more comments

AS3: Using custom metadata in flex (part 2)

posted in ActionScript on 2011-01-27   , ,
Because of the huge interest in AS3: Using Custom Metadata in Flex (part 1) I decided to dig a little bit deeper in this topic. You already know how to get information about your custom metadata, so in this article I'll show you how to use it. read more comments

AS3: Using custom Metadata in Flex (part 1)

posted in ActionScript on 2010-12-28   , ,
I'm sure that you've already used metadata tags in your flex applications. There are several reserved keywords like [Bindable], [Embed], [Event] and so on (the full list is available here). The function of the metadata tags is to provide additional information to the flex compiler. For example information about embeding assets, dispatching events. This article doesn't explain how to use the default flex tags (you can learn that from here). It shows you how to create your own metadata tags and how to use them. read more comments

How to generate SWC file from ActionScript package

posted in ActionScript on 2010-12-18   , ,
SWC file format is really useful when you want to transfer or to compact your ActionScript libraries. It is also used for exporting assets, which can be used later. Let's imagine that you want to create a .swc file for only small part of your application, i.e. pure .as files. I searched a lot for the fastest and easier solution and finally I think that the usage of compc.exe is the best option. read more comments

Change the quality of all the bitmaps of your flash document

posted in ActionScript on 2010-12-15   , ,
I know that you've met this problem. You have a lot of bitmaps in your library and you have to edit all of them one by one. There are several solutions of this problem. One of them is to use JSFL. There is another one - an extension for Flash provided by ArsThanea. Check it out here. read more comments

Scaling rounded corners in Flash

posted in ActionScript on 2010-12-11   , ,
I'm absolutely sure that you've already met this problem. You know, these nice rounded buttons that are provided by the designer. They are really cool, but sometimes the label of the button is so long that you have to resize/scale the image. ActionScript3 provides simple way to solve this issue. read more comments

Deep linking in flash with AS3

posted in ActionScript on 2010-11-14   , ,
Many people will say that Flash is not SEO friendly. Actually that's not 100% true. Flash is just a tool that shows your data. Exactly the same as the HTML. In this article I'll show you how to use ActionScript3 and JavaScript together to make your flash sites SEO friendly and provide a different URL for each of your pages. read more comments

Pattern fill with AS3 (repeat-x)

posted in ActionScript on 2010-11-04   , ,
Currently I'm working on an AIR application and in the header of it there is a nice gradient which has to be repeated by the x axis to fill the whole screen area. One way to do it is to use a really wide image, something like 2000px. The other way is to use a simple trick and repeat a small part with the gradient. read more comments

Adobe AIR: how to make things upon closing the application

posted in ActionScript on 2010-11-03   , ,
Sometimes we need to catch the closing of our AIR application to make some things like storing the window's position and size. We can do that in our code. read more comments

checkPolicyFile flag was not set

posted in ActionScript on 2010-10-26   , ,
Sometimes the uploading of crossdomain.xml file is not enough to get the things working. read more comments

How to protect your SWF file

posted in ActionScript on 2010-10-15   , ,
Is there any way to protect your flash work? To be honest the answer is NO. As you probably know everything that is uploaded on a web server and is accessible from a web browser is downloaded to the users' computers and could be found in the temporary directories. Once someone gets your swf file he could use one of the dozen decompilers to reproduce the .fla and .as files. Anyway, there are still some ways to make stealing difficult. read more comments

Adding outline of text or MovieClip in Flash with AS3

posted in ActionScript on 2010-10-06   , ,
As you probably know there is no such kind of option. We should deal with a little AS3 code. read more comments

How to create realistic Earth globe in Flash (AS3, Papervision3D)

posted in ActionScript on 2010-09-16   , ,
Papervision3D is a perfect tool for the purpose. As you will see such a task needs only few lines of code. To make the example a little bit more interesting we will add additional code to control the rotation of the globe by the mouse. read more comments

Pixel perfect in Papervision3d

posted in ActionScript on 2010-09-12   ,
Did you ever wonder how to create a pixel perfect animation in Papervision3d? I designed my portfolio site in Photoshop, but when I tried to integrate the 3D effects I spent a lot of time in changing the zoom and focus length to match the exact dimensions. And even then they were not perfect. read more comments

Distort MovieClip in Flash with AS3

posted in ActionScript on 2010-09-05   , ,
As you probably know there is no simple way to distort a MovieClip in Flash. The solution that I've found uses AS3. Special thanks to Thomas Pfeiffer and Ruben Swieringa. They share their experience with this problem. read more comments

Duplicate loaded images in AS3

posted in ActionScript on 2010-08-30   , ,
During the creation of the latest changes in my portfolio site, I needed to duplicate a loaded image that has to be placed as a material in papervison3d's cube. We don't have duplicateMovieClip in AS3, so we have to use another technique. read more comments

How to use Google Maps API in flash

posted in ActionScript on 2010-08-19   , ,
Google offers a lot of free tools for us. One of them is really useful and easy to work with - GoogleMaps API. In this article I will show you how to import a map in Flash and place an icon in a specific place. read more comments

Create your own tween manager class in AS3

posted in ActionScript on 2010-08-07   , ,
There are some features in Flash that we can't work without. Tween classes are among the most used ones. They give you ability to animate objects without using the timeline, to change the animation fast and easy. The idea of these classes is very simple. That's why I think that it is a good idea to have your own tween manager that you can modify to fit into your needs. read more comments

Javascript to Flash communication and vise versa

posted in ActionScript on 2010-08-05   , ,
The communication between Flash and JavaScript is really important part of the web sites today. That's why I decided to share how to do it. read more comments

Delegation in AS3

posted in ActionScript on 2010-08-02   , ,
I just can't code without delegation. I'm using it every day and wanted to share this method with you. read more comments

Papervision3d: Finding 2D coordinates of a 3D object

posted in ActionScript on 2010-07-25   , ,
Papervision3d is probably the most popular 3D flash engine. There are dozen of applications/sites that use it. These days I also decided to create a 3D effect in my portfolio site. Everything works fine, but I needed a tooltip for each of the 3D objects on my scene. To be able to animate everything I needed 2D coordinates of all my 3D elements. read more comments

Trace JSON object in AS3

posted in ActionScript on 2010-07-17   , ,
I'm absolutely sure that all of you are working with JSON objects. It's pretty helpful to be able to print them and find out what exactly they contain. I wrote a simple function that makes this possible. read more comments

Load MySQL data in Flash with AS3

posted in ActionScript on 2010-07-10   , ,
There are some things that I'm doing in almost every project. Loading of data in Flash is actually one of them. In this article I'll show you how to load information from MySQL database. We will use PHP as a junction between the Flash and the database. You need an Apache server like XAMPP or EasyPHP installed or just a hosting account that supports php. read more comments

Remove tags from a string in AS3

posted in ActionScript on 2010-06-30   , ,
A couple of months ago I integrated a nice WYSIWYG editor written in Flex in my CMS. It worked fine, till yesterday I needed to add more features like text formatting and font color changing. As you know the Flex RichTextEditor component adds some additional tags that I definitely don't want to send to the database. So I wrote a simple function to remove these tags. read more comments

Customize ComboBox in Flash (AS3)

posted in ActionScript on 2010-06-17   , ,
In my work as a flash developer very often I receive from the client just one photoshop file with the design of the application/site that has to be coded. In the last project the designer made the ComboBox in the style of the site. So I couldn't use the default look of the Flash's drop down component. read more comments

Code Flex applications with FlashDevelop

posted in ActionScript on 2010-06-07   , ,
read more comments

Tween Manager Class in AS3

posted in ActionScript on 2010-03-16   , ,
TweenManager is ActionScript3 class that helps you to animate your objects in flash. You don't need to create timeline type animations, because you can control every property of the object. Also it helps you to create a sequence by different animations/events. In the examples below I'll show you how to use the manager to solve different problems during your daily flash work. read more comments

Remove the yellow border in flash/flex

posted in ActionScript on 2010-02-26   , ,
The solution was so easy: stage.stageFocusRect = false;Thanks to Rockabit for the post here. read more comments

Embed fonts in all the text fields of your flash document

posted in ActionScript on 2010-02-26   , ,
Very helpful solution that will save you maybe several hours. I used JSFL language and very short script to parse all the items in the library. Then for every item just embed the characters that I wanted. Get the script from here http://www.outset.ws/files/jsfl/embedCharactersInTextField.jsfl. In flash: Commangs -> Run command (or simply Ctrl+R) and point the script file.You can download the jsfl documentation from here http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf. read more comments

Flex: tabbing bug

posted in ActionScript on 2009-09-29   , ,
read more comments

Flex DataGrid vertical scrolling bug

posted in ActionScript on 2009-09-09   , ,
read more comments

Flash CS3 crashes when closing the testing window !

posted in ActionScript on 2008-11-14   , ,
I'm working with a class for creating scrolling text field. So I'm using a MovieClip as mask and TextField. When I test the movie and close the testing window Flash just crashes. It's because I have applied the mask directly to the TextField :) The problem is described here. Thank you BKWLD ! read more comments