Copy link to clipboard
Copied
I have made a scrollBar (Animate CC doesn't support scrollBars in html5 canvas)
The "scroller" (movieClip with an ID of "scroller") object is set up with a "mousedown" and "pressmove" function -
this.scroller.on("mousedown", function (evt) {
this.offset = {x: this.x - evt.stageX, y: this.y - evt.stageY};
});
this.scroller.on("pressmove", function(evt){
//this.y = evt.stageY + this.offset.y;
if ((this.y < 77)&&(this.y > 40)){this.y = evt.stageY + this.offset.y;}
if (this.y >77.1) {this.y = 76};
if (this.y ==77) {this.y = 76};
if (this.y <41) {this.y = 41};
if (this.y ==41) {this.y = 41};
console.log(this.y);
});
So I can click and drag the scroller up and down the side of the area I want to scroll with boundary's set (between 77 and 40 Y values).
Now I want to take the position value of Y from "scroller" and apply that to my movieClip that is the information that I want to scroll "scrollingTextMC" (movieClip with an ID of "scrollingTextMC" )
Any help would be appreciated.
-sam
Copy link to clipboard
Copied
Hi.
I created a complete scroll pane recently for HTML5 Canvas documents.
Please have a look and see if that is what you need.
Regards,
JC
Copy link to clipboard
Copied
Thank you for your help - I have a problem with the fla file that you have on your googleDrive - I can open it in animate, but when I try and run it to see what you did, animate crashes every time.
Copy link to clipboard
Copied
Weird.
It's working for me.
Are you using the 2019 version?
Copy link to clipboard
Copied
Yes, latest version - as soon as I press "control+enter" to preview the file - Animate crashes and I have to restart Animate
Copy link to clipboard
Copied
Is the src folder in the same directory of the FLA?
Copy link to clipboard
Copied
yes it is
Copy link to clipboard
Copied
Here is a demo:
What I can suggest to you is to create a new FLA and copy and paste the assets and code from my files, trying to follow closely my settings.
Regards,
JC
Copy link to clipboard
Copied
I'm on a pretty good track I think for solving my issue-
I need a little help getting base driving the y position value from another movieclips y position --
Find more inspiration, events, and resources on the new Adobe Community
Explore Now