Skip to main content
Participant
April 13, 2006
Question

Dynamic scrollbars

  • April 13, 2006
  • 2 replies
  • 398 views
Hi!
I have created a dynamic scrollbar with the code :

_root.createEmptyMovieClip("textHolderMC",1);
textHolderMC.loadVariables("boende.txt");
textHolderMC.onData = function() {
tf.text = this.boende;
sb.setScrollContent("tf");
};

But now i need an other one on the same page, so i did thise :

_root.createEmptyMovieClip("textHolderMC",1);
textHolderMC.loadVariables("boende.txt");
textHolderMC.onData = function() {
tf.text = this.boende;
sb.setScrollContent("tf");
};
_root.createEmptyMovieClip("accessMC",2);
accessMC.loadVariables("access.txt");
accessMC.onData = function() {
tf2.text = this.access;
sb2.setScrollContent("tf2");
};
But the second one won´t scroll.

any ideas? You can dowload my fla here (test.zip, about 1kb).

Thank you!

2 replies

interactiv HTML5 Canvas
Participating Frequently
February 17, 2025

Hi! 

I supplement your question.

The library is connected here 

<script src="https://zimjs.org/cdn/01/zim_min.js"></script>

I attach Fla here. The task is to make the scrolling work to the nested <MovieClip> r.body.circles

let r = this;
r.stop(); 
// It works well here only with the main upper MovieClip r.body.
const MovieClip = zimify(r.body);
 
// Here I am trying to add the nesting of r.body.circles in MovieClip 
// const MovieClip = zimify(r.body.circles); // It doesn't work.
 
const window = new Window({
width: 300,
height: 300,
content: MovieClip,
scrollBarDrag: true,
damp: .5,
padding: 10
}).center(); 

https://drive.google.com/drive/folders/1yz19RPOvQ6g7BhIqA2cVY6gHqxVSj1ls?usp=sharing

Thank you for any assistance.

kglad
Community Expert
Community Expert
February 17, 2025

@interactiv HTML5 Canvas 

 

this thread is 9 years old.

babo_ya
Inspiring
April 13, 2006
This is weird, it is 32kb but, it's empty, no AS, no library items..
biiinAuthor
Participant
April 16, 2006
agree, uploaded a new one, pls try again.