
Welcome Guest
|
#1
|
|||
|
|||
|
Scroll function not working in loaded movie
I have a scrolling text box script that works perfectly fine on its own but when its loaded into my main movie the scrollbar wont function.
Here is the action i'm using: Actionscript:
// Define the Scroll Area
top = _root.movMask._y;
bottom = _root.movMask._y+_root.movMask._height-_root.movScroller._height;
left = _root.movMask._x;
right = _root.movMask._x+_root.movMask._width;
// Bring all objects to the Scroll Area
_root.movIn._y = top;
_root.movIn._x = left;
_root.movScroller._y = top;
_root.movScroller._x = right;
// When the Scroller is Dragged
_root.movScroller.onMouseDown = function() {
if (hitTest(_root._xmouse, _root._ymouse)) {
startDrag("_root.movScroller", false, right, top, right, bottom);
}
};
// when the Scroller is Released
_root.movScroller.onMouseUp = function() {
stopDrag();
};
// Update Position every 10 milliseconds
setInterval(Update, 10);
function Update() {
var ratio = (_root.movIn._height-_root.movMask._height)/(_root.movMask._height-_root.movScroller._height);
_root.movIn._y = ((_root.movMask._y-_root.movScroller._y)*ratio)+_root.movMask._y;
}Does this have something to do with the hitTest? Last edited by Scottae : 03-24-2005 at 12:05 AM Reason: Format with AS tags |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| working on external scroll, within main timeline,help | morokof | ActionScript 3.0 |
4 | 09-24-2009 08:15 AM |
| Decompiling haXe | puppy | Members Cafe |
3 | 12-16-2008 10:38 AM |
| preloader for movie with attachSound | FlashGuru | Flash Wishlist and Bugs |
1 | 07-16-2008 05:23 AM |
| URL oF Loaded external swf or .. | armadiaz | Actionscript 2.0 |
4 | 11-28-2006 11:43 AM |
| Movie problems | cdgore | Actionscript 2.0 |
0 | 09-05-2004 07:25 PM |




