Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

need a way to run y with ui scrollpane while scrolled down or figure out the y of the scroll pane

Community Beginner ,
Dec 02, 2018 Dec 02, 2018

basically I am moving an object out of the scroll pane and to a new parent myblank3all but if I am scrolled down the re-parent no longer holds the same y so when I drag the object out of the scroll pane its y is different and gets further off as I go down.   When I scroll down and stop every object in the scrollpane is the same distance off.  so I think if I could get the value of the top y or bottom y of the scrollpane but it has to be relative to the scrollpanes symbol that it holds then I could figure it out

function fl_drag(event: MouseEvent): void {

myblank3all = new MovieClip()

myblank3all.addChild(event.currentTarget.parent)

myblank3all.y = myblank3all.y + some number

myblank3all.startDrag()

}

356
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 02, 2018 Dec 02, 2018

you can use the verticalScrollPosition to get the y of the object in the scrollpane but you probably just want to reposition at about the same y as the scrollpane, don't you?

or, even better, use the mouseY.

Translate
Community Expert ,
Dec 02, 2018 Dec 02, 2018

you can use the verticalScrollPosition to get the y of the object in the scrollpane but you probably just want to reposition at about the same y as the scrollpane, don't you?

or, even better, use the mouseY.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2018 Dec 02, 2018

I was working with mouseY it didn't seem to help but yea I want re-positioned to stay in the same spot.  I will play around more with all your suggestions and see if I can figure it out. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2018 Dec 02, 2018

thank you very much verticalScrollPostion worked perfect  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2018 Dec 02, 2018
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines