dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: move a MC

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Location
    indianapolis
    Posts
    144

    move a MC

    i want a movie clip to move to a certain X,Y postion when a button is click - what would the action script be for that to happen - it dows not need to animate - but can just change its position.

    thanks in advance!

  2. #2
    Junior Member
    Join Date
    Aug 2008
    Posts
    23
    So if you just want the movie clipie to move from one place to another with out animations.. Here's a simple code

    Code:
    on(release){
    this._x = -50; 
    this._y = -50; 
    }
    The thing with the "-50" is the location where it will go in the x and y axis. There for it is measured in pixels. Change -50 to your pixel coordinate or something like that.

    Good Lucks!

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Location
    indianapolis
    Posts
    144
    does that move the movie clip that is clicked - what if there are 3 differnt MCs that i want to move? with one btn click? htey all have diff instance names.

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    Okay for that, I could help out
    the button code is to make 3 movieclips to move is...
    Code:
    on(release){
    _root.button1._x = -50;
    _root.button1._y = 50;
    _root.button2._x = -350;
    _root.button2._y = 350;
    _root.button3._x = -150;
    _root.button3._y = 150;
    }
    I think that could help lol I just tried it..

  5. #5
    Junior Member
    Join Date
    Oct 2008
    Posts
    29
    I hope it'll help you out on your flash project

    Good Lucks!

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

HTML5 Development Center