Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8835941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:22:40+00:00 2026-06-14T09:22:40+00:00

hi, I am trying to create a game on Flash CS3 Action Script and

  • 0

hi, I am trying to create a game on Flash CS3 Action Script and keep getting error on line 13-15 saying that A conflict exists with definition _bounces in namespace internal, A conflict exists with definition _highscore in namespace internal, and A conflict exists with definition _ball in namespace internal??? and help please

package
{
    import flash.display.MovieClip
    import flash.text.TextField
    import flash.events.Event
    import flash.events.MouseEvent

    public class DocumentMain extends MovieClip
    {
        public const Gravity:Number = 2;
        public const Bounce_Factor:Number = 0.8;

        public var _bounces:TextField;
        public var _highscore:TextField;
        public var _ball:Ball;

        public var _vx:Number;
        public var _vy:Number;


        public function DocumentMain():void
        {
            _vx = 0;
            _vy = 0;
            addEventListener(Event.ENTER_FRAME, enterFrameHandler);
            addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
        }

        private function enterFrameHandler(e:Event):void
        {
            //gravitate the ball
            _vy += Gravity;
            //move the ball
            _ball.x += _vx;
            _ball.y += _vy;
            //check stage boundaries for collision
            checkBoundaryCollision();
        }
        private function mouseDownHandler(e:MouseEvent):void
        {
            //Hit the ball if it has been clicked
        }

        private function checkBoundaryCollision():void
        {
            var left:Number;
            var right:Number;
            var bottom:Number;
            var Top:Number;
            left = _ball.x -(_ball.width / 2);
            right = _ball.x +(_ball.width / 2);
            bottom = _ball.y +(_ball.height / 2);
            top = _ball.y + (_ball.height / 2);

            if (left < 0 && _vx < 0)
            {
                _ball.x = _ball.width/2;
                _vx *= -1;
            }
            else if (right > stage.stageWidth && _vx > 0)
            {
                _ball.x = stage.stageWidth -(_ball.width /2);
                _vx *= -1;
            }
            if (top < 0 && _vy < 0)
            {
                _ball.y = _ball.height / 2;
                _vy *= -1;
                }
            else if (bottom > stage.stageHeight && _vy > 0)
            {
                _ball.y =stage.stageHeight -(_ball.height / 2);
                _vy *=Bounce_Factor;
            }

        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:22:41+00:00Added an answer on June 14, 2026 at 9:22 am

    Go to “Advanced ActionScript 3.0 Settings” – I’m using CS5.5 and don’t have CS3 (but it should be same) via File -> Publish Settings -> ActionScript Settings and there uncheck the “Automatically declare stage instances” (this is default setting)

    or do not define them in the class.

    Detailed description of Error 1151 and resolution

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new in games development, am trying to create a simple game in flash-cs5.
I'm trying to create a sudoku game, for those that do not know what
I am trying to create a very basic flash game, using Tom Krcha's P2P
I'm trying to create an SDL game with Visual Studio 2010, but I'm getting
I am trying to create a form that creates a game and game_players at
I am creating a side scrolling game in Flash (as3) and trying to keep
I trying to create a preloader for a game in Flash CS6. I've already
I'm trying to create a air-hockey game, in flash using AS3. At the moment,
I'm trying to create a game that involves the computer typing to you. I'm
I am trying to create a Game so that I can change its data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.