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 6193285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:05:31+00:00 2026-05-24T03:05:31+00:00

I have some class that I created visually in Flash Professional CS5 by transferring

  • 0

I have some class that I created visually in Flash Professional CS5 by transferring drawn result into a MovieClip and extorting symbol into AS code. Now, I want to add some properties to the class. To be more specific, I’ve created Ball class and want to add to it variables that will represent vertical and horizontal speeds. How can I edit the class in order to do it? Also, when I wanted to add some visible external element to the class, at first I decided to add MovieClip property in the code itself, but then recalled method .addChild() that worked perfectly for me. Now, I can’t do the same with non-visible properties. So, what is the difference between adding visible elements using .addChild() and adding them in the code itself? And HOW can I actually add anything in the code itself?

  • 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-05-24T03:05:31+00:00Added an answer on May 24, 2026 at 3:05 am

    You should probably avoid mixing physics with the actual visual representation. Try making a ball class which holds the velocityX, velocityY and a reference to your MovieClip. Make the Ball class hold an update(), which might look something like this:

    public function update() : void {
        ballMovieClip.x += velocityX;
        ballMovieClip.y += velocityY;
    }
    

    In your Main class you can use the Event.ENTER_FRAME-event to call ball.update();

    This way you can independently update you Ball graphics and the physics code.

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

Sidebar

Related Questions

I have some class that I'm passing as a result of a service method,
I have some C# class libraries, that were designed without taking into account things
Im creating a game in Flash and I have a class that have some
I have a custom thread pool class, that creates some threads that each wait
the basic idea is that you have some class that has a reference type
I have some event handler on a boundary class that manages a persistence mechanism
Let's say you have some 3rd-party library class that you want to extend, simply
Suppose I have a class that processes some data: class SomeClass { public: void
I'm building a class library that will have some public & private methods. I
I have a simple Java class that has some methods: public class Utils {

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.