Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 17th, 2003, 01:01 AM
dante2010 dante2010 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2002
Posts: 599 dante2010 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 3 h 46 m 49 sec
Reputation Power: 7
Scrollbox issues

HI,

I'm trying to edit some flash in order to increase the length that a scrollbox can actually scroll the txt contained in it. Code is as follows:


PHP Code:
 onClipEvent (load) {
    
this.loadVariables("textedit/datafiles/bio");
    
scrolling 0;
    
frameCounter 1;
    
speedFactor 3;
    
numLines 20;
    
origHeight scrollbar._height;
    
origX scrollbar._x;
    
needInit false;
    function 
initScrollbar() {
        var 
totallines numlines+bio.maxscroll-1;;
        
scrollbar._yscale 100*(numLines)/totalLines;
        
deltaHeight origHeight-scrollbar._height;
        
lineHeight deltaheight/(bio.maxscroll-1);
    }
    function 
updateScrollBarPos() {
        
scrollbar._y lineheight*(bio.scroll-1);
    }
}
onClipEvent (enterFrame) {
    if (
needInit) {
        if (
bio.maxscroll>1) {
            
initScrollbar();
            
needInit false;
        }
    }
    if (
frameCounter%speedFactor == 0) {
        if (
scrolling == "up" && bio.scroll>1) {
            
bio.scroll--;
            
updateScrollBarPos();
        } else if (
scrolling == "down" && bio.scroll<bio.maxscroll) {
            
bio.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(0origXdeltaHeightorigX);
        
scrolling "scrollbar";
    }
    
updateAfterEvent();
}
onClipEvent (mouseUp) {
    
scrolling 0;
    
up.gotoAndStop(1);
    
down.gotoAndStop(1);
    
stopDrag();
    
updateAfterEvent();
}
onClipEvent (mouseMove) {
    if (
scrolling == "scrollbar") {
       
bio.scroll Math.round((scrollbar._y)/lineHeight+1);
    }
    
updateAfterEvent();
}
onClipEvent (data) {
    
needInit true;



I'm not all that up on this sort of thing (not my code.. handed over to me from previous dev) so I'm having a problem figuring out what I should edit to make the box able to scroll through all the text I want to insert into it.

Could anyone offer an opinion?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Scrollbox issues


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT