« October 2004 | Main | December 2004 »

November 30, 2004

FMX2004 Security Sandbox Violation

I have started to get the following message in the output panel when running a simple test application inside the FMX2004 IDE on my local machine.

SecurityDomain 'http://a1.phobos.apple.com/Features/y2004/m11/d18/h14/dj.kfpcttla.100x1
00-99.jpg' tried to access incompatible context 'file:///D|/projects/ Samples/test.swf'
*** Security Sandbox Violation ***

Everything still works as expected so it doesn't seem to stop anything from working its just a little annoying to keep seeing it.

Does anyone know what it means, why I am getting it now and most importantly how to stop it.

November 29, 2004

XPCharting Component Set Released

Well we have a major new release today, XPCharting!

Written in AS2, built on the same architecture that drives our XPComponents, lightweight, smart and feature packed!

Drop one of the XPCharting components on the stage, adjust parameters, add in your data and your done!

XPCharting makes it easy to:

  • Create many types of charts, including bar charts, line charts, area charts, and pie charts.

  • Create interactive charts using flash applications. Interactive charts detect mouse movement over chart elements and associate that movement with particular actions.

  • Create dynamic charts using flash applications. Dynamic charts can load data that is not defined when the application is created, and the charts can update the data as it is refreshed.

  • Automatically label the time and numerical axis, saving tedious editing and positioning of the labels.

  • Customize the charts, including setting colors, fonts, number formats, currency formats, and labels.
  • XPCharting components supports the following types of axis charts:

  • Bar charts

  • Line charts

  • Area charts

  • Pie Charts
  • If you want to know more then take a look here and try out the demo's.

    Even if your not interested in buying them any feedback on the components is welcome!

    Subtle loop problem in FMX2004

    This is weird and it's such a subtle problem it’s a bit worrying that it can so easily catch you out.

    Look at this code

    doSomething = function(v){trace("value is "+v);}
    var x=0;
    var step=10;
    for(var i=0;i<1;i++){
    doSomething(x)
    x+=step
    }

    so when doSomething is called what is the value of x traced out? Answer is 0....of course!!

    Now look at this

    doSomething = function(v){trace("value is "+v);}
    var x=0;
    var step=10;
    for(var i=0;i<1;i++){
    doSomething(x)
    (x+=step)
    }
    so when doSomething is called what is the value of x traced out ? Answer is 10....??


    Because the doSomething call in the loop wasn’t terminated with a ";" and the next line has a pair of brackets "()" round it then that expression gets evaluated before the call is made...hmmmmm

    Ok the obvious thing is to code it properly and always use a ";" which I do as a rule, this was just a small slip up as I was testing something and threw the code together (at least thats my excuse. lol)

    ... but its such a subtle slip up I wonder how many other places have I done this before and run around scratching my head about what the problem was?