Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Working Next Button On Scrollbar?


I have a movie clip scrollbar that scrolls text and images. I'm having a problem and that is that when you scroll the text and images it is so long that it seems that flash can't handle so much information and the last 4 images are all distorted. Because I don't know how to fix this I'm trying to include a next button with an action going to frame 5 but although it does that the scrollbar won't go to the top aqain.

Anyone know
why flash can't handle long scrollbars or
how to make the scrollbar to work so when you hit the next button the scrollbar will have refreshed itself.




FlashKit > Flash Help > Flash ActionScript
Posted on: 01-29-2002, 11:55 AM


View Complete Forum Thread with Replies

Sponsored Links:

Scrollbar Not Working
I'm quite new to Flash creation, not just MX but Flash in general. I've read a lot of tutorials and have worked feverishly for the past week learning and creating and whatnot. Now I'm stuck and can't find anything discussing this. So please bear with me, I'm eager to learn!
I've got a text box that access a remote TXT file for the content, and it works (yay). Problem is, I want to use it with a scrollbar. The scrollbar DOES show up, but it doesn't scroll. Clicking the arrows don't work, and the bar remains grey. I'm using the scrollbar found under the Flash UI Components menu, by the way. The scrollbar does work when I manually type in the text in Flash, though. Just not when using remote text. And yes, I've made sure the text field is "scrollable" in the right click menu.
I'm not so sure I even understand myself here, so I uploaded the file in question. It's at http://www.enriquegarcia.net/text.swf ... and the FLA file is the same, but with .fla.
Also, when the file first uploads I see "_level0.text" before the real text shows up. Is there any way to remove that?

View Replies !    View Related
Scrollbar Not Working
I'm loading text into a dynamic text box from an external text file, when I drop a scroll bar component onto the text field, the text still loads but doesn't scroll. Any ideas???

View Replies !    View Related
Scrollbar Not Working
I need help, I have flash 5 and some problems with a scrollbar with text and image. I have downloaded a tutorial that works on its own, but when it is in another movieclip I get this message:

Target not found: Target="_root.controlmove" Base="_level0.den geologiska tidsskalan.bar"

How shall I do? Does anybody understand my problem?
/David

View Replies !    View Related
Scrollbar Not Working
I am trying to put a scrollbar on a large gif, and it's just not working..I have followed the tutorial, and still I egt a mess on the screen...I see scrollbars, and part of my image, but nothing like a finished product...how EXACTLY do you do it...


I followed THIS tutorial 5 times and still nothing....

http://www.flashkit.com/tutorials/Ge...-757/index.php

help...I have many more to do...!!!!

View Replies !    View Related
Scrollbar Not Working Now
I have made a dynamic text field and added the scroll bar. The dynamic text field pulls in text from a text file. but the scroll bar does not work when I preview the movie? There's just no bar to scroll.

The reason I have done it this way is so that my client can open up the text file and make adjustments to his gigs page - but, as usual, PROBLEMO!!!!

In fact the only hope I have is to send in the files, I'll hope that there's a better brain than mine to sort this out. but the file is too big to send 1 meg, and there is only a text field and a scroll bar in the whole thing - yet another bizzare problem, there's virtually nothing in the library either! My only hope is to give my email and hope some kind soul writes to me there and offers to let me send it to them via email?

lilolcarlos AT aol.com

There's a bag of carrots and a pickled egg for anyone who can.


Thanks again. I'm spending more time on this forum than I should but I just do not understand why it doesn't work.

Thank you.

View Replies !    View Related
[F8] Scrollbar Not Working
I have created a tree menu that reads from an array and i can seem to get the scrollbar to work can any body help.

The scrollbar can be dragged up and down but it does not scroll the menu data

thanks

View Replies !    View Related
Scrollbar Not Working
Newbe here,
I have been hacking my way through a website design using Flash CS3 and Actionscripts 3.0 and have hit a stumbling block.

I have used a instance of the UIScrollbar component attached to the right side of a dynamic text block. Locally it works in IE but when I view the page via Safari or Firefox web browsers my scrollbars do not work. You can see the scrollbar without the slider and use page up/down.

When uploaded IE works about half the time but Safari and Firefox will not activate the slider.

Is there something I need to add to my flash file to make the scrollbar work properly?

If you want to look at what I describing the url is http://www.photoesque.com/index_new.html, just click on the Portraits bubble then testimonials.

Thanks
earl

View Replies !    View Related
[CS3] ScrollBar Not Working
I was wondering if i was missing a step for putting in a scrollbar. I made the textbox and then went to the components bar and dragged the scrollbar over on top of it. I get the bar but when I press ctrl+enter the scroll bar goes side to side instead of up and down. Can some one help me out?

View Replies !    View Related
Scrollbar Not Working Well With XML
Can someone please enlighten me? Has there been some sort of feud between scrollbars and XML, because quite obviously they're not getting along.

I have a text area and I have a scrollbar. If I type into the text area myself the scrollbar functions as I told it to. Yet when I gather all my nodes together from my external XML and try to place it into said text box the scrollbar becomes corrupt and ignores me entirely. If I select the text and move down it scrolls and shows me everything but the scrollbar stays dim and untouched.

I know I've had this problem before. I just don't think I've ever solved it.

