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!!!

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 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);

  • 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 rightbrace before end of program.

    So I'm doing this basic coding thing to make an object "shoot" bullets. It's from a tutorial video. My code matches his exactly unless I'm missing a tiny detail. Basically the code looks like this:
    package {
    import flash.display.Sprite;
    import flash.events.Event; 
    public class bullet extends Sprite {
    private var sw:Number;
    private var sh:Number;
    private const _SPEED:int=-10;
    private const _OFFSTAGE:int=-10; 
    public function bullet():void {
    addEventListener(Event.ADDED_TO_STAGE,onadd);
    private function onadd(e:Event):void {
    sw=stage.stageWidth;
    sh=stage.stageHeight;
    addEventListener(Event.ENTER_FRAME,loop);
    private function loop(e:Event):void {
    if (y<_OFFSTAGE) {
    removeEventListener(Event.ENTER_FRAME,loop);
    parent.removeChild(this);
    y-=_SPEED;
    }public function removeListeners():void {
    removeEventListener(Event.ENTER_FRAME,loop); 
    And the compiler error I'm getting says this:
    Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
    Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
    And yes it does say it twice. What's going on?
    The vid I'm learning from is this: http://autocad.spinelink.com/adobe-flash-cs4-game-tutorial-shooting.html

    You are missing two closing curly braces at the bottom of the package declaration. You need to close the package itself and the class declaration inside.
    package {
         import flash.display.Sprite;
         import flash.events.Event;
         public class bullet extends Sprite {
              private var sw:Number;
              private var sh:Number;
              private const _SPEED:int=-10;
              private const _OFFSTAGE:int=-10;
              public function bullet():void {
                   addEventListener(Event.ADDED_TO_STAGE,onadd);
              private function onadd(e:Event):void {
                   sw=stage.stageWidth;
                   sh=stage.stageHeight;
                   addEventListener(Event.ENTER_FRAME,loop);
              private function loop(e:Event):void {
                   if (y<_OFFSTAGE) {
                        removeEventListener(Event.ENTER_FRAME,loop);
                        parent.removeChild(this);
                   y-=_SPEED;
              public function removeListeners():void {
                   removeEventListener(Event.ENTER_FRAME,loop);

  • 1084: Syntax error: expecting colon before assign.

    Hi
    I am getting "1084: Syntax error: expecting colon before assign." in flash builder 4.6. My application was working fine before a day but When today i try to install app on device then automatic this error comes.
    Please update me when is the problem in my project.
    I am trying to build Flex mobile project by using Flash builder 4.6.
    Thanks
    Brij Kishor

    Well, start with this:
    [Bindable]
    public var gaugeValue:uint = UIUtils.sum(collector_Array, fld:String="rate");
    But, I have no idea what UIUtils.sum does, but you are probably shouldn't be passing in fld:String="rate", it it asks for a String, just pass in rate or the variable fld.
    i.e.
    [Bindable]
    public var gaugeValue:uint = UIUtils.sum(collector_Array, fld);

  • Line 26 1084:  Syntax Error:  expecting rightbrace before end of program

    Im trying to do an animation, how do I solve Line 26 1084:  Syntax Error:  expecting rightbrace before end of program?
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var enemy:Enemy;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    enemy = new Enemy();
                    addChild( enemy );
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, moveEnemy );
                    gameTimer.start();
            public function moveEnemy( timerEvent:TimerEvent ):void
               enemy.moveDownABit();

    I have taken your advice but now 2 errors have popped up. Line 16 1137: Incorrect number of arguments . Expected no more than 0. Line 18 1120 : Access of undefined property enemy.
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var army:Array;
            public var avatar:Avatar;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    army = new Array();
                    var newEnemy = new Enemy( 100, -15 );
                    army.push( newEnemy );
                    addChild( enemy );
                    avatar = new Avatar();
                    addChild( avatar );
                    avatar.x = mouseX;
                    avatar.y = mouseY;
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, onTick );
                    gameTimer.start();
            public function onTick( timerEvent:TimerEvent ):void
                avatar.x = mouseX;
                avatar.y = mouseY;
                for each ( var enemy:Enemy in army )
                         enemy.moveDownABit();
                         if ( avatar.hitTestObject( enemy ) )
                                    gameTimer.stop();

  • 1084: Syntax error: expecting leftbrace before extend

    Hi all.  Not sure what is going on here.  I'm trying to improve my knowledge of AS 3.0.  I keep getting this error and this is a snippet of code that I copied and ran it.  I keep getting the same error '1084: Syntax error: expecting leftbrace before extend'.  Can anyone tell me where I'm going wrong?  Here is the code.
    package
              import flash.display.MovieClip;
              public class ActionScriptTest extend MovieClip {
                   public function ActionScriptTest(){
                                  init();
       private function init():void{
                             var bookTitle:String="Foundations";
            trace(bookTitle);

    Thanks Ned.  That was it.  Thanks for getting me unstuck. 

  • Getting error... 1084: Syntax error: expecting leftperan before colon?

    I am trying to learn flash and make forms with them.
    I keep getting this error... 1084: Syntax error: expecting leftperan before colon
    here is my code
    function sent:(e:Event):void
    why am I getting this error?

    oh... silly me.
    Its fixed...
    function sent(e:Event):void
    Sorry

  • 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.

  • Scene 1, Layer 'Actions', Frame 1, Line 27     1084: Syntax error: expecting rightbrace before _01_010.

    I need help with this code PLEASE!!!!
    Stop_btn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo_3);
    function fl_ClickToPauseVideo_3(event:MouseEvent):void
        assets/01_01_010.fla.pause();
    Play_Btn.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo_3);
    function fl_ClickToPlayVideo_3(event:MouseEvent):void
        assets/01_01_010.fla.play();
    Restart_btn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo);
    function fl_ClickToPauseVideo(event:MouseEvent):void
            assets/01_01_010.fla.seek(0);
    Tranz_Btn.addEventListener(MouseEvent.CLICK, fl_ClickToPosition_3);
    var fl_TF_3:TextField;
    var fl_TextToDisplay_3:String = "FEMA’s mission is to support our citizens and first responders to ensure that as a nation we work together to build, sustain, and improve our capability to prepare for, protect against, respond to, recover from, and mitigate all hazards.
    FEMA Hazard Mitigation efforts to reduce the risks associated with potential hazard events are ongoing. This course focuses on FEMA Hazard Mitigation Joint Field Office operations, which are established after a Major Disaster declaration to focus on mitigating the effects of future hazards in the state affected by the disaster..";
    function fl_ClickToPosition_3(event:MouseEvent):void
        fl_TF_3 = new TextField();
        fl_TF_3.autoSize = TextFieldAutoSize.LEFT;
        fl_TF_3.background = true;
        fl_TF_3.border = true;
        fl_TF_3.x = 200;
        fl_TF_3.y = 100;
        fl_TF_3.text = fl_TextToDisplay_3;
        addChild(fl_TF_3);

    every line with a forward slash has a problem.
    1.  any file paths/names should be in quotes.
    2.  i can't think of any reason you would reference an fla in actionscript
    3.  you certainly could not apply actionscript methods like play(),pause() and seek() to a fla.
    bottomline:  you almost certainly have incorrect references to what appears to be an flvplayback component instance.

  • 1084: Syntax error: expecting identifie before delete

    hi,
    anyone please help me out of this error. i have paste my code below. where i'm getting error.
    package delete
        import flash.display.*;
        dynamic public class png extends BitmapData
            public function png(param1:int = 32, param2:int = 32)
                super(param1, param2);
                return;
            }// end function
    i'm very thankful to you guys.

    package delete
    Isn't "delete" a reserved word in ActionScript?
    Delete is mentioned in the error message so try renaming the package.

  • 1084: Syntax error: Expecting rightbrace before toFixed(1)

    So I've been stuck on this one code for a couple days now because it's asking me to add another right brace before a line, but I have everything properly closed off:
    btnDebtBurdens.addEventListener(MouseEvent.CLICK, displayDebtBurdens);
    function displayDebtBurdens(e:MouseEvent):void
      var lbluint1:uint;
      var lbluint2:uint;
      var lbluint3:uint;
      var lbluint4:uint;
      2007 = 481.5;
      2008 = 481.5 * 1.03;
      2009 = 481.5 * 1.03 * 1.03;
      2010 = 481.5 * 1.03 * 1.03 * 1.03;
      lbluint1.text = 2007.toFixed(1);
      lbluint2.text = 2008.toFixed(1);
      lbluint3.text = 2009.toString();
      lbluint4.text = 2010.toString();
    It's asking me to put it before toFixed in lbluint1.text = 2007.toFixed(1) and even when I do put one there it then goes to say that I have extra characters at the end of the program. When I go to get rid of the other brace, it still says there' s too many characters.

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

  • 1084: Syntax error: expecting rightbrace before end of program. Please Advise

    Hi There,
    I am trying to create a page flipping motion in flash but I keep getting the above error. This is my first real attempt at anything in flash and I really dont know what I've done wrong. Could you please advise me and reply with the corrected code?
    Many thanks
    import fl.transitions.Tween;
    import fl.transitions.easing.Strong;
    import fl.transitions.TweenEvent;
    con.sidea.flip.addEventListener (MouseEvent.CLICK, onflip);
    con.sideb.flip.addEventListener (MouseEvent.CLICK, onflip);
    addEventListener ( Event.ENTER_FRAME, loop);
    var isStill:Boolean=true;
    var arraytween:Array = new Array();
    function onflip (e:Event) {
    if (isStill) {
    arraytween.push(newTween(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);
    con.scaleX=-1;
    } else {
    con.addChild (con.sidea);
    con.scaleX=1;
    if (con.rotationY>=360) {
    con.rotationY=0;

    Dinky624-
    You need to add } at the bottom of your script your function "loop" needs it.
    Sean

  • 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

Maybe you are looking for

  • Workflow Approbation - Accessing and Editing Approve/Reject state

    Hello I'm creating a custom workflow in order to manage mass approbations. I have used the Approval and Multi Approval workflows to make my own one. This work great except on one point: I can't use the standard approbation/reject buttons of the end u

  • Safari is running very slow

    Safari is running very slow in OS X mavericks. Our network is using proxy authentication. Earlier we do not have any problem with safari. Please let us know how to fix the bug.

  • Intermittent internet/communication outages

         I've been struggling with an issue with my internet connection for years, and I cannot find a solution or even a probable cause for the life of me. Any ideas or suggestions would be appreciated greatly.      I have a modem connected to my Time C

  • HELP! I attempted to erase free space and now I can't open any files!

    Hi everyone! I hope you can help me with my problem. Last night, I attempted to erase free space from my HD using disk utility. During the operation, the computer hung, so it wasn't able to complete 'creating temporary file' operation. So i had to st

  • PER_TIME_PERIODS and 27 pay periods

    I have an interesting issue... In 2013 - there should be 27 Bi-weekly pay periods.  This occurs every 40 years.  The per_time_periods table has the last pay in 2013 as the first pay in 2014.  Therefore 2014 has 27 pays. Any idea on how to fix  this?