Results 1 to 7 of 7

Thread: [Flash] Moving an object [Resolved]

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Resolved [Flash] Moving an object [Resolved]

    I've created a MovieClip object with the instance name MC1. In the frame I place it in, I've also got two buttons, one pointing up and one pointing down.

    What ActionScript do I need to make MC1 move up and down?

    You can imagine this to be just like the scrolling textareas you may have seen in several flash applications.
    Last edited by mendhak; Nov 8th, 2004 at 07:41 AM.

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Changing the value of MC1._y will do the trick!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Hmm... I will try this tomorrow, first thing.

    Their documentation isn't very intuitive, btw. Am I missing some sort of a reference or resource? Any websites you flashers (ha!) use?

  4. #4

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Oh, what about setting limits? I wouldn't want _y to increase or decrease beyond a certain value. I don't suppose there are If statements in ActionScript.


  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    There are
    if{
    etc.
    }

    Also, in Flash MX (2004) the actionscripting is much more powerfull (autocomplete etc).
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    ActionScript 2.0 has many features that Java has. You have if statements, objects, functions, ect.. All sorts of good stuff.

    If you don't want it to increase beyond a certain amount, just use an if statement to check the current y and see if that is your limit. It might move quite fast, though; if you just have it go up through scripting alone and not frame by frame unless you add in a delay but I'm not sure of your exact situation.

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Jop, kas, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width