View Replies !    View Related
[FMX] Why Isn't My Scrollbar Working?
(I'm new to the forum, so be gentle...)

Two sites, One Problem: No scrollin' goin' on...

(1) http://www.sheatsrepousse.com/main.html - I've loaded the "News & Updates Section with plenty of text (loaded from an external .txt file), but as you can see, it doesn't want to scroll at all! Now keep in mind, prior to the last update, it scrolled just fine. But this time, no dice...

loadText = new loadVars();
loadText.load("news.txt");
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.news;
};

(2) http://www.mtzionnashville.org/menu.htm - This is my church's site of which I've inherited the duties of updating... Upon clicking the "Meet the Bishop" link, you may notice that although the text keeps going, the scroller doesn't show up! However, if you click on the "Meet the Bishop" link again, it shows up just fine. What's the deal?

Let me know what all I need to provide as additional information to get an answer to my question.

View Replies !    View Related
Scrollbar Not Working
Hi everybody,

I'm having problems with a text scroller

There's a main.fla and .as which creates an array for loading swf movies
there is a swf with a text scroller within
when I test the complete site in flash everything works perfect but
when I test the index.html, the content does not scroll, it happens when I test in a browser, I've tried with another text scrollers
I've also published again and again the index but it does not work... I have used this scroller many times before

If anybody knows what could be the problem, please let me know.
I will appreciate it very much!!!

Thanks in advanced

View Replies !    View Related
[FMX] Why Isn't My Scrollbar Working?
(I'm new to the forum, so be gentle...)

Two sites, One Problem: No scrollin' goin' on...

(1) http://www.sheatsrepousse.com/main.html - I've loaded the "News & Updates Section with plenty of text (loaded from an external .txt file), but as you can see, it doesn't want to scroll at all! Now keep in mind, prior to the last update, it scrolled just fine. But this time, no dice...

loadText = new loadVars();
loadText.load("news.txt");
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.news;
};

(2) http://www.mtzionnashville.org/menu.htm - This is my church's site of which I've inherited the duties of updating... Upon clicking the "Meet the Bishop" link, you may notice that although the text keeps going, the scroller doesn't show up! However, if you click on the "Meet the Bishop" link again, it shows up just fine. What's the deal?

Let me know what all I need to provide as additional information to get an answer to my question.

View Replies !    View Related
Can Anyone Get This Scrollbar Working?
Last edited by L-Square : 2008-09-09 at 04:00.
























I am trying to make this scrollbar work. I want the drag bar to drag the text, if u know what i mean.

Ta

View Replies !    View Related
AS Help, My Scrollbar Isn't Working
I am using some code from an older version of Flash (5 I believe) to add a scrollbar to my textbox. All the buttons for up/down work as they should and the scrollbar resizes like it should, but I cannot scroll through the text using the scrollbar. Here is the script I am using...


ActionScript Code:
onClipEvent (load){
 
    this.loadVariables("text/lesson1.txt");
    scrolling = 0;
    frameCounter = 1;
    speedFactor = 3;
    numLines = 7;
    resetOnNewFile = true;
 
    origHeight = scrollbar._height;
    origX = scrollbar._x;
   
    refreshRate = 12;
    refreshCounter = 0;
    refreshlastMaxscroll = 0;
    loaded = false;
 
    function refreshScrollBar(){
   
        daTextBox.scroll = resetOnNewFile ? 1 : Math.min(daTextBox.maxscroll, daTextBox.scroll);
       
        var totalLines = numLines + daTextBox.maxscroll - 1;
        scrollbar._yscale = 100*(numLines)/totalLines;
        deltaHeight = origHeight - scrollbar._height;
        lineHeight = deltaHeight/(daTextBox.maxScroll - 1); 
        scrollbar._y = lineHeight*(daTextBox.scroll - 1);
       
    }
   
    function updateScrollBarPos(){
 
        scrollbar._y = lineHeight*(daTextBox.scroll - 1);
    }
}
 
onClipEvent (enterFrame){
 
    if( loaded ){
   
        if(refreshCounter % refreshRate == 0 && daTextBox.maxscroll != refreshLastMaxScroll){
       
            refreshScrollBar();
            refreshLastMaxScroll = daTextBox.maxscroll;
            refreshCounter = 0;
           
        }
        refreshCounter++;
    }
   
    if( frameCounter % speedFactor == 0){
   
        if( scrolling == "up" && daTextBox.scroll > 1){
            daTextBox.scroll--;
            updateScrollBarPos();
        }
        else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){
            daTextBox.scroll++;
            updateScrollBarPos();
        }
        frameCounter = 0;
    }
    frameCounter++;
}
 
onClipEvent (mouseDown){
 
    if(up.hitTest(_root._xmouse,_root._ymouse)){
        scrolling = "up";
        frameCounter = speedFactor;
        up.gotoAndStop(2);
    }
    if(down.hitTest(_root._xmouse,_root._ymouse)){
        scrolling = "down";
        frameCounter = speedFactor;
        down.gotoAndStop(2);
    }
    if(scrollbar.hitTest(_root._xmouse,_root._ymouse)){
        scrollbar.startDrag(0,origX,deltaHeight,origX);
        scrolling = "scrollbar";
    }
    updateAfterEvent();
}
 
onClipEvent (mouseUp){
 
    scrolling = 0;
    up.gotoAndStop(1);
    down.gotoAndStop(1);
    stopDrag();
 
    updateAfterEvent();
}
 
