A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] How to get XY position on stage, HELP!

  1. #1
    Join Date
    Apr 2008

    [CS3] How to get XY position on stage, HELP!

    Hi, I have a scrolling reel of photo that moves with actionscript,
    there is a box that has info that pertains to individual photos on the reel.

    SO this is what I want to happen,

    I want the info box on top of the photo to change info as different photos pass.

    So here's the logic, but I dont know how to code it:

    if MovieClips' position is equal to a particular x,y coordinate on the stage then
    i'll probably turn on visibility on a specific layer...

    Help pls, I'm pretty sure it is easy just dunno how to do it. Thanks!

  2. #2
    Join Date
    May 2003
    if you want to get position of clip:

    on your clip have this code:

    onEnterFrame = function()
    if(this._x == myXpos && this._y == myYpos) doSomething()

    that being said, you might want to give a range for the position checking as when your clip moves it might not hit the exact position.
    visit my portfolio and sign my guestbook!!

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