Blog posts

  • Actionscript 3.0 Problem: Loader doesn't fire COMPLETE event.

    February 12, 2009 | Tags: Actionscript, Troubleshooting, Flash

    This seems to appear only in Internet Explorer. When using the Loader to load an external image into Flash the COMPLETE event are sometimes not fired, while the PROGRESS event is fired frequently and the bytesLoaded increses until the whole file has been downloaded. Other events doesn't fire either, like INIT.

    There is a workaround for Actionscript 2.0 (AS2) which can be found here:, but it doesn't work on Actionscript 3.0 (AS3).

    However it seems that a second call to load() will produce the correct event calls a second time.

    Here's the base code which uses the Loader object:

    var ldr:Loader = new Loader(); 
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    var imgHolder:MovieClip=MovieClip(getChildByName("imgHolder"));
    var urlReq:URLRequest = new URLRequest("http://url/myimage.jpg");

    And here's the fix:

    var reLoaded:Boolean=false; 
    function progressHandler(e:ProgressEvent) {
    if(e.bytesLoaded>0&&!reLoaded) {

    What it does is it waits for the first couples of bytes to be read and then fires the load() function again, thus canceling the first load()-call. The events should be called as expected this time, even in Internet Explorer!

  • Droplet problem in Photoshop (and solution)

    February 12, 2009 | Tags: Photoshop, Troubleshooting

    Had some problem with creating a droplet in Photoshop CS3. The droplet exe was created correctly but when I tried to run it (by droping a file onto it) nothing happened except that Photoshop started, but no file was loaded or processed.

    After some search I found a sollution. The problem was that registry keys pointed to my previous Photoshop version (which was CS2). This seems to occur at upgrades of Photoshop. If you have a simular problem (will probably work in other Photoshop versions where Adobe's installer hasn't changed the registry keys correctly) you can fix this by doing the following:

    1) Download the from this page

    2) If you have increased the security on your machineyou might have assigned the run command to open any .vbs file in Notepad instead of running it. In this case you need to run it manually by entering the command prompt (run "cmd") and then write the following "cscript c:\dropletfixer.vbs" (or where you have placed the file).

    If you're concerned about running scripts and files from the internet you could open the vbs and do the operations manually. If you know any programming language you would understand the code in the file as it's pretty straightforward.

  • ASP.NET: Problem with dynamicly loaded user controls and events (and the solution)

    February 12, 2009 | Tags: ASP.NET, Troubleshooting
    Having problem with dynamicly loaded user controls doesn't fire the events properly, on for instance a button or linkbutton, although their on_load etc events are fired in the user control on postback so it clearly loads the control?

    Your code might look like this:
    And if so the problem is that your user control isn't assigned with an id and thus the parser won't see the loaded control as the same that fired the event (although it might sometimes). To solve it replace the code as follows:
    MyUserControlClass uc=Page.LoadControl("~/Units/MyUserControl.ascx");
    That should solve the problem!! :)

  • Access: Unmatched query for more than one field

    February 12, 2009 | Tags: Access, Troubleshooting
    The limitations of Access can be real troublesome sometimes. Like for instance when trying to outer join a table based on more than one field. The unmatched join in Access allows only one field for the join, but there's a little work-around to that.

    For instance, if we want to join table A with B on the fields fld1 and fld2 and list all posts in A wether or not they are matched in B, the SQL expression for Access would look something like this:

    SELECT * FROM A LEFT JOIN B ON (A.fld1=B.fld1) WHERE ((B.fld2=A.fld2) OR (B.fld2 IS NULL))

    Notice the second part that says that B.fld2 either has to be the same as A.fld2 or not a value (which would be the case if our initial criteria A.fld1=B.fld1 doesn't match).

  • Auto-attach to process aspnet_wp.exe on machine failed

    February 12, 2009 | Tags: ASP.NET, Troubleshooting
    An additional tip to the 'Things to Check' that Microsoft lists in 'Unable to Start Debugging on the Web Server' when start debug fails from Visual Studio is to check wether or not the ASP.NET version for the current application catalog is set to the same as the project. As default new virtual paths always gets the highest version assigned which will prevent, for instance, Visual Studio 2003 to debug projects on a machine that has ASP.NET version 2.0 installed.