onClipEvent (mouseMove){
    if(scrolling == "scrollbar"){
        daTextBox.scroll = Math.round((scrollbar._y)/lineHeight + 1);
    }
    updateAfterEvent();
}
 
onClipEvent (data){
    loaded = true;
}


I am guessing that my problem lies in the old code. If someone knows where my problem is and can help me fix it, I would be much obliged.

I would attach my fla if I knew how on this forum. Is it just an external HTML link?

View Replies !    View Related
Scrollbar Component Not Working *sometimes*
Hi all ,

While reviewing my site for changes, I noticed that the scrollbar component that i've included in the site is not working *sometimes* , when I refresh the site and view it again it works.

anyone else come across this thing? can i fix it?

MikeP

View Replies !    View Related
Scrollbar Component Not Working
I have scrollbar components in my main movie _level0 on frame 65 (for instance). I have navigational buttons in a separate .swf on _level5. When I click on the button (on _level5) that takes me to a scrollpane (on _level0), the scrollpane works perfectly.

BUT...

if I click on another button (on _level5) that loads a separate .swf onto _level1, and this takes me to another frame on _level0. When I then unload the .swf from _level1 and go back to the frame on _level0 with the scrollbars, they don't work suddenly. Has anyone else had this problem? I've been doing a lot of trouble shooting and I can't figure it out.

Here's the URL where I'm working on it so you can see the problem. Go to the "About" section first and check out "Clients" or "Recognition" or "Founders" and you can see the scrollbars working. Then open any of the "Poster" sections, go back to the "About" section and check the scrollbars again.

Thank you in advance if anyone can help.

View Replies !    View Related
Scrollbar Component Not Working
Okay i made a text box on my stage... I call it "Sometext" and it's Dynamic Text... I made the box small so that the text is scrollable... I put the Scrollbar from the Flash UI Components box right next to the box and then I put "Sometext" in the target text field of the parameters of the Scrollbar... Once I publish it it doesn't work... That is, the scrollbar is grayed and the up and down buttons don't work and the the dynamic text field looks funky and is only one line...so that i can't scroll it cause the bar doesn't work... I did not put anything in Actions so should i???

View Replies !    View Related
Scrollbar Script Not Working In MC?
I'm using the Realistic Action Scrollbar script from Flash Kit:

http://www.flashkit.com/movies/Scrip...3731/index.php

It works perfectly on its own, however, when it's put in a container it doesn't seem to work. It loads the text and everything but the scroll buttons don't scroll.

Any suggestions?

View Replies !    View Related
URGENT HELP Scrollbar Not Working
hi, i have an FLA file that dynamically loads XML content (its a diary with calendar). everything works except the scroller. i cant get the loaded text data to scroll. can someone take a look at the file and see if they can figure out why it isnt loading? email me privately and we can work out compensation for helping me out, as i need this done by tuesday the 8th of june. mike@bandphotography.com

the file is at
http://bandphotography.com/help/help.zip

thanks

View Replies !    View Related
URGENT HELP Scrollbar Not Working
hi, i have an FLA file that dynamically loads XML content (its a diary with calendar). everything works except the scroller. i cant get the loaded text data to scroll. can someone take a look at the file and see if they can figure out why it isnt loading? email me privately and we can work out compensation for helping me out, as i need this done by tuesday the 8th of june. mike@bandphotography.com

the file is at
http://bandphotography.com/help/help.zip

thanks

View Replies !    View Related
Scrollbar Component Not Working
Hey, I'm still a complete beginner to Flash, but I'm trying to create a website for class and I can't get the scrollbar component to work. I've looked at several tutorials about creating them and followed them all, but whenever I try to place the scrollbar it won't stick to the box, it jumps up to the upper left hand side of the frame. What am I doing wrong?

View Replies !    View Related
Scrollbar Working, But Not As Loaded SWF
Please visit my site to see what I'm talking about. www.bellemovie.com skip the intro (if you want), click on the link at the bottom called "Production", then click on photos at top. After the photo zoom, you'll see an intended photo gallery (all the same photo now tho). The up and down arrows on the right work ONLY when I publish the SWF in Flash. But when I publish the homepage SWF (which loads this SWF and all other links on my site), it doesn't work...

Is it a code on the button that I've overlooked?

Here's what's on the buttons:

UP-
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(2);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(1);
}
}

DOWN -
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(5);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(4);
}
}

The UP targets a movie clip with this code:

y = getProperty("_root.text.content", _y);
if (y>70) {
gotoAndStop(1);
} else {
setProperty("_root.text.content", _y, y+6);
}

Any ideas? thanks

View Replies !    View Related
[F8] TextArea Scrollbar Not Working
I have a simple TextArea (chatarea) that is not editable and needs to use HTML formatting.
I have the following code to setup the HTML format:


Code:

import mx.styles.CSSStyleDeclaration;
global.styles.TextInput = new CSSStyleDeclaration();
_global.styles.TextInput.setStyle("color", 0x4E8942);
_global.styles.TextInput.setStyle("fontSize", 18);
var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.setStyle("h2", {fontFamily:'Trebuchet',
fontSize:'18px',
color:'#4E8942'});

styles.setStyle("h1",{fontFamily:'Trebuchet',
fontSize:'18px',
color:'#6A6A6A'});

