So a few coworkers of mine ran into a problem on an AIR project we are working on.  Our application involves a lot of music and sound generation which required us to use the new SampleDataEvent class in Flash Player 10.  Anyways, for some reason, 2 of my friends at work would get a random RTE saying:  “Variable SampleDataEvent is not defined”, yet my computer never gave me any problems with it.  To compensate for it, they would just avoid the part in the application where this error would be thrown.  After a few days they were put on other projects and the issue was no longer critical.

A few weeks later I was asked to build a custom Mac installer for this application, so I hopped onto a Mac, and wouldn’t you know it… the problem I had been avoiding finally hit me too.  I looked through forums and groups and found several people complaining about the same issue, but I couldn’t find a resolution to the problem.  I was sure that I had AIR 1.5.1 on my computer, so I wasn’t sure why FP10 wouldn’t have been targeted (which was my original suspicion).

Finally, I found the answer here.  I had to manually go into FLEX_SDK/frameworks/flex-config.xml and change


9.0.115

to this:


10.0.0

Then I added a compiler argument -target-player=10.0.0 and voila, no more RTE!  I am confused why Flex Builder 3.0.2 didn’t just have some sort of configuration setting for AIR in the first place!  It does for a normal Flex application… you go to Properties > Flex Compiler and set Target Flash Player version to 10.0.0.  Anyways, problem solved… hopefully this helps others with the same issue.

Tags: , ,

11 Responses


  1. Alex on 18 May 2009

    This is really strange error, which could not be obviously solved…Thank you for your help!!!

  2. Phil on 15 Jun 2009

    Thanks – this really helped me out!

  3. marcin pakulnicki on 18 Jun 2009

    man thanx for this post, it helped me continue with my project. have a good night!

  4. Mitesh on 04 Aug 2009

    The info you posted prooved really helpful for me for flex SDK’s
    target player issue.but i am stuck with AIR’s problem.I always get the sampleDataEvent not defined for AIR,Altough the SDK’s are upgraded.Any help would be valuable

  5. Nate on 04 Aug 2009

    Hi Mitesh,

    SampleDataEvent is only available in AIR 1.5. I am guessing that you are pointing to either AIR 1.0 or 1.1 which will not work. To fix this, you simply need to change you application xml description file (-app.xml) to the 1.5 URL.

    So, change the line:
    http://ns.adobe.com/air/application/1.0
    to:
    http://ns.adobe.com/air/application/1.5

    and everything should work fine for you.

  6. Mitesh on 05 Aug 2009

    I am very thankful,for your valuable suggestion as you pointed out that AIR should be 1.5 in -app.XML,i found that the AIR that i had was still needed to upgraded, i was in the perception
    that AIR automatically upgrades itself with flex sdk’s upgradation.now i did the AIR’s upgradation to 1.5.2 but now i get compile time error mx.core.windowedApplication not located.May u please tell me the correct steps to upgrade AIR ,Again i want to thank you for flex sdk’s upgradation info because your info bought me out of a pit.

  7. Nate on 05 Aug 2009

    Are you experiencing this error when you try to compile in Flex Builder? If so, verify that the airglobal.swc is located in [WHEREVER YOUR SDK IS]/framewoks/libs/air. Sounds like the compiler is just not finding the path to this SWC (which contains WindowedApplication).

  8. Mitesh on 05 Aug 2009

    Thank you i found that someone had deleted all the files inside air. now i did every thing fine i guess ,the AdobeAir.dll shows me version 1.5.2 (which is in (SDK PATH)\runtimes\air\win\Adobe AIR\Versions\1.0).and also changed the
    line:
    http://ns.adobe.com/air/application/1.0
    to:
    http://ns.adobe.com/air/application/1.5,
    But to no vail :( i still get the same error sampleEventData not defined ,past one week i am pullin ma hair out for upgrading AIR.Bye the way thanks for your help.

  9. Nate on 06 Aug 2009

    Odd… what version of Flex Builder are you using? 3.0.2? And what version of the Flex SDK?

  10. Mitesh on 07 Aug 2009

    Flex builder is 3.0.0 and flex sdk 3.3 ,flex works sucessfuly but only AIR is not performing…..may be i should try for flex builder 3.0.2….i will give one more try….:)

  11. Mitesh on 07 Aug 2009

    :) … I got it working ,the version of flex builder was not upto date….i upgraded it to flex builder 3.0.2 and every thing worked fine…Thanks For your help…..have a nice time


Leave your comment


ray ban wayfarer ebay ray ban aviators
bag borrow or steal
Buy shoes online india
replica handbags