Skip to main content
Known Participant
March 2, 2010
Question

TLF problem with flex_sdk_4.0.0.10485

  • March 2, 2010
  • 2 replies
  • 1071 views

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

This topic has been closed for replies.

2 replies

Participating Frequently
March 2, 2010

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.

Adobe Employee
March 2, 2010

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

Known Participant
March 3, 2010

Hi ,

   Richards thanks for your reply, I am targeting the flash player 10 and generate HTML wrappers is allrady turn on , can you help me that anything else causing it.


Thanks

Gaurav kumar pandey

Adobe Employee
March 3, 2010

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.