• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Error 1137 with Scrolling... Help?

New Here ,
Nov 01, 2013 Nov 01, 2013

Copy link to clipboard

Copied

Okay, so the thing tells me that I have Error 1137, that it's expecting no more arguments than 1. I want to get the monster to scroll with the background.

Here's what I've set up for the scrolling under the enter frame handler.

                              var temporaryX:int = background.x;

                              var temporaryY:int = background.y;

                              var scroll_Vx:int = background.x - temporaryX;

                              var scroll_Vy:int = background.y - temporaryY;

Scroll(monster, scroll_Vx, scroll_Vy);

The Green is where the error comes up. I also have a called method for scrolling, which looks like this:

package

{

          import flash.display.Sprite;

          public class Scroll

          {

                    public function Scroll(gameObject:Sprite, scroll_Vx:int, scroll_Vy:int):void

                    {

                              gameObject.x += scroll_Vx;

                              gameObject.y += scroll_Vy;

                    }

          }

}

I just really want some assistance. Anything would be appreciated.

Views

401

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines