-
I'm using multiple levels to load the content of a site. The movie in question is loaded into the main movie (at _level10). When the movie is tested or the .swf is run, there are no problems at all, but when the movie is loaded into a level of the main movie, the drag-scrolling feature does not work.
I've narrowed it down to the "hitTest". If I remove that feature, the drag scrolling works, but it also overrides all other features and is unuseable.
The path for this clip is --
_root.scrollbar.barscroll
This is the code--
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
if (drag_ok == 1) {
drag = 1;
startDrag ("", true, 0, 0, 0, _root.scroller.difference);
}
}
}
onClipEvent (mouseUp) {
stopDrag ();
drag = 0;
}
Can anyone help me with this? I always have problems with scripting and levels.
Thanks.
-
If that script goes into a movie on _level10, everywhere it says "_root" it should say "_level10"(except for the mouse coords). The movie will then not work on its own but will work when loaded on _level10.
gparis
-
That didn't work
I switched the _root to _level10 as you suggested, but that didn't fix it.
I am no actionscript expert, but according to the Flash AS and the O'Reilly's AS books, _root applies to the loaded movie and to target the main timeline you have to use _level0....is that incorrect?
I always have AS problems when I load levels, so I'm not confident I've got that right. I do appreciate the help though.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|