SimonRH
SimonRH

Reputation: 1459

Which version of the compiler should I be using?

I am running Flex Builder on a Mac using the Flex3.6A compiler. I have been trying to use a Date object, but it keeps giving me errors, even when I run the most basic files from the Flex documentation. For example, the following fails:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" creationComplete="init()">
<mx:Script>
    <![CDATA[
        private function init():void{
            var now:Date = new Date();
            trace(now)
        }
    ]]>
</mx:Script>
</mx:Application>

I've never before had a problem like this on the Mac. Am I running the wrong compier?

Upvotes: 0

Views: 73

Answers (2)

shaunhusain
shaunhusain

Reputation: 19748

Insofar as using different versions of the compiler itself with another version of the SDK, this isn't necessarily a problem with regard to Spark or MX components, the newer compiler should be backwards compatible, for example I made a new Flex 4.6.0 project and changed the base class of the main.mxml file to mx:Application and it compiles and runs fine. One obvious change is that the default theme looks more like the default spark theme instead of the old halo, though I would guess you could manually pull in the old style definitions, or in your case using the older SDK swcs you would probably get this automatically.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                xmlns:s="library://ns.adobe.com/flex/spark" 
                xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <s:Label text="Just a test"/>
</mx:Application>

Please post your particular errors, to get more detailed feedback. Generally speaking it's probably best to use the same version of the compiler that came with the SDK since that's probably what everything was tested with, but for the most part I would guess the compilers are backwards compatible, the syntax of MXML and AS3 haven't really changed only extensions via the spark and fx namespace have been added, but I don't think anything has changed drastically enough to break backwards compatibility (that is if compiler is newer than SDK source I believe it will work but not vice versa, particularly due to the playerglobal.swc/flash player version changes utilized by the framework).

Upvotes: 0

Darcey
Darcey

Reputation: 1987

From what I can remember by SDK versions:

3.6 is FP9
4.0 is FP10 and onwards
4.1 is FP10 and onwards
4.6 is FP11

Always use the highest sdk version you can get away with.

You can download the SDKs from:

http://www.adobe.com/devnet/flex/flex-sdk-download.html

NOTE: GPU acceleration is FP11.

Upvotes: 1

Related Questions