chatarea.styleSheet = styles;
chatarea.html = true;
chatarea.editable = false
The formatting works and everything looks as it should but the scrollbar for the TextArea is 'buggy' The scrollbar will appear then disappear as I add text into the TextArea and when I get to the bottom of the TextArea it doesn't scroll. Is there something I doing wrong with the format setup?
Thanks in advance.

View Replies !    View Related
Scrollbar Suddenly Not Working...
Here's the site:

www.woodzart.com

I've noticed an odd glitch...

When you click on the portfolio section and then click on the bio section after the portfolio loads, the scrollbar suddenly doesn't work. Weird.

Any ideas anyone?
THANKS,

Q

View Replies !    View Related
Flash Scrollbar Not Working
Hey Everyone,

simple question for most of you flash experts out there. I found this "smooth Flash Scrollbar" online and opened it up. When I expert the movie it works perfectly fine as it should. Now, when I take all of the elements within that file and transfer it over into a frame in my project, it doesn't work properly. The text doesn't display - everything else shows up fine (scrollbar, guidelines, etc). I am assuming it is something to do with the fonts or text. Can someone help? Thanks

View Replies !    View Related
UI ScrollBar Stops Working
PLEASE HELP! I have built a site and it has taken me a long time because I'm not a programmer. I built a site that has scrolling text on almost every page. It works fine. The problem is that I have a blog page that loads external MCs when you click on each blog link. In other words, the blogs are written as external SWFs with their own scrollbars. I have used UI ScrollBars for all. when I close the blog page and go to another page the ScrollBars show up still, but with no scroller and the arrows don't work either. Why??? How can I fix this? Please help because my deadline is Tuesday!!!

View Replies !    View Related
Scrollbar Script Not Working In MC?
I'm using the Realistic Action Scrollbar script from Flash Ki:

http://www.flashkit.com/movies/Scri...-3731/index.php

It works perfectly on its own, however, when it's put in a container it doesn't seem to work. It loads the text and everything but the scroll buttons don't scroll.

Any suggestions?

View Replies !    View Related
Scrollbar Component Not Working?
I have flash mx 2004 pro and have installed the flash mx component extension-since macromedia removed the scrollbar component from 2004. I cannot get the scrollbar to work. I have created a dynamic text box, set the variable to grab from an external .txt file, dragged the scrollbar over ON the text box, but it doesn't automatically resize, nor is it functional. The text box pulls the text from a long .txt file. The text shows up but you can't see all of it?

View Replies !    View Related
Scrollbar Mysteriously Not Working
the following code all works with one exception the scrollbar doesnt scroll the text

createTextField("resumeText",50 ,-220,-150,430,300);
with(resumeText){
html = true;
type = dynamic;
border = false;
selectable = true;
wordWrap = true;
multiline = true;
htmlText = _global.resume
textColor = 0xffffff
}
attachMovie("FScrollBarSymbol","resume_sb", 40);
with(resume_sb){
setScrollTarget(resumeText);
_x = resumeText._x + resumeText._width + 4;
_y = resumeText._y;
setSize(resumeText._height);
setHorizontal(false);
}

to see it in action ( or in this case not in action) take a look at http://www.billstoudt.com/ click on about and then resume.

interestingly it was working at one point and now it mysteriously stopped.

any help would be greatly appriciated.

Bill

View Replies !    View Related
Scrollbar Not Working Properly
ive been loading data using loadVars() into a dynamic textfield with html redering on so that i get basic flash html. now ive loaded pics with (with <img>) and have had to surround it by black text on a black background (so that its hidden) because the pics dont show without text surrounding them for some strange reason. now the stupid UIScrollBar that i put on the textfield isnt showing the full bar size so that now i cant scroll alway down, its like its not refreshing properly when different data files are loaded into it, arggggggggggggh, someone help me please

View Replies !    View Related
Scrollbar Script Not Working In MC?
I'm using the Realistic Action Scrollbar script from Flash Ki:

http://www.flashkit.com/movies/Scri...-3731/index.php

It works perfectly on its own, however, when it's put in a container it doesn't seem to work. It loads the text and everything but the scroll buttons don't scroll.

Any suggestions?

View Replies !    View Related
Scrollbar Component Not Working?
I have flash mx 2004 pro and have installed the flash mx component extension-since macromedia removed the scrollbar component from 2004. I cannot get the scrollbar to work. I have created a dynamic text box, set the variable to grab from an external .txt file, dragged the scrollbar over ON the text box, but it doesn't automatically resize, nor is it functional. The text box pulls the text from a long .txt file. The text shows up but you can't see all of it?

View Replies !    View Related
Scrollbar Mysteriously Not Working
the following code all works with one exception the scrollbar doesnt scroll the text

createTextField("resumeText",50 ,-220,-150,430,300);
with(resumeText){
html = true;
type = dynamic;
border = false;
selectable = true;
wordWrap = true;
multiline = true;
htmlText = _global.resume
textColor = 0xffffff
}
attachMovie("FScrollBarSymbol","resume_sb", 40);
with(resume_sb){
setScrollTarget(resumeText);
_x = resumeText._x + resumeText._width + 4;
_y = resumeText._y;
setSize(resumeText._height);
setHorizontal(false);
}

to see it in action ( or in this case not in action) take a look at http://www.billstoudt.com/ click on about and then resume.

interestingly it was working at one point and now it mysteriously stopped.

any help would be greatly appriciated.

Bill

