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 June 30th, 2003, 03:29 PM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Customized dyanmically gathered text scroller problem....

I've made my own buttons to control the scrolling of a text field, they work like this (for the down button, the up button is very similar):

Frame 1 actionscript:
Code:
loadVariablesNum("news_flash.php", 0);
stop();

Frame 2 actionscript:
Code:
if (scrolltext.scroll<scrolltext.maxscroll) {
        scrolltext.scroll++;
} else {
	gotoAndStop(1);
} 

Frame 3 actionscript:
Code:
gotoAndPlay(2);

Down button actionscript:
Code:
on (rollOver) {
	gotoAndPlay(2);
}
on (rollOut) {
	gotoAndStop(1);
}


Now it works fine enough (not as I wanted it, because I couldn't figure some things out) but its not the smoothest of movements and I'd like to increase the speed. Is there anyway to do that?

I've followed how people have set up scrollers which work really smoothly, but they all use motion tweens for the scrolling action on static text. Is there anyway to create something like this with my dynamic text, I've tried it but it just moves the text box... is there a way I can force the text box to show all the dynamic text.

I.e.

1. Force the text box to show all the dynamic text.
2. to scroll down check to see if text box bottom is outside the movie bottom (I don't need any masking or anything for this movie) if so scroll it up (while rollover).
3. to scroll up as above but in reverse.

Any help would be greatly appreciated.

-D

Last edited by DEfusion : July 1st, 2003 at 06:09 AM.

Reply With Quote
  #2  
Old July 2nd, 2003, 05:40 AM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
to scroll faster change the line that increments scroll to

scrolltext.scroll+=5;//or whatever


to see if your text is bigger than the textfield, use scrolltext.bottomScroll < scrolltext.maxscroll

Reply With Quote
  #3  
Old July 3rd, 2003, 06:44 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Ok thanks for that. I know already that there is more text than will fit into the text field, but is there anyway to force the size of text field to expand (vertically only) so that it then fits all the text in - that way I know I can have the smoother scroller that I desire.

Thanks again.

-D

Reply With Quote
  #4  
Old July 3rd, 2003, 07:11 AM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
if it fits all the text in, why do you need a scroller? you can just set the _height property to change its size.

Reply With Quote
  #5  
Old July 3rd, 2003, 07:22 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Ok there is always going to be more text than the height of the text box, thats why I need a scroller... the movie itself is only 150px high, thats why I need a scroller.

Is there anyway to get the height of the text in the text box (maybe by using scrolltext.maxscroll ) to set the _height of the text box?

-D

Reply With Quote
  #6  
Old July 3rd, 2003, 07:44 AM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
well this will depend on the font size you're using - that will determine how many pixels a line takes up - so you will need to experiment. say you start out by assuming your characters take up 10px:

Code:
char_height = 10;
scrolltext._height = char_height*scrolltext.maxscroll;

Reply With Quote
  #7  
Old July 3rd, 2003, 07:46 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Ok I'll have a play around.

Thanks again.

-D

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > FlashMX database text problem...


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 6 hosted by Hostway