Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-05-2007, 06:03 PM   #1
stevevoot
Registered User
 
Join Date: Apr 2007
Posts: 6
Default Scroll bar problems

I have a non-button scroll bar. When I publish the SWF, it works perfectly! I have a main file(index.swf) that 800x600, that contains the majority of the website, such as the navigation and background, and each button loads the seperate pages inside that main movie. Each page is 745x362 and they load via loader clip. However, when I click on the 1st button to load the 1st page, it comes up, but the scroll bar no longer scrolls, it just looks like a flat image with nothing happening...Does anyone have any clue why it won't work using my main movie? I tried to put the ambiguous movie clip that contains the script for the bar thats actually on the swf, in the main movie, and that didnt work...but i need help real bad!
stevevoot is offline   Reply With Quote
Old 04-05-2007, 07:10 PM   #2
tcox
Registered User
 
Join Date: Jul 2006
Posts: 368
Default

Need more info or some code.
tcox is offline   Reply With Quote
Old 04-05-2007, 07:26 PM   #3
stevevoot
Registered User
 
Join Date: Apr 2007
Posts: 6
Default

okay no problem...
on the main movie (index.swf), each button contains this code:

on (release) {
_root.theLoader_mc1.loadClip("mlb.swf", "theClip_mc");
}

whereas the empty movie clip "theClip_mc" is on the stage where the pages are being loaded. Think of it as a scoreboard, where the main screen is where the pages are loading.

The coding for the layer containing the clip is:

theLoader_mc1 = new MovieClipLoader();

Now for the scroll bar on the mlb.swf...

I have 3 layers, a Outline, a Mask and a Masked....whats scrolling is on the Masked and the mask is just a rectangle, the outline is just the outline of that rectangle. On another layer, I have an empty movie clip called actions. I double click on it, and theres Frame 1 and Frame 2-

On frame two:

gotoAndPlay(1)

on frame one(this is the real long code for what the scroll is going to be doing):

//setting the variables for the script;
_root.scrollerName = _root.scroll;
_root.left = 352.9;
_root.innerLeft = 425.9;
_root.right = 616;
_root.innerRight = 543;
_root.top = 229.7;
_root.bottom = 304.6;
_root.minXposition = -790;
_root.maxXposition = 369.9;
_root.idleScrollSpeed = 1;
_root.overScrollSpeed = 10;
//if the scroller has gone to the end, switch directions;
if (_root.scrollerName._x<_root.minXposition) {
_root.scrollerDirection = "right";
} else if (_root.scrollerName._x>_root.maxXposition) {
_root.scrollerDirection = "left";
}
if (_root._ymouse<_root.bottom && _root._ymouse>_root.top) {
//checking to see if the mouse is in the left area, if so, continue;
if (_root._xmouse>_root.left && _root._xmouse<_root.innerLeft) {
if (_root.scrollerName._x>_root.maxXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x+_root.overScrollSpeed;
}
} else if (_root._xmouse>_root.innerRight && _root._xmouse<_root.right) {
if (_root.scrollerName._x<_root.minXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x-_root.overScrollSpeed;
}
} else if (_root._xmouse<_root.left or _root._xmouse>_root.right) {
if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x+_root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x-_root.idleScrollSpeed;
}
}
} else if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x+_root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x-_root.idleScrollSpeed;
}

Then back on the main scene, theres one last bit of coding to go on the action movie clip and that reads:

on (load) {
_root.scrollerDirection = "left";
}

So that is that....It works when I publish that swf seperately...but doesn't when i click the MLB button on the index....

Here is the example of the scroll bar swf by itself if that helps too:
http://sportsnutsonline.com/mlb.html
if u click on the 1st team, the scroll bar will appear

If you need any more info, let me know...hope this helped u help me get an answer
stevevoot is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Scroll Bar for Movie/ Easy merging of All Scenes into One? Caster543 Animation and Effects 0 04-04-2007 04:18 AM
Scroll bar in IE not working... papu123 ActionScript 2.0 2 03-27-2007 10:14 AM
scroll bar won't drag when movie is loaded into main movie! gratnells ActionScript 2.0 2 03-16-2007 02:16 PM
scroll bar text problem sarvel ActionScript 2.0 0 02-04-2007 04:10 AM
scroll problems metroidiot ActionScript 2.0 0 07-23-2004 02:07 PM


All times are GMT. The time now is 01:49 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.