View Replies !    View Related
Scrollbar Not Working Properly
ive been loading data using loadVars() into a dynamic textfield with html redering on so that i get basic flash html. now ive loaded pics with (with <img>) and have had to surround it by black text on a black background (so that its hidden) because the pics dont show without text surrounding them for some strange reason. now the stupid UIScrollBar that i put on the textfield isnt showing the full bar size so that now i cant scroll alway down, its like its not refreshing properly when different data files are loaded into it, arggggggggggggh, someone help me please

View Replies !    View Related
Drag And Drop Scrollbar Not Working
Checkout my flash program here

http://www.swgfreak.com/k/chat.swf

I have a dynamic text box that has data from a text file loaded in it. I dragged and dropped from the component box a scrollbar onto the textfield, but as you can see it does not work. Is there anything else I have to change or should do ?

View Replies !    View Related
Custom Scrollbar W/Dynamic Txt Not Working.
Hello guys, and thanks for taking the time.

Well since I have found many tutorials about scrolling textboxes
but none of them provide all the features I need:

1.Dynamic text (sharp text not smooth anti-aliased)
2.Continuos Scroll buttons (not one scroll per click)
3.With scroll bar (not only scrollbuttons)
4.Ability to customize buttons and scrollbar with my own graphics
(I've tried the FlashMX Scrollbar component and I can't use an image
for the scrollbar without having it streched)

So... I've partially mixed 2 usefull tutorials from Flashkit and Actionscript.org
and I came with my own scrolling textbox BUT...the scrollbar
doesn't work properly:
a. Scrollbar does not move when clicking on the buttons.
b. Textbox does not increment or decrement the scroll according to the
proportional position of the scrollbar.

Can someone help....please ??

Here's the link to my scrollbox attempt, and on that page you can download
the FLA file if you wanna give it a shot:
http://www.zona-g.com/scroll_experiment.htm

Thanks !!
-Waltman

View Replies !    View Related
ScrollBar Component In Flash 8 Not Working?
I was happily working away in Flash 8 and then went to drag the UIScrollBar component but all it shows is a white rectangle on the stage?

Where are the up and down arrows gone???

Is it possible to download this component again from Macromedia???
If so, please can someone post a link to the download?

Hope someone can help me?

Thanks.

B

View Replies !    View Related
Scrollbar Inside Movieclip Not Working
This is an issue that I have had for a while now and I have searched the web for a solution however no one seems have mentioned it before. When I set up a text scrollbar inside movieclip and call the MC to the stage using attachMovie the scrollbar simply packs up. Can anyone explain whats going on?

View Replies !    View Related
Custom Scrollbar WAS Working, But Not Anymore
Hey all, I had my scrollbar working, but now something is wrong. I've changed the scrolling tolerance several times, but the change does not seem to appear in my builds. Something else must be wrong. I am getting this error in my output, but I'm just not sure what I am missing to fix it. Any help would be appreciated.

Thanks in advance!


TypeError: Error #1009: Cannot access a property or method of a null object reference.
at final_fla::MainTimeline/stopScroll()[final_fla.MainTimeline::frame1:208]


The complete code for the scrollbar is listed below.


// BEGIN --- scrollbar scripting ----

var myTimer:Timer;
var myDirection:int;
var mySpeed:int = 2; // number of pixels it will move the movie clip in each step
var myDelay:int = 1; // The delay between timer events, in milliseconds.

allSigns_mc.left_btn.addEventListener(MouseEvent.M OUSE_OVER, scrollRight);
allSigns_mc.left_btn.addEventListener(MouseEvent.M OUSE_OUT, stopScroll);

allSigns_mc.right_btn.addEventListener(MouseEvent. MOUSE_OVER, scrollLeft);
allSigns_mc.right_btn.addEventListener(MouseEvent. MOUSE_OUT, stopScroll);

function scrollLeft(event:MouseEvent):void {
trace("scroll left");
if (allSigns_mc.scrollbar_mc.x > -300) {
myDirection = -1 * mySpeed;
initMe();
myTimer.start();
}
}

function scrollRight(event:MouseEvent):void {
trace("scroll right");
if (allSigns_mc.scrollbar_mc.x < 1500) {
myDirection = mySpeed;
initMe();
myTimer.start();
}
}

function stopScroll(event:MouseEvent):void {
trace("stop scroll");
myTimer.stop();
}

function initMe() {
myTimer=new Timer(myDelay);
myTimer.addEventListener("timer", move);
}

function move(e:Event) {
//move clip
if ((myDirection > 0) && (allSigns_mc.scrollbar_mc.x < 1500)) {
allSigns_mc.scrollbar_mc.x += myDirection;
} else if ((myDirection < 0) && (allSigns_mc.scrollbar_mc.x > -300)) {
allSigns_mc.scrollbar_mc.x += myDirection;
}
//button visibility
if (allSigns_mc.scrollbar_mc.x > 2000) {
allSigns_mc.left_btn.visible = false;
} else if (allSigns_mc.scrollbar_mc.x < -2000 ) {
allSigns_mc.right_btn.visible = false;
} else {
allSigns_mc.right_btn.visible = true;
allSigns_mc.left_btn.visible = true;
}
}

View Replies !    View Related
Simple Scrollbar + Xml Menu = Not Working
I've made a custom scrollable xml driven menu using the simple custom scrollbar tutorial from kirupa with a customized xml menu structure from elsewhere. The problem I'm having is in getting the contentMC within the scrollbar movieclip to get the correct height for the generated menu. The buttons generated by the xml are 40 pixels tall, and the number of buttons can be gotten from the names array which pulls in text for the buttons. So the content height should be defined by something like this, I'm thinking:

