Hello I am creating a dynamic text field that can be scrolled.
It is working but only problem is when I drag the sroller or click up or down button the text start srolling but now I want to add a stage event listener to check when the mouse moves up on the stage and that means the user have stoped dragging.
I can implelement stage.addEventListener(MouseEvent.MOUSE_UP, endDrag); fine when I have the code on the main timeline but when I move it into a class and add it there it give me an error saying null object reference
can any one please tell me how to resolve this I am attaching the fla and the class file
Oh man you are a real life saver thank you so much. it is working now. But can you please tell me what wouldn’t it work in the constructor?
Just one more thing if you dont mind at the moment when I click up or down buttons the text scroll but I have to keep clicking them to scroll the text is there a way that when I click and hold down buttons the text keep scrolling down until it finishes.
Sorry just one other thing remember you told me how to perform button clicks by passing reference to the clicked button. that works fine when I click some button but how can I have one button already clicked when the application starts like I want the home button already clicked when my website loads.
I hope I am making sense. Can I just dipatch a click event for home buttons the first time website loads?
because when first time a website starts it loads the home page but in this case I have to click the home button to get the contents. If I load the home contents in the start without clicking the button so it is not disable and the user can click it and the home contents will load again which is not very efficient.