Skip navigation
Currently Being Moderated

TLF problem with flex_sdk_4.0.0.10485

Mar 2, 2010 2:05 AM

Hi All,

I have just written a simple As class using flex builder3 and flex_sdk_4.0.0.10485 surprisingly it shows a dozen of errors

     my simple class is

  package {
    import flash.display.Sprite;
   
    import flashx.textLayout.compose.StandardFlowComposer;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;

 

   
    public class HelloWorld extends Sprite
    {
        public function HelloWorld()
        {
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            textFlow.addChild(p);
           
            var span:SpanElement = new SpanElement();
            span.text = "Hello, World";
            span.fontSize = 48;
            p.addChild(span);
           
            textFlow.flowComposer.addController(new ContainerController(this, 400, 200));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}

 

the error lis in Flex builder:

 

 

Severity and Description    Path    Resource    Location    Creation Time    Id
1084: Syntax error: expecting rightbrace before BusyCursor.        DemoTLF    line 17    1267524161015    177
1084: Syntax error: expecting rightbrace before end of program.        DemoTLF    line 53    1267524161015    178
1084: Syntax error: expecting rightparen before s.        DemoTLF    line 17    1267524161000    174
1093: Syntax error.        DemoTLF    line 17    1267524161000    175
1094: Syntax error: A string literal must be terminated before the line break.        DemoTLF    line 17    1267524161015    176

 

I did'nt get whats going wrong any help would be highly appriceated

 
Replies
  • Currently Being Moderated
    Mar 2, 2010 9:54 AM   in reply to gauravk.pandey

    I'm guessing that its choking on the Vector declarations in playerglobals.  Make sure you are targetting player10.  With FlexBuilder 3 I recall that was a bit tricky - first turn on generate HTML wrappers if it iisn't already.  But then maybe its something else.

     

    Hope that helps,

    Richard

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2010 10:09 AM   in reply to gauravk.pandey

    It sounds like your IDE is building more than just the HelloWorld example, and that the error is in some other file. Have you searched for a class called "DemoTLF"? If you're in Flex, do a multi-file search. "DemoTLF" doesn't sound like something they'd put in the SWC.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2010 9:03 PM   in reply to gauravk.pandey

    By default it will use the SDK that comes with Flex Builder, you will need to add the new SDK, and select it as your target Flex SDK, if you haven't already. That will ensure that it is using the correct version of the compiler when it builds. I don't remember exactly how this is done, but I think if you select "Preferences" there will be an option, perhaps under "ActionScript" for installing the Flex SDK. I would suggest checking to make sure this is done.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points