in the root timeline actions:

var heightNum:Number = names.length;

and then in the contentMC actions:

var contentHeight = (_root.heightNum * 40);

When I do this and trace out contentHeight I'm getting the ol' NaN response. I'm pretty sure this is happening because the content height var is trying to do math before the heightNum var has been created. But I can't seem to sort it out. Can anyone take a look at my files to figure out a way to make this work?

If it helps to look at the code without opening up the files, here's what's going on:

--------------------------------

Here's all the code from my main timeline which builds the buttons and menu based on the XML:

//FLASH FRAMER NAVIGATION MENU 1
//www.flashframer.com

stop();

//Store Button Position
var yPosition:Number = 0;

//Declare New XML Object
var myXML:XML = new XML();
//Set Flash to ignore the XML file's white space
myXML.ignoreWhite = true;
//Declare new Array to store the names from the XML file
var names:Array = new Array();
//Declare new Array to store the cities from the XML file
var cities:Array = new Array();
//Declare new Array to store the countries from the XML file
var countries:Array = new Array();
//Declare new Array to store the job ids from the XML file
var jobids:Array = new Array();

//Set XML onLoad function
myXML.onLoad = function(){
//Set varible to store the XML childNodes
//This allows you to get the number of buttons in the XML file.
//You'll use this to tell flash how many times to loop the for loop.
var linkname:Array = this.firstChild.childNodes;

//Set a for loop
for(i=0;i<linkname.length;i++){
//Push the button name into the names Array
names.push(linkname[i].attributes.TITLE);
jobids.push(linkname[i].attributes.jobid);
cities.push(linkname[i].attributes.city);
countries.push(linkname[i].attributes.country);
//Attach the button Movie Clip from the libray give it an instance name and place it on the next highest level
containerMain.containerMC.attachMovie("button","bt n"+i, containerMain.containerMC.getNextHighestDepth());
//Set the y position of the buttons
containerMain.containerMC["btn"+i]._y = yPosition;
//Increace the varible yPosition 40 pixel each time the loop runs to place each button under each other
yPosition = yPosition + 40;
//Place the button name from names Array into the white text box
containerMain.containerMC["btn"+(i)].whiteTxt.Txt.text = (names[i]);
//Place the city name from cities Array into the black text box
containerMain.containerMC["btn"+(i)].blackTxt.Txt.text = (cities[i]);
//Place the contry name from coutries Array into the grey text box
containerMain.containerMC["btn"+(i)].greyTxt.Txt.text = (countries[i]);
//Assign the btnRelease function to the button onRelease state.
containerMain.containerMC["btn"+(i)].onRelease = btnRelease;
}
var lengthNum:Number = names.length;
containerMain.containerMC.menuBkgd._height = lengthNum * 40;
trace(containerMain.containerMC.menuBkgd._height);
}


//Button Release function
function btnRelease(){
//Set a varible named currentBtn equal to the instance name of the current button the mouse clicked on
var currentBtn:String = this._name;
//Set a varible named currentIndex equal to the varible currentBtn and the characters between 3rd letter and 5th of that string.
//This will return a number between 0 and the total number of buttons
var currentIndex:String = currentBtn.substring(3,5);
trace(currentIndex);
//create the URL from the jobId Array
getURL("http://www.yahoo.com/" +jobids[currentIndex]+ "/btnClick/btnDetail/Default.aspx","_blank");
}
//Load the XML file
myXML.load("jobs.rivetglobal.com.xml");

//FLASH FRAMER NAVIGATION MENU 1
//www.flashframer.com

------------------------

And here's all the code from within the movieclip containerMain which adds the scrollbar functionality:

scrolling = function () {

var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = (_root.heightNum * 40);
trace(contentHeight);
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrack._y;
var initContentPos:Number = containerMC._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._x;
var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

scrollFace.onPress = function() {

var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {

dy = Math.abs(initPosition-this._y);
containerMC._y = Math.round(dy*-1*moveVal+initContentPos);

};

};
scrollFace.onMouseUp = function() {

stopDrag();
delete this.onMouseMove;

};
btnUp.onPress = function() {

this.onEnterFrame = function() {

if (containerMC._y+speed<maskedView._y) {

if (scrollFace._y<=top) {

scrollFace._y = top;

} else {

scrollFace._y -= speed/moveVal;

}
containerMC._y += speed;

} else {

scrollFace._y = top;
containerMC._y = maskedView._y;
delete this.onEnterFrame;

}

};

};
btnUp.onDragOut = function() {

delete this.onEnterFrame;

};
btnUp.onRollOut = function() {

delete this.onEnterFrame;

};
btnDown.onPress = function() {

this.onEnterFrame = function() {

if (containerMC._y-speed>finalContentPos) {

if (scrollFace._y>=bottom) {

scrollFace._y = bottom;

} else {

scrollFace._y += speed/moveVal;

}
containerMC._y -= speed;

} else {

scrollFace._y = bottom;
containerMC._y = finalContentPos;
delete this.onEnterFrame;

}

};

};
btnDown.onRelease = function() {

delete this.onEnterFrame;

};
btnDown.onDragOut = function() {

delete this.onEnterFrame;

};

if (contentHeight < maskHeight) {

scrollFace._visible = false;
scrollTrack._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;

} else {

scrollFace._visible = true;
scrollTrack._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;

}

};
scrolling();

View Replies !    View Related
Scrollbar Component Not Working In All Places
I'm using the scrollbar component (UIScrollBar), which has a target Instance name of: InstanceName_0

It is right next to a text field with the text as a dynamic field with an instance name of InstanceName_0.

The scrollbar works in some places and not others. I have the same text field and scrollbar used in many places on the time line and application. I have about 30 "pages" or stops within this timeline. I have a forward and back button that controls what page you are on. For some reason, the scrollbar doesn't work on the first 5 pages, but when you go past page 6, the scroll bars all work. You can even go back to page 1-5 and the scrollbars work, just as long as you pass page 6 first. There is no Action Script on page 6 that would explain why this is. I don't understand what is preventing the scrollbar from working on pages 1-5, or why it works on pages 1-5 once you pass page 6.

Any suggestions? Thanks.

View Replies !    View Related
Scrollbar In Loaded Swf Stops Working.
Hi, sorry if this is a very n00b question but i have a class Scrollbar, which works fine unless I load the swf into another movie.

I get an error on this thing:


PHP Code:



public function Scrollbar():void {
scroller.addEventListener(MouseEvent.MOUSE_DOWN, dragScroll);
stage.addEventListener(MouseEvent.MOUSE_UP, stopScroll);            
stage.addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);






This is the error:

PHP Code:



TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Scrollbar()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at sisteprosjekt_fla::MainTimeline()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at sisteprosjekt_fla::Symbol1_1/thumbLoaded() 




Any suggestions would be greatly apreciated!

View Replies !    View Related
Scrollbar Component Not Working With Dymanic Text
I've got a dynamic textbox and trying to use the scrollbar component but its just not working.

I've got some code that loads a txt file into the textbox, text appears in the box but the scrollbar will not work.

If I change the textfield property to "input" and enter in a load of text, it scrolls just fine.

I've done a search and seen people with the same problem but no solution yet. Before anyone asks, yes I have given the textbox an instance name and it does match the scrollbar component, and yes the scrollbar is properly snapped to the textbox. Theres no funny characters in the text box either (i've heard that can cause problems)

Any ideas why this isn't working?

I need this to work as eventually i need the scrollbar to scroll the text that will be loaded from a database.

View Replies !    View Related
Scrollbar/slider Not Working In Text Scroller
AS I used for a Flash 5 project seems to have a problem when published for Flash Player 7 from MX2004. I would appreciate some expertise in solving this problem. Here is the AS:

onClipEvent (load){

this.loadVariables("text.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
resetOnNewFile = true;

origHeight = scrollbar._height;
origX = scrollbar._x;

refreshRate = 12;
refreshCounter = 0;
refreshlastMaxscroll = 0;
loaded = false;

function refreshScrollBar(){

daTextBox.scroll = resetOnNewFile ? 1 : Math.min(daTextBox.maxscroll, daTextBox.scroll);

var totalLines = numLines + daTextBox.maxscroll - 1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight - scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll - 1);
updateScrollBarPos();

}

function updateScrollBarPos(){

scrollbar._y = lineHeight*(daTextBox.scroll - 1);
}
}

onClipEvent (enterFrame){

if( loaded ){

if(refreshCounter % refreshRate == 0 && daTextBox.maxscroll != refreshLastMaxScroll){

refreshScrollBar();
refreshLastMaxScroll = daTextBox.maxscroll;
refreshCounter = 0;

}
refreshCounter++;
}

if( frameCounter % speedFactor == 0){

if( scrolling == "up" && daTextBox.scroll > 1){
daTextBox.scroll--;
updateScrollBarPos();
}
else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}

onClipEvent (mouseDown){

if(up.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if(down.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if(scrollbar.hitTest(_root._xmouse,_root._ymouse)) {
scrollbar.startDrag(0,origX,deltaHeight,origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}

onClipEvent (mouseUp){

scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();

updateAfterEvent();
}

onClipEvent (mouseMove){
if(scrolling == "scrollbar"){
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight + 1);
}
updateAfterEvent();
}

onClipEvent (data){
loaded = true;
}

Thanks,
Gazzer

View Replies !    View Related
Scrollbar/slider Not Working In Text Scroller
AS I used for a Flash 5 project seems to have a problem when published for Flash Player 7 from MX2004. I would appreciate some expertise in solving this problem. Here is the AS:

onClipEvent (load){

this.loadVariables("text.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;
resetOnNewFile = true;

origHeight = scrollbar._height;
origX = scrollbar._x;

refreshRate = 12;
refreshCounter = 0;
refreshlastMaxscroll = 0;
loaded = false;

function refreshScrollBar(){

daTextBox.scroll = resetOnNewFile ? 1 : Math.min(daTextBox.maxscroll, daTextBox.scroll);

var totalLines = numLines + daTextBox.maxscroll - 1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight - scrollbar._height;
lineHeight = deltaHeight/(daTextBox.maxScroll - 1);
updateScrollBarPos();

}

function updateScrollBarPos(){

scrollbar._y = lineHeight*(daTextBox.scroll - 1);
}
}

onClipEvent (enterFrame){

if( loaded ){

if(refreshCounter % refreshRate == 0 && daTextBox.maxscroll != refreshLastMaxScroll){

refreshScrollBar();
refreshLastMaxScroll = daTextBox.maxscroll;
refreshCounter = 0;

}
refreshCounter++;
}

if( frameCounter % speedFactor == 0){

if( scrolling == "up" && daTextBox.scroll > 1){
daTextBox.scroll--;
updateScrollBarPos();
}
else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){
daTextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}

onClipEvent (mouseDown){

if(up.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if(down.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if(scrollbar.hitTest(_root._xmouse,_root._ymouse)) {
scrollbar.startDrag(0,origX,deltaHeight,origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}

onClipEvent (mouseUp){

scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();

updateAfterEvent();
}

onClipEvent (mouseMove){
if(scrolling == "scrollbar"){
daTextBox.scroll = Math.round((scrollbar._y)/lineHeight + 1);
}
updateAfterEvent();
}

onClipEvent (data){
loaded = true;
}

Thanks,
Gazzer

View Replies !    View Related
Scrollbar Stops Working When You Leave Homepage And Return
Hi, I've got two sites that have scrollbars on the homepage for news items, and when you click on another area of the page, that takes you to another scene, if you return to the home scene, the scrollbar disappears and shows up as a white box.

I'm using MX2004 Professional and I have the two text boxes set as variables so that links will work inside the text fields.

I'm not sure what the problem is.

Here are the sites:
http://www.blueskycomics.com/home/home.asp

http://www.joshhoward.net/

Thanks for any help you guys can give me!!

View Replies !    View Related
Scrollbar Not Working W/external Text File In Flash Mx
hi.

i have a dynamic text field which i need to load external text into (i.e., a text file w/"&numsections=", etc.) and when i pulled in the scrollbar component it won't scroll, though the data is showing up. any ideas why this would be happening?

View Replies !    View Related
Scrollbar Compomponent Stops Working After Loading Movie
I have created dynamic scrolling text boxes using the drag-n-drop macromedia component which works. However, when I load a .swf into my main timeline then unload it, the scrollbar shows up, but the scrollbutton is missing. I am using Flash MX, and viewing on Windows XP with EI6.

For an example of what I'm talking about, visit http://www.lakshmifilms.com/main2new.html . When you click on the buttons NEW, BIOGRAPHY, FASHION, FILM, or FOOD, you will see a working text scrollbar. However, when you click on the PHOTOS button, a .swf file is loaded on level 5. When you click again on any of the above sections, the .swf file is unloaded and the scrollbar shows up, but the scroll button is missing.

Any ideas why this is happening or how I can fix it? Thanks in advance for any help you can offer.

Tim Schapker

View Replies !    View Related
Scrollbar Not Working W/external Text File In Flash Mx
hi.

i have a dynamic text field which i need to load external text into (i.e., a text file w/"&numsections=", etc.) and when i pulled in the scrollbar component it won't scroll, though the data is showing up. any ideas why this would be happening?

View Replies !    View Related
Scrollbar Compomponent Stops Working After Loading Movie
I have created dynamic scrolling text boxes using the drag-n-drop macromedia component which works. However, when I load a .swf into my main timeline then unload it, the scrollbar shows up, but the scrollbutton is missing. I am using Flash MX, and viewing on Windows XP with EI6.

For an example of what I'm talking about, visit http://www.lakshmifilms.com/main2new.html . When you click on the buttons NEW, BIOGRAPHY, FASHION, FILM, or FOOD, you will see a working text scrollbar. However, when you click on the PHOTOS button, a .swf file is loaded on level 5. When you click again on any of the above sections, the .swf file is unloaded and the scrollbar shows up, but the scroll button is missing.

Any ideas why this is happening or how I can fix it? Thanks in advance for any help you can offer.

Tim Schapker

View Replies !    View Related
AS 2: Working With Content, Scrollbar, Window And Update. Hard To Describe 1 Lyn.
Okay... Here goes.

I made my own scrollbar which works with 2 movie clips that are outside of it - mcContent and mcWindow. The mcContent is masked by the mcWindow and the scroll reads the heights x's and y's of both mc to get them to work together.

Normally, it works fine. But the problem is that my content's height may change at runtime. When the mcContent gets longer (taller), I have trouble updating the scroll to fit snuggly.

The first time the program runs, the scroll arranges itself and puts the thumb on the track. (THUMB - the middle part of the scrollbar, TRACK - the bar the thumb can slide through). Furthermore, the thumb becomes as big as it should be, depending on how big the mcContent is in relation to the windowMC (just like the internet explorer scrollbar works). The more content, the smaller the thumb. If all the content fits in the window, then the thumb is as big as the track.

Later on though the user has the option to resize what's inside the content. This is where I have the problem. How can the scrollbar read where the mcContent is in relation to the mcWindow so that the scrollbar stays at the right place?

For example, if I scroll to the bottom, then I make the mcContent longer, the thumb should become shorter, yet stay at the bottom. If I scroll to the middle, and I make the mcContent longer, the thumb should stay in the "center" and resize itself there.

OTHER STUFF:
I had an easier time reading the thumb's position then translating it to the mcContent because it's a single point that I read from. From the the mcContent though, I have a harder time reading it.

Of course, I'm gonna continue working on it. If I come up with a solution I'll let you know. I don't expect replies anyway - this whole thing is too long and it's obscure. I'm afraid my code will make it worse because I haven't cleaned it up yet.

thanks,

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved