A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: changing the position of an instance on stage

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    23
    Can anybody please tell me how can i change the position of a moive clip instance on stage using action script.

    thanks

    Graham

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Posts
    2
    hey graham,

    you can use setproperty :

    setproperty ("symbolname",_x,21)
    The symbol name is what it says it is
    the _x is the property so it can be _x or _y or many other properties

    the 21 is the value in this case the symbolname is set to x = 21

    so you can say

    setproperty("graham",_y,22)
    setproperty("graham",_x,99)
    this will take you to (99,22)

    better yet is the with

    with (_root.graham) {
    _y = 22;
    _x = 99;

    this goes directly to _root (main timeline) and graham (symbol name) sets x and y as you see . HOpe this helps

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Posts
    190
    search for setProperty or _x in the action script manual.
    It´s simple.

  4. #4
    Junior Member
    Join Date
    May 2001
    Posts
    23

    Smile Thanks!! :-D

    Thanks for the prompt response from both of you. I have put your script into action Krash and it works..


    Thanks again
    Graham

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