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 14th, 2003, 11:42 PM
dcj1978 dcj1978 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 32 dcj1978 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
scroll boxes

I found the scroll box option built into Flash MX and it's cool, but I want to be able to make a scroll box with my own arrows. The other catch is, I want it to loop as long as I hold the button down. So, like these 2 sites show...

http://www.absolutecross.com/tutorials/flash/scrolling/

http://actionscript-toolbox.com/sampletextscroller.php

My own arrows but I don't want it to stop at the bottom, I want it to smoothly just start back at the top. The first link is the closest to the way I'm trying to do it because there's no bar, just arrows.

Now, i'll be putting thumbnails of larger images in this thing. Clickable to the larger images. i'm assuming I can just make the flash movie of the thumbnails like I did before.. Just can't figure out the scrolling without the actual scroll box and the endless loop.

I know this is a lot to ask but you guys always come through and i'm in serious need now. Any help I can get is great.

Thanks in advance!

Reply With Quote
  #2  
Old November 17th, 2003, 08:24 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,718 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11326 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 12 h 58 m 9 sec
Reputation Power: 580
Facebook MySpace
Hi, ok make two buttons (or one arrow button and flip the second instance). I'm going to pretend this is a new movie for now. Now place your text box on stage. make the text field dynamic and give it both an instance name and a variable name.

load text into the variable. do this manually for now so in your roots first frame enter something like :

mynewTextVar = "type a really long string here, copy and paste bla bla bla";

You just want enough to test out scrolling. i.e. enough that goes beyond the current text box size.

Now in your buttons you want to enter:

//Down Arrow Button
on(release)
{
//This is the text box not the text var
if(mynewTextBox.scroll != mynewTextBox.maxscroll)
{
mynewTextBox.scroll += 1;
}
else
{
mynewTextBox.scroll = 1;
}
}

//Up Arrow Button
on(release)
{
//This is the text box not the text var
if(mynewTextBox.scroll != 1)
{
mynewTextBox.scroll -= 1;
}
}

I noticed a newer post askign for help with scroll boxes. You should look at the code in that post as it is more in-depth. This is just a sample. You may have to swap the +'s and -'s above, depends on what you want. Also the lowest line in a text field may be 0. Im almost 100% sure its 1 but I could be wrong.

To get your text field to scroll as if the user was holding the buton down you can create a new movie with two frames. The first frame will contain the if statements from the above buttons (with updated target paths) and the second frame would have something like:

if(stillScrolling)
{
gotoAndPlay(1);
}

Then when you click a button it should call that new movie and activate the loop i.e

on(release)
{
if(_name == "upButton")
{
textScrollerCode.scrollDown = false;
}
else
{
textScrollerCode.scrollDown = true;
}
textScrollerCode.stillScrolling = true;
}

//and deactivate the loop when you move the mouse off the button
on(rollOut)
{
textScrollerCode.stillScrolling = false;
}

you may want the button to deactivate the scroller on(release)...probably best to do both just in case theres a glitch during play back. You still have some work to do like checks etc but this is the groundwork.

-Tann

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > scroll boxes


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 4 hosted by Hostway
Stay green...Green IT