Skip to main content
Participant
Apr 13, 2006 5:34 PM UTC
Question

Dynamic scrollbars

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!

4 replies

interactiv HTML5 Canvas
Participating Frequently
Feb 17, 2025 7:02 AM UTC

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.

Translate
kglad
Community Expert
Community Expert
Feb 17, 2025 1:59 PM UTC

@interactiv HTML5 Canvas 

 

this thread is 9 years old.

Translate
babo_ya
Inspiring
Apr 13, 2006 5:53 PM UTC
This is weird, it is 32kb but, it's empty, no AS, no library items..
Translate
biiinAuthor
Participant
Apr 16, 2006 9:05 AM UTC
agree, uploaded a new one, pls try again.
Translate