Rightparen error

I keep getting this error 1084: Syntax error:expecting rightparen before message
here's the code
private function populateDatabase():void
                                        var createTable:SQLStatement= new SQLStatement();
                                        creataTable.sqlConnection=sqlConnection;
                                        createTable.text= "CREATE TABLE IF NOT EXISTS highscores("
                                                                                          +"id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, scores INTEGER)";
                                        try
                                                  createTable.execute();
                                        catch(err:Error)
                                                  trace(err message);
                                        addItems([
                                                              {name:"Bob", scores:"123"}]);

The catch section code line should be:
           trace(err.message);

Similar Messages

  • Syntax error: expecting rightparen before not.

    Another textbook problem!
    The step word for word in my textbook is:
    The following four lines of code placed above the goto statement for the function called by the home button so the animation does not play when the Home button is clicked.
    if (animationInstance.parent != null)
         animationinstance.parent.removeChild(animationInstance);
    So.. I added this step to my code for the assignment and when I test it, I'm getting error:
    Scene 1, Layer 'actions', Frame 1, Line 29 1084: Syntax error: expecting rightparen before not.
    Here's my entire code for the frame:
    import flash.events.MouseEvent;
    stop();
    var animationInstance:animationMC = new animationMC();
    graphicsBtn.addEventListener(MouseEvent.CLICK, goto2);
    function goto2(Event:MouseEvent)
        gotoAndStop(2);
    animationsBtn.addEventListener(MouseEvent.CLICK, goto3);
    function goto3(Event:MouseEvent)
        gotoAndStop(3);
    formBtn.addEventListener(MouseEvent.CLICK, goto4);
    function goto4(Event:MouseEvent)
        gotoAndStop(4);
    photoBtn.addEventListener(MouseEvent.CLICK, goto5);
    function goto5(Event:MouseEvent)
        gotoAndStop(5);
    homeBtn.addEventListener(MouseEvent.CLICK, goto1);
    function goto1(Event:MouseEvent)
        if(animationInstance.parent ! = null)
            animationInstance.parent.removeChild(animationInstance);
        gotoAndStop(1);
    Any help is appreciated!!

    ! = should be !=   no space ( ! is what they are calling "not" -- shoulda just used ! )
    And I think I already mentioned to not use "Event" like you do

  • 1084: Syntax error: expecting rightbrace before rightparen

    Hi,
    I am getting the following error when using the below code:
    1084: Syntax error: expecting rightbrace before rightparen.
    Code:
    Buttons.Btn_2.addEventListener(MouseEvent.CLICK,Btn_2ClickHandler);
    function Btn_2ClickHandler(event:MouseEvent):void {
    navigateToURL (new URLRequest ("http://Main/New_Projects/Album-2.htm"), "_self"));
    I am getting this error only after adding  , "_self")
    Please help.

    You appear to have one too many right parenthesis in that line.  The number of rights should equal the lefts.

  • 1084:Syntax error: expecting rightparen before area in Math.round

    Anyone have any idea how to fix this:
    theText.scrollV = Math.round((slider.y – area.y)*theText.maxScrollV/90);
    I'm getting error:
    1084:Syntax error: expecting rightparen before area.
    It looks like a proper statement to me... all open brackets are closed.
    Please HELP!!!

    OMG - I copied the code from a post and didn't see that. Good for you!
    Thanks!!!

  • 1084: Syntax error: expecting rightparen

    Help!!  I am new to Flash.  I am trying to make a  card flip,  I have a photo on one side and info on the next.  It is controlled by a button.  I an getting this error:
    1084: Syntax error: expecting rightparen before flip on lines 5 and 6.  I have been trying to figure it out, but am stumped.  Can anyone help? any suggestion would be greatly appreciated.
    Here is my code:
    import fl.transitions.Tween;
    import fl.transitions.easing.Strong;
    import fl.transitions.TweenEvent;
    con.sidea.flip. addEventListener (MouseEvent.CLICK, on flip);
    con.sideb.flip. addEventListener (MouseEvent.CLICK, on flip);
    addEventListener(Event.ENTER_FRAME,loop);
    var isStill: Boolean=true;
    var arraytween:Array = new Array ();
    function onflip (e:Event) {
        if (isStill)  {
            arraytween.push (new Tween (con,'rotationY', Strong.easeOut,con.rotationY,con.rotationY+180,1,true));
            arraytween [0] .addEventListener(TweenEvent.MOTION_FINISH,reset);
            isStill=false;
    function reset (e:Event)  {
        isStill=true;
        arraytween=[];
    function  loop(e:Event)  {
        if (con.rotationY>=90  && con.rotationY<=270)  {
            con.addChild(con.sideb);
        }else {
            con.addChild(con.sidea);
            con.scaleX=1;
        if (con.rotationY>=360) {
            con.rotationY=0;

    It is hard to tell if it is actual or something the forum did (which it does), but you should not have spaces where there appear to be...
    con.sidea.flip. addEventListener (MouseEvent.CLICK, on flip);
    con.sideb.flip. addEventListener (MouseEvent.CLICK, on flip);
    should be...
    con.sidea.flip.addEventListener(MouseEvent.CLICK, onflip);
    con.sideb.flip.addEventListener(MouseEvent.CLICK, onflip);

  • 1086: Syntax error: expecting semicolon before rightparen. ?

    Hi there i'm currently working on my year 13 ICT coursework using Adobe flash CS5.5 and while correcting an error while implementing a third party found image gallery another one appeared, which I am completely unable to fix.
    At the moment I would like the image gallery to be implemented in Scene 3 of my product, but it seems when opening to view the product it just spams through all the scenes and I am confused on why this is the case?
    If anyone can help with this then it would be much appreciated.
    Here is the code line which has the Syntax error, if any other thing are needed please just ask.
    lastBildeHL.onLoadProgress = gotoAndPlay("Scene 1")); numBytesLoaded:Number, numBytesTotal:Number):void
    Thanks

    Hi there just added that line and when doing so I then got these errors:
    Scene 3, Layer 'actions', Frame 5, Line 131
    1084: Syntax error: expecting rightparen before colon.
    Scene 3, Layer 'actions', Frame 5, Line 131
    1078: Label must be a simple identifier.
    Scene 3, Layer 'actions', Frame 5, Line 132
    1084: Syntax error: expecting identifier before var.
    Scene 3, Layer 'actions', Frame 5, Line 132
    1078: Label must be a simple identifier.
    Here are the actions:
    lastBildeHL.onLoadProgress = gotoAndPlay("Scene 1", numBytesLoaded:Number, numBytesTotal:Number):void
        var numPercentLoaded:Number = numBytesLoaded / numBytesTotal * 100;
    Any help would be good
    Thanks,
    Joe

  • Syntax error: expecting rightparen before eq

    This is a copy of the section of code that the error relates to. We've tried many times with parenthesis with no luck.
    key1_mc.onEnterFrame = function(){
        if((keylocated eq "found"))&((potionlocated eq"found"))&
           ((swipecardlocated eq"found")){
               door_btn.enabled=true;

    That looks like ActionScript 2.0 (this is the 3.0 forum).
    Nonetheless why are you using "eq"? That was depreciated for == since Flash Player 5.
    You're using a single & instead of two so you're going into bitwise shifts. Your code should look something like this:
    key_1mc.onEnterFrame = function()
         if ((keylocated == "found") && (potionlocated == "found") && (swipecardloaded == "found"))
              door_btn.enabled = true;
    The differences are I'm using the == equality operator, not the depreciated "eq". Also I'm using two ampersands (&&) instead of 1 to properly add multiple conditions. Lastly your code has two parenthesis before "((swipecardloaded" when it should only have 1. You can see mine has 1 and only at the end do I use 2 to close the statement off.

  • Error: expecting rightparen before colon

    I am still new to actionscript but after looking over this multiple times I'm not seeing the error.
    public class Avatar extends MovieClip
              private var stageRef:Stage;
              private var fireTimer:Timer;
              private var canFire:Boolean = true;
              public function Avatar()
                   this.stageRef = stageRef;
                   //setup your fireTimer and attach a listener to it.
                   fireTimer = new Timer(300, 1);
                   fireTimer.addEventListener(TimerEvent.TIMER, fireTimerHandler, false, 0, true);
                   addEventListener(event:KeyboardEvent, loop, false, 0, true); //this is the line I'm getting the error on
              //rest of the code omitted

    Thanks for the reply,  I guess Flash wasn't very helpful there telling me it was a parantheses issue. I tried your suggestion earlier and it caused a conflict with another part of my code.
    public function Avatar()
                   this.stageRef = stageRef;
                   fireTimer = new Timer(300, 1);
                   fireTimer.addEventListener(TimerEvent.TIMER, fireTimerHandler, false, 0, true);
                   addEventListener(KeyboardEvent.KEY_DOWN, loop, false, 0, true);
              public function moveABit(xDistance:Number, yDistance:Number):void
                   var baseSpeed:Number = 3;
                   x += xDistance;
                   y += yDistance;
              public function loop(keyboardEvent:KeyboardEvent) : void
                   if (keyboardEvent.keycode == Keyboard.SPACE)// this line gives me new error
                             fireBullet();

  • How to fix a Syntax Error?

    I have a problem with my MXML Application. I keep getting an error: 1084: Syntax error: expecting rightparen before rightbrace, But I don't know what that means. Here's my MXML,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        backgroundColor="#FFFFFF"
        backgroundAlpha="0" width="1050" height="1000">
        <mx:Text width="964" height="497" enabled="true" fontSize="15">
            <mx:text>For right now, Changer098.com is still under construction and is progressing. However the change from Adobe Dreamweaver to Adobe Flex has left Changer098.com with new difficulties. Such as; the longing bearing task for loading the page as you have experienced. Also, Flex requires Adobe Flash, AIR, and Shochwave to work correctly. So if you are viewing this site and do not have these plugins enabled, please enable them for designated viewing pleasure.</mx:text>
        </mx:Text>
        <mx:TextInput x="127" y="505" maxChars="30" editable="true" enabled="true"/>
        <mx:Label x="0" y="507" text="Your Email Addresse" enabled="true"/>
        <mx:TextInput x="127" y="535" editable="true" enabled="true" maxChars="30"/>
        <mx:Label x="0" y="537" text="Your Username" width="119"/>
        <mx:TextInput x="0" y="565" editable="true" enabled="true" maxChars="500" width="287" height="140"/>
        <mx:CheckBox x="0" y="713" label="By clicking this you agree to the terms and conditions" selected="false" enabled="true"/>
        <mx:Button x="10" y="743" label="Terms And Conditions">
            <mx:click>navigateToURL(new URLRequest('http://changer098.webs.com/tac.html'), '_blank')</mx:click>
        </mx:Button>
        <mx:Button x="0" y="773" label="Send" id="send">
            <mx:click>(navigateToURL(new URLRequest('mailto:[email protected]') , navigateToURL(new URLRequest('http://changer098.webs.com/sent.html'), '_blank')</mx:click>
        </mx:Button>
        <mx:Label x="0" y="803" text="Do Not Send Unless You Agree To Terms And Conditions" fontSize="15" textDecoration="underline" fontWeight="bold"/>
    </mx:Application>
    It says there is an error at line: 18. Can anyone help me?

    the clickhandler function is an Actionscript function. Its not mxml.
    You have to wrap it inside a mx:Script.
    for example
    <mx:Script>
    <![CDATA[
         private function clickHandler():void
         navigateToURL(new URLRequest('mailto:[email protected]'));
         navigateToURL(new URLRequest('http://changer098.webs.com/sent.html'), '_blank')
    ]]>
    </mx:Script>
    In general, whenever you want to write Actionscript in your project you use the mx:Script tag.

  • Drag and drop to target simple errors, expecting identifier?

    im creating a drag and drop. moving a guitarest name to a target e.g draging a movieclip called slash to a dynamic text box called box_slash this is my code and i get 2 stupid errors but have been up all night and cant figure it out!
    flash cs5 actionscript 3, is this code for actionscript3 i found the base for it here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be incredible as it for an assignment and im new to flash
    var hits = 0;
    // Register mouse event functions
    slash.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    slash.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    clapton.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    clapton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    hendrix.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    hendix.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler(evt:MouseEvent):void {
              var object = evt.target;
              // we should limit dragging to the area inside the canvas
              object.startDrag();
    function mouseUpHandler(evt:MouseEvent):void {
              var obj = evt.target;
              // obj.dropTarget will give us the reference to the shape of
              // the object over which we dropped the circle.
              var target = obj.dropTarget;
              // If the target object exists the we ask the test_match function
              // to compare moved obj and target where it was dropped.
              if (target != null)
                        test_match(target, obj);
              obj.stopDrag();
    function test_match(target,obj) {
              // test if either one of the four pairs match
              if ( (target == box_slash && obj == slash) ||
                 (target == box_clapton && obj == clapton) ||
                   (target == box_hendrix && obj == hendrix) || )
                        // we got a hit
                        hits = hits+1;
                        textField.text = "Correct! :)";
                        // make the object transparent
                        obj.alpha = 0.5;
                        // kill its event listeners - object can't be moved anymore
                        obj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
                        obj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
                        // Test if we are done
                        if (hits == 3)
                                  textField.text = "Well Done";
              else
                        textField.text = "wrong! :(";
    the errors are: i have highlighted the lines
    Scene 1, Layer 'Actions', Frame 1, Line 39
    1084: Syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', Frame 1, Line 38
    1084: Syntax error: expecting identifier before rightparen.

    Thankyou very much that does get rid of that error now i get
    Scene 1, Layer 'Actions', Frame 1, Line 42
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 51
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 56
    1120: Access of undefined property textField.
    now im sure this is simple but im as im sure you have figured out im a complete noob to flash
    textField.text = "Correct! :)";
      textField.text = "Well Done";
    textField.text = "wrong! :(";
    is this something to do with an instance name?

  • Strange font embed error only on my comp.

    I embeded a font into my css file. However, the main.mxml
    page is showing several errors.
    1084:Syntax error: expecting rightparen before s.
    1093: Syntax error.
    1094:A string literal must be terminated before the line
    break
    I sent to code to my cousin and he got it to work on his 2.01
    builder without any modifications to the code i sent.
    I emailed to code to my house and tried it on my house
    computer with builder 2.01 and still had no problems.
    The issue seems to be with my office computer. How can this
    be happening.
    I un-installed, re-installed, got the latest java etc...
    To further diagnose the problem, i copied the inline embed
    font code from adobe quick example. Same error.
    I used this code directly from the adobe site.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="horizontal"
    horizontalAlign="center"
    verticalAlign="center"
    viewSourceURL="src/EmbeddingFonts/index.html"
    >
    <mx:Style>
    @font-face
    font-family: Copacetix;
    src: url("assets/copacetix.ttf");
    unicode-range:
    U+0020-U+0040, /* Punctuation, Numbers */
    U+0041-U+005A, /* Upper-Case A-Z */
    U+005B-U+0060, /* Punctuation and Symbols */
    U+0061-U+007A, /* Lower-Case a-z */
    U+007B-U+007E; /* Punctuation and Symbols */
    .MyTextStyle
    font-family: Copacetix;
    font-size: 24pt;
    </mx:Style>
    <mx:Text styleName="MyTextStyle" text="Embedded fonts
    rock!" width="100%"/>
    </mx:Application>
    What could it be on my computer that is causing this. Any
    help would be greatly appreciated.

    I am getting the exact same error. I just switched from a PC
    to a mac, copied over the files, and now I get this compiler error
    when I try to embed a font.
    Code:
    @font-face
    src:url("Frutiger-Roman.ttf");
    fontFamily: myFrutiger;
    flashType: true;
    Error:
    Severity and Description Path Resource Location Creation Time
    Id
    Syntax error: expecting rightbracket before private.
    [Generated code (use -keep to save): Path: main-generated.as, Line:
    3162, Column: 2] LogoMaker2SVN-ReCompile Unknown 1182967045208 1832
    1093: Syntax error. LogoMaker2SVN-ReCompile main.mxml line 3
    1182967045204 1831
    1084: Syntax error: expecting rightparen before s.
    LogoMaker2SVN-ReCompile main.mxml line 3 1182967045202 1830
    I really, really need this to be fixed, if you have had this
    before, please post!

  • IPOD ERROR ONLY ON MY COMP

    Everytime I plug my ipod in to view my songs on itunes, an error comes up saying, "ITUNES cannot read the contents of the ipod," NAME ".
    When i plugged my ipod into my friends computer he did not receive any error from itunes saying that.
    What cna i do to fix this?

    I am getting the exact same error. I just switched from a PC
    to a mac, copied over the files, and now I get this compiler error
    when I try to embed a font.
    Code:
    @font-face
    src:url("Frutiger-Roman.ttf");
    fontFamily: myFrutiger;
    flashType: true;
    Error:
    Severity and Description Path Resource Location Creation Time
    Id
    Syntax error: expecting rightbracket before private.
    [Generated code (use -keep to save): Path: main-generated.as, Line:
    3162, Column: 2] LogoMaker2SVN-ReCompile Unknown 1182967045208 1832
    1093: Syntax error. LogoMaker2SVN-ReCompile main.mxml line 3
    1182967045204 1831
    1084: Syntax error: expecting rightparen before s.
    LogoMaker2SVN-ReCompile main.mxml line 3 1182967045202 1830
    I really, really need this to be fixed, if you have had this
    before, please post!

  • XML syntax error 1084

    Hi,
    this is my first post on the forum and I'm a new to Flash.
    I got an error which I can't seem to figure out on my own what is the problem, I've read through some of the 1084 errors but still couldn't figure it out
    I got "1084: Syntax error: expecting rightparen before colon" on this line: myXML = new XML(e:target.data);
    And here is the whole code:
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE,onLoaded);
    var myXML:XML;          // Variable to hold XML class
    function onLoaded (e:Event):void{
    myXML = new XML(e:target.data);
    loader.load(new URLRequest("names.xml"));
    trace(myXML);
    Thanks in advance
    Regards Sakujin

    I've discovered the error after I got help from a friend the culprit was a colon instead of a punctation after XML(e.target.data); instead of XML(e:target.data)
    Thanks for everyone that has visited my post.

  • 1084 Syntax errors. Very basic.

    I am very new to flash and I have some very basic code that I need help with.
    Here;
    var paddlepos:int = paddle.x.position
    if; (paddlepos > 253)
        paddle.x.postition = 253;
    The errors are:
    Scene 1, Layer 'Actions', Frame 1, Line 28    1084: Syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', Frame 1, Line 27    1084: Syntax error: expecting leftparen before semicolon.
    Help would be very helpful. Thanks.

    there should be no semi-colon after if.

  • AS3 syntax errors - need assistance

    I am trying to code for a flash MP3 player in AS3 and My code
    is producing the following errors in the output window.
    the errors are:
    1084: Syntax error: expecting rightparen before _.
    1086: Syntax error: expecting semicolon before rightparen.
    and the code is attached. Can anyone assist with resolving
    these syntax issues?

    You cannot split a line of code using the underscore.
    Simply press return and continue the code on the next line.
    var musicPiece:Sound = new Sound(new URLRequest
    http://blog.0tutor.com/JeffWofford_Trouble.mp3"));

Maybe you are looking for

  • Multiple MIDI takes on the same track - can only find one in the editor?

    After making several passes on an instrument track w/drum sampler on it I opened the piano roll editor to edit the data only to find only one of the passes represented there. I could only find the other passes when I moved the current one out of the

  • How to upgrage report files from VS2005 to VS 2010

    Hi all, we have some VS 2005 report files( 10.2 ) which need to be edited by VS 2010. The code files behind seem to have different formats. How to convert a old report file to its new format? thanks, Clara 

  • Weird conky behaviour after update.

    Yesterday I -Syu'ed and it updated a lot of thing due to openssl rebuild. Now, conky behaves weirdly. I cannot monitor network up/down speed, gmail and weather scripts don't work either. What's even more strange is that there are no errors. It just d

  • Is it Possible develop plugin only in release version?

    I am new to development, I find difficult to test my code with the release version alone. Is it necessary to obtain the debug version, so as to test my code. Or release version of Indesign is more than enough? I came to know the any ASN membership wi

  • 13" MacBook Air and ArchLinux

    Hi ! I plan to get a 13" MacBook Air (the 6.2) and install ArchLinux on it and my main OS. I have no use for OSX so I won't keep it. Is anyone here doing that ? How is it running ?