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




Text Scroll Help Needed Please BottomScroll Specifically



I am using a draggable movie clip to scroll my textfield.

For some reason I found that for this project making my own scroller works better than the component included in Flash.

I need a script that will tell me if there is a need for my draggable scroll box to be visible, I tried using the bottomScroll property but it ALWAYS gives me a value of 1. Is this because I am using a dynamic text field? and If so how can I adjust this?

I was trying this:

if(body.maxscroll > body.bottomScroll){scroll_box._visible = true}else{scroll_box._visible = false}

can someone please tell me what I am doing wrong?



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-02-2004, 10:21 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Scroll Bar Show Up If Needed And Only Scroll To Dynamic Text Input Bottom... HOW
I have attached a copy of my scroll bar that i am currently using how can i make the scroll bar not show up unless needed (really not all that important but would be nice.)

The important thing is that i can setup a dynamic text box inside my item_holder movie clip but my scroller always scrolls to the bottom of the scroll box not matter if inside my scroll box i have on line of text loaded dynamicly or i have 100. So if i have 1 line of text and a large dynamic text box the scroll bar will scroll to the bottom of the scroll box even though it only has one line. See attachment and see if anyone can help. Thanks in advance. Brian

Adding Scroll Bars To Text Boxes When Needed
Greetings all,
I'm pulling data from a database and loading it into a dynamic text field with a scroll bar component. I wanted to know if there is a way to hide the scroll bar UNTIL the text gets long enough to scroll.

Adding Scroll Bars To Text Boxes When Needed
Greetings all,
I'm pulling data from a database and loading it into a dynamic text field with a scroll bar component. I wanted to know if there is a way to hide the scroll bar UNTIL the text gets long enough to scroll.

BottomScroll
Hey Guys,

I have a textbox that has 17 lines ... my text goes beyond that ... Or maybe it doesn't ... If the text doesn't go beyond the 17 line mark ... I don't want the scroll buttons to show up ... is there a way to do that ... using the bottomScroll command ...

thanks for the help

-S

BottomScroll?
Hi I am having an issue with load vars

I have 3 btns loading in text in this manner


Code:
star_mc.onRelease=function () {
myLV.load("star.txt");
}
then i have external as file control the loadvar and text scroll


Code:
var scrollDirection:String;
var myLV:LoadVars = new LoadVars();
var myRoot = this;
myLV.onLoad = function(p_succes:Boolean):Void {
if (p_succes) {
info_txt.htmlText = myLV.info;
} else {
info_txt.text = "error loading file!";
}
};
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("myattemptatCSS.css");
myStyle.onLoad = function(p_succes) {
info_txt.styleSheet = myStyle;
myLV.load("moon.txt");
};
up_mc.onPress = function() {
scrollDirection = "up";
setScroll();
};

//and so on

my problem is :---
if someone has scrolled a text down and then i load a new text in it goes to where the person had scrolled the previous text down to not the top of the text as i wish!

how can i do this

i have traced out trace (info_txt.bottomScroll) when it is where i want it; and get 5

but if i put info_txt.bottomScroll=5; // which puts it at the top

it does not work! any ideas? nmany thanks

Maxscroll And BottomScroll
I have a text field that is scrolled when a button is pushed.

I wanted a movieClip to be visible as long as there is more text to view.

Please help.

I know maxscroll gives me the maximum number of lines to scroll, but I am not sure how to determine if it has been reached.

I tried a comparison with bottomScroll with no positive results.

Specifically Sorting An Array
Hey folks,

Quick question...

I've got an array with several values in it... is there a way I can determine dynamically which value appears the most often in said array? For example:

myArray = new array("2", "4", "1", "7", "6", "4", "2", "3", "2")

As we can see, the value "2" appears the most in the above array... so how can I get Flash to dynamically see it too?

Thanks!

- Thingee

Downloadable Files (specifically Jpegs)
I want to make it so that when someone clicks on a picture, they can download it. I think that's as simple as I can say it. I have heard that this will work by opening a new pop-up window with the picture in it. That's fine with me, as long as the can Right click and Press "Save as" or "Download link" etc. What I don't want is for people to Right click and see "About macromedia Flash 6" etc.

If there's a way to make the image begin to download right when someone clicks it, thats even better! But whichever one is easiest, is best!

PS: I mainly what to have downloadable Jpegs (Desktop Backrounds) on my site, but I would also like to unclude sound files (Mp3, wav, etc), is this also possible. I have read that you can use the Get URL action and just give the pathname of the file. I think that would work on my computer, but would that really work on someone else's who is trying to download my file?

Appreciate the help.

Editing Component Variables (specifically Radiobuttons)
I've created a form using the standard components that come with flash. When I use the "POST" or "GET" methods to send the data to a CGI script (the sendmail.pl included in the flash 5 bible) variables that are built into the radio button component are passed and output in the return e-mail. Is there a way to remove or "edit" out these values with actionscript? Or is that something that would have to be handled in the CGI script?

Limitations Of Flash, But Specifically Of Tweening Along A Path
I find that a lot of my time learning Flash is wasted because I'm headed down a dead-end street. In other words, the Flash documentation mainly tells you what you can do with movieclips, layers, tweens, etc. but often I find it omits things that you cannot do. Pardon me while I digress into a tirade...

For example, I kept trying to use removemovieclip without setting the depth of the mc to a positive number first. But this little bit of info wasn't on the removeMovieClip function help page (LiveDocs ) but after many unsuccessful attempts I finally found that information on the removeMovieClip (MovieClip.removeMovieClip method) help page (LiveDocs).

I find it irritating that I have to go on a little scavenger hunt every time something's not working out when the code looks A-OK. I mean, I think this particular morsel of information should have been included on the removeMovieClip function help page. One sentence. It's not adding all that much more length to the help documentation.

Or perhaps an appendix, filled with things you cannot do in Flash. Like draw one continuous scribbly line that crosses over and over itself without joining the lines together with anchor points, into one big mess of a shape.


So, here's my question(s) about Tweening along a path:

Can I draw a scribbly path that crosses back over itself and have my movie clip meander along? Or is it because Flash combines shapes/paths automatically (unlike Illustrator) which is ruining my little plan for having my mc meander? So what's happening here? Is the anchor point that Flash automatically throws in there when a line crosses over another line basically creating a "fork in the road" that's confusing the tween as to which way to go?

Second question of what it seems I can't do...

Inside my movieclip (mc_1) I've created a tween (with ball_mc) along a path. Works great. But when I drag mc_1 to the stage, the motion tween does not appear when I test movie.

SO. I'm assuming I can't have tweening along a path within a movieclip? I have to specifically create the motion tween along a path on the stage, creating multiple frames, when I only want one?

HTTPS And Flash, Caching Problems For IE Specifically
Hi,
I have built a working application (http://www.proofhq.com) that communicates with a SOAP server using HTTP.
The situation
We are trying to move to HTTPS and have a problem in that specific calls are not being received into Flash.
EG: I have a configuration xml file that I can see from Fiddler is correctly served as valid XML, and that can be read by Flash under HTTP, but NOT under HTTPS.
Similarly, (specific) basic SOAP requests that work under HTTP are not working under HTTPS, even though many others are...
The cause
It looks like caching settings are being applied too rigorously by IE so that the file is served, but then removed from the cache before the plugin can read it. In the case of the config file, removing the caching header tags allows the plugin to read the file under HTTPS.
The problem
We can't just remove the cache headers as we need to ensure all data is current.
HELP ME!
Has anybody got any ideas as to what the best solution is to this that will ensure a) we do not cache files and b) Flash can still read them under https?
Thanks,
G

Using HTML Tags In Flash, Specifically Anchors...
I know it's possible to incorporate html tags using an external text file. Is it possible to use anchor tags as well to drop the user further down in a dynamic text box? Currently, when I assign an anchor tag Flash opens another browser window, populating it with the text file only.

Do you know of a way to effectively use anchors within a text document, or is there a work around using variables. I wanna know. Thanks, and happy Flashing...

Email Mark...

[MX] Question For More Advanced Users ( Specifically Button Related)
Hi all,

I've been playing with Flash MX V6 during my lunch hour for the past couple of weeks as it's installed on my PC. I grabbed a free template to play with, as I wanted to see how they were put together.

I got one that I liked, seemed fairly complicated so I decided to see if I could add to it.

Now I've created buttons before, not a problem however I wasn't able to work out how to create them and get them working on this template and being new to this I'm not sure if it's me or the template at fault! (probably me )

The one I grabbed from the net is here:
http://templatenavigator.com/template776-details.html

All I really wanted to know is how can I make one of the buttons actually jump to a URL, whenever I create a button it either seems to get lost amongst layers or simply messes up all the nice animation the creator made!

As I said before I can make buttons, but simply can't get them working on this template.

The web guy here at work doesn't like flash, so won't help

Flash Button To Open Specifically Sized Window
Thanks in advance to anyone who can help and apologies if this is really easy problem or been solved before.

I'm using Flash MX Version 6:

I need to get a flash button to open a specifically sized window, centred on screen, with no scroll bars etc.

I know under the actions section there is a tick box marked expression, can anyone help with finding examples of these, if indeed this is where i dictate the window options.

Thanks

Detecting Modified/created Files In Windows (specifically Due To CS4 Installer)
I don't know where else to ask this question, so I'll post it here, and if anyone knows any other forums where I might get a better answer, please tell me.

I am wanting to install flash CS4, but I want to know exactly which files and registry keys it creates and changes. Spybot informs me of all registry changes, but that is it.

Is there any antivirus software or something that will tell exactly which files get changed, created, or deleted during a set period of time or by a specific program?

Otherwise I could just search for all files that have been created or modified within the last 45 minutes, but I would prefer an easier method. Has anyone heard of anything like this?

Problem Looping Actionscripted Animation, Specifically Laco Tweening Prototypes.
Hey everyone,
I am working on an animation at work for a web banner and i have coded all of the animation using the Laco Tweening prototypes, Problem is that i need this animation to loop. I know i need to be using the callback function in some way but the forums on the laco site are down so i cant ask there. If anyone could help me with this i would really appreciate it.

Cheers

Controlling FLV By Frame Action In Main Timeline (specifically Pause/unpause)
Is this possible? I'm sure it must be from the searching I've done so far but I can't get it to work (I'm a video/animation expert, not script).

For use in a rolling online tutorial for a piece of software I have an FLV (progressive http download) playing in my swf which I need to pause at specific points as a caption comes up elswhere on the stage (note this caption is not in the flv) allowing it to be read before the user clicks a button within the caption movieclip to continue playback of the FLV.

In short-

I need frame action script which will stop the flv on a given frame. Here a 'caption_mc' in the main timeline (which runs for the same length as the FLV) will play until a button within the caption is pressed to continue the FLV.

Is this possible and if so is someone kind enough to give me some code for a frame (and button) action? Again I have searched and found code which I can't make do anything. Failing that alternative methods?

The FLV sits in the main root timeline too. I am using an embedded qt of the same video as a guide layer for the pauses (as they are subject to change) throughout.

Thanks a lot in advance.

Scott

Flash Pro 8
WinXP

Problem Looping Actionscripted Animation, Specifically Laco Tweening Prototypes.
Hey everyone,
I am working on an animation at work for a web banner and i have coded all of the animation using the Laco Tweening prototypes, Problem is that i need this animation to loop. I know i need to be using the callback function in some way but the forums on the laco site are down so i cant ask there. If anyone could help me with this i would really appreciate it.

Cheers

Scroll Help Needed
i have an MC on the screen
(the location isnt matter)
i load every time another MC into it
and i want to scroll it with left and right buttonsand code
(withought using a scroll bar!!!)
how do i do that?what the calculations that i need to do?
does any1 have a working example?
thanks in advance
peleg

Scroll Down Help Needed
I made a movie that loads an external text file to itself.
Here is the question;
Text field only scrolls down if it is full with text.But i want to scroll it down everytime.Not only if it is full with text.If anyone can help to me i'll be very happy

Scroll Down Help Needed
I made a movie that loads an external text file to itself.
Here is the question;
Text field only scrolls down if it is full with text.But i want to scroll it down everytime.Not only if it is full with text.If anyone can help to me i'll be very happy

Scroll Script Help Needed
I am new to flash, and am greateful for the help you all have offered so far.. so here goes again;

I am trying to make a simple scroll for text. I have used a tutorial on this site, and it seems to be easy. However when all is said and done, I still get two errors and am unsure what the meaning is... they are:

Scene=Scene 1, Layer=text, Frame=1: Line 1: Clip events are permitted only for movie clip instances
onClipEvent (load){

Scene=Scene 1, Layer=text, Frame=1: Line 8: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame){

my script reads (for that area)

onClipEvent (load){
daTextBox = "text";
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
}

onClipEvent (enterFrame){
if( frameCounter % speedFactor == 0){
if( scrolling == "up" && daTextBox.scroll > 1){
daTextBox.scroll--;
}

What am I missing?
again, thanks for the assistance

Scroll Pane Help Needed.
Hey,

I'm pretty sure this is really simple.. how do I make a scroll pane with a transparent BG, so it's not white... I can't figure it out and need it.. I can use a dynamic text fiend with a scroll bar, but I need to have pictures and text inside the scroll pane.. But the BG also needs to be transparent not white.
Any ideas?

Ian

Scroll Bars Appear Only If Needed
I've seen a couple posts on this topic that didn't work for me.

I have a dynamic text box with external text (file is called "biographies_ahrens.txt", variable is called "ahrens_txt") loaded into it using this code...

myData = new LoadVars();

myData.onLoad = function(success){
if (success) {
ahrens_txt.htmlText = this.ahrens_txt;
} else {
ahrens_txt.htmlText = "error loading variables";
}
}

myData.load("text/biographies_ahrens.txt");

stop();

This works fine with or without a scroll bar. But I want to add code that determines if the imported text requires a scroll bar or not. If it does not require a scroll bar, I'd like the scroll bar to be invisible.

Thanks for taking a look at this for me...
Eric

Scroll Bar Visible Only When Needed?
Hi,

I'm adding a scrollbar to a text field, this text field is dynamic and its content may vary from a single line to a lot of copy. I would like the scrollbar to be visible only when a scroll is required and be invisible otherwise. I've seen the code to check this before, its an if statement, but i cant find it!

Any pointers or help would be really good.

Thanks.

Steven.

Scroll Link Needed.
I have tried searching for the last 2 hours here on flashkit.com and keep getting page can not be displayed so now I am posting here. I know it was posted before by Oldnewbie. I wanted to get the link again for scroll down arrows in dynamic text. The link was showing how to do the click method , the click and hold method also "this is the one I need".

Thanks

Remove Scroll Bar When Not Needed
Hello,

I originally posted in the wrong Forum, AS3.

I just finished the 3D carousel tutorial on gotoandlearn. My questions is, I added a scroll bar to the rigt of the text field because on some of the pages i created there is too much information to show up on one page. Problem is, the scroll bar shows up on the Splash screen (intro screen) as well as in pages that only have a couple lines of text. I'd like to know how to get rid of the scroll bar when not enough text is in place to use the scroll bar and when not being used in a screen that doesn't have text.
I looked up this issue on the web but most information I found didn't answer the quetsion about "removing the scroll bar from the splash screen. Keep in mind that I m just learning AS and am less than a novice when it comes to script.

Thanks all.

SMC







Attach Code

Hello,

I just finished the 3D carousel tutorial on gotoandlearn. My questions is, I added a scroll bar to the rigt of the text field because on some of the pages i created there is too much information to show up on one page. Problem is, the scroll bar shows up on the Splash screen (intro screen) as well as in pages that only have a couple lines of text. I'd like to know how to get rid of the scroll bar when not enough text is in place to use the scroll bar and when not being used in a screen that doesn't have text.
I looked up this issue on the web but most information I found didn't answer the quetsion about "removing the scroll bar from the splash screen. Keep in mind that I m just learning AS and am less than a novice when it comes to script.

Thanks all.

SMC


// sb is the Instance name of the sidebar
sb.swapDepths(this.getNextHighestDepth());
sb.removeMovieClip();

down_btn.onPress = function() {
theText.scroll += 1;
};

up_btn.onPress = function() {
theText.scroll -= 1;
};



import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 400;
var radiusY:Number = 100;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.005;
var perspective:Number = 100;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();

home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}

function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}

function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}

function unReleased()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}


function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*75;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/20500;
}

Scroll Bar Component Help Needed :)
hey gang,

I'm having issues with the scrollbar component.

It wont load everytime in IE. sometimes you have to refresh the page before it will be shown.

Any clues as to why?

It's kinda urgent.

Thanks in advance

Scroll Bar Shows Only When Scrolling Is Needed.
I am trying to make a scroll bar show only when the text has gotten long enought to facilitate its use. The problem i am running into is how to count the number of lines in the text window so that if the line count is greater than set number then the display property is set to true. Right now I have it set to count the length of the text string but that doesn't work well because it counts ENTER as a charecter. So I hit enter 10 times its only 10 characters. Any ideas?

Inverse Scroll Bar - Formula + Help Needed
arrrgh, i knew i should've buffed up on my maths when i had the chance to...

i need a formula that makes the content of a bar scroll within the bar inversely according to the size of the bar... so when ur mouse is on the extreme left, the mouse will be on the 1st item, and if ur mouse is on the extreme right, the mouse will be on the last item...

attached is a rough idea... plz help!! thanks!!!

Need Scroll Buttons To Disappear When Not Needed
I've spent all day trying to figure this out, and I can't seem to get it right.

I have a main movie that will load external swfs and external text. My external swfs. have an action to load the external txt. files into a scrolling text box into my main movie.

I can't seem to figure out how to only make the scroll buttons in the main text box appear when needed. I've tried determining textHeight in the textBox, maxscroll. I've even put an action in my external swfs (_root.arrows_mc._visible = false Nothing seems to work. Any suggestions?

[Flash8]Help Needed Pop-Up & Scroll Not Working?
[Flash8]Help needed! Pop-Up & Scroll not working?

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

Hi, there
Im new to flash, mostly in to php and html, but i want to try out new things this is more of a hobby thing.. well, let me get in to my to major problems right now..

1. I cant seem to load external txt correctly.. i cant load it with fonts only if i select "use system fonts" and when it loads my Scroll dont work, like it isnt activated.. i double checked everything, names , codes, and started from strach..
the lay out is as follows..
Main scene -----|
|
|---MovieClip 1
|
|--- then in side movie 1 i have the txt area where it needs to load the external txt..
is that a problem because i have to many movies..?

2. now for my second problem is i cant get the pop script to work..
layout same as above
Main scene -----|
|
|---Movie 1
|
|---Movie 2--button<<with script<<
so can my problem be that i have it to deep in to flash??


thanks for the help

sorry i asked 2 questions in one thread just that i didnt want to make 2 spearate threads..

Scroll Help / Resource Sites Needed
Hi FKs

Can anyone point me to a site or post here (I've had a quick browse) which would help me achieve the scrolling of content in a mc (bg image) on the _x axis. Ideally where the mouse moves left and the page scrolls left etc. By the way I'm using MX 2004.

thanks
jb

Hide Scroll Buttons When Not Needed
I have a dynamic text field that displays a variety of different content. Some of it fills the box and beyond and some doesn't. I created a couple buttons to scroll the box when the content is more than the visible area, using the scroll property.

I would like to hide the buttons when they are not needed, but I can't figure out a way to do this.

Any suggestions....I did try using the scrollbar component because I read that it would hide itself when not needed, but as usual I had no luck with the components(i've never been successful trying to use one).

Thanks.

[F8] Hiding Scroll Bars If Not Needed
hi i have edited a site with much help thanks to you guys at flash kit

i have currently got a page of the site with text boxs and scroll bars the text boxes get all there data from a XML file which is all working fine at last.

i have the scroll bar with the following code in its own MC

Code:
onClipEvent (load){
//this._parent.daTextBox.text = "However, when we first click on a button, we should be given immediate feedback regardless of what frame we're on. By setting the frameNumber to skipFactor when a button is clicked, the next time the onClipEvent( enterFrame ) code is fired, the text box will scroll immediately. This is not a simple caprice: fast response times are vital to user experience.";
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
}

onClipEvent (enterFrame){
if( frameCounter % speedFactor == 0){
if( scrolling == "up" && this._parent.pageText1_txt.scroll > 1){
this._parent.pageText1_txt.scroll--; }
else if( scrolling == "down" && this._parent.pageText1_txt.scroll
< this._parent.pageText1_txt.maxscroll){
this._parent.pageText1_txt.scroll++;
}
frameCounter = 0;
}
frameCounter++;
}
i was wondering if there was anyway in which is there text i type into the xml was shorter than the text boxs i could hide the scroll bar so it does not display but as when when i change the XML data if the test gets long it will reappear

many thanks for any help in advance

Leewalker87

Hide Scroll MC Components When Not Needed
I have two movie clips that scroll my text up and down. I have a dynamic text box that calls the variable "myText". I want to scroll bars to be accessible when the text overflows, but disappear when the text fits within the box. Any help would be appreciated!!


Thanks!!

Setting Scroll Bar To Inbisible When Not Needed
Here is the post again, some quotation marks came out as letters before. This is correct version


I'm using AS 2.0, and have added a

scroll bar with instance name: ...................sb1
a dynamic text field with instance name:.... tb1_txt
an external text file named as:....................home.txt

I want to make the scroll bar invisible or transparent, when its is not needed. I'm thinking that I may have to use the _visible property, but not sure of the correct code to integrate this.

Any suggestions anyone?

Make Scroll Bar Vanish If Not Needed?
I would like to make my scroll bars invisible if they are not needed on my dynamic text boxes and visible if they are needed (like the TextArea component in MX 2004). Can anyone help me with this, or point me in the direction of a good tut? I'd really appreciate it.

Scroll Bar Conponent Set Its _apha If Needed
Can anyone tell me why I can’t get this to work? When I load another txt file I want the scroll bars _alpha to be 0 if the text does not need to be scrolled. IF it does the scroll bar should be set to 100. I thought this would do it but it does not.

When I launch the movie I have
poemHolder.scrollBar._alpha = 0;
Then when I click the button it sets the scroll bar to 100 whether it needs it or not.
I just want it to be visible if it needs to be.
Thanks for your help.


Code:
MovieClip.prototype.loadText = function(url, file, varName, textHolder) {
textLoad = new LoadVars();
textLoad.load(url+file);
textLoad.onLoad = function(success) {
if (success) {
textHolder.html = true;
textHolder.htmlText = this[varName];
textHolder.wordWrap = true;
if (poemHolder.content.scroll>poemHolder.content.maxhscroll) {
poemHolder.scrollBar._alpha = 100;
} else {
poemHolder.scrollBar._alpha = 0;
}
} else {
trace("not loaded");
}
};
};
Then on a button I have


Code:
contrib.onRelease = function() {
loadText("poems/", "poem1.txt", "varb", poemHolder.content);
};

[Flash8]Help Needed Pop-Up & Scroll Not Working?
Hi, there
Im new to flash, mostly in to php and html, but i want to try out new things this is more of a hobby thing.. well, let me get in to my to major problems right now..

1. I cant seem to load external txt correctly.. i cant load it with fonts only if i select "use system fonts" and when it loads my Scroll dont work, like it isnt activated.. i double checked everything, names , codes, and started from strach..
the lay out is as follows..
Main scene -----|
|
|---Movie 1
|
|---Movie 2
|
|--- then in side movie 2 i have the txt area where it needs to load the external txt..
is that a problem because i have to many movies..?

2. no for my second problem is i cant get the pop script to work..
layout same as above
Main scene -----|
|
|---Movie 1
|
|---Movie 2--button<<with script<<
so can my problem be that i have it to deep in to flash??


thanks for the help

sorry i asked 2 questions in one thread just that i didnt want to make 2 spearate threads..

Show/Hide Scroll Bar When Needed
I am have this code loading an xml file into a dynamic text box:


Code:
GetTitleText = function(news_xml, entry_index){
var entries = news_xml.firstChild.childNodes;
var title_element = entries[entry_index].firstChild;
return title_element.firstChild.nodeValue;
}
GetBodyText = function(news_xml, entry_index){
var entries = news_xml.firstChild.childNodes;
var body_element = entries[entry_index].firstChild.nextSibling;
return body_element.firstChild.nodeValue;
}

GetDateText = function(news_xml, entry_index){
var entries = news_xml.firstChild.childNodes;
var date_element = entries[entry_index].firstChild.nextSibling.nextSibling;
return date_element.firstChild.nodeValue;
}

GetEntry = function(news_xml, index){
var entries = news_xml.firstChild.childNodes;
return entries[index];
}
GetNewsCount = function(news_xml){
var entries = news_xml.firstChild.childNodes;
return entries.length;
}

ShowNews = function(news_xml){
if (!news_xml.firstChild.hasChildNodes()){
content_txt.text = "No news available.";
return (0);
}
var entries = news_xml.firstChild.childNodes;
content_txt.text = "";
for (var i=0; i<entries.length; i++){
var title = GetTitleText(news_xml, i);
var body = GetBodyText(news_xml, i);
var date = GetDateText(news_xml, i);
content_txt.htmlText += '<font size="14" font-family="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif" color="#FF3070"><b>' + title +"</font></b><br>"
content_txt.htmlText += '<font font-family="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif" size="10"><i>' + date +"</i></font><br>"
content_txt.htmlText += '<font font-family="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">' + body +"</font><br><br>";
}
}


RefreshNews = function(news_xml){
content_txt.htmlText = "<i>Loading...</i>";
news_xml.load(xml_file);
}

var xml_file = "achivevements.xml";

var news_xml = new XML();
news_xml.ignoreWhite = true;
news_xml.contentType = "text/xml";
news_xml.onLoad = function(success){
if (success) ShowNews(this);
else content_txt.text = "Error loading XML file";
}

RefreshNews(news_xml);

my text box has the instance name - content_txt, and the scrollbar has the instance name myScroll.

How do I have the disable the scroll bar if it is not used? I have a custom skinned scroll bar and every AS i try displays two gray boxes when there is not enough content to scroll.

Make Scroll Bar Vanish If Not Needed?
I would like to make my scroll bars invisible if they are not needed on my dynamic text boxes and visible if they are needed (like the TextArea component in MX 2004). Can anyone help me with this, or point me in the direction of a good tut? I'd really appreciate it.

Trying To Scroll A Movieclip Problem, Help Needed
Hi guys

I'm trying to create a scrollbar for a movieclip
Basically when i move the scrollbar down the content movieclip should go up and vice versa,

This works, however I can't get the scrolling to stop exactly at the bottom of the content movieclip, and its turning me a bit nuts. (theres a little blue square at the bottom of the content movieclip, and that should be displayed when the scroller has reached the bottom, but it isnt :-( )

the example fla can be downloaded here:
http://www.joeprice.co.uk/temp/scrollBarProblem.fla
If anyone could have a look and try to solve the problem i'd be most grateful!

Cheers

Joe

SLIDER Scroll URGENT HELP NEEDED
Hi Fellow flashers

I am in need of some URGENT help
http://www.exile.com.au/300x250_mark_flash5.fla
It is only a really simple problem for some of you I am sure
So I hope someone can help.

I have a scrolling mask
Which works fine.

If the person has scrolled using the svroller 75% or greater across the movie and they release the mouse
I want the whole movie to jump to the second scene

I have been tearing my hair out trying code like this on button


on (press) {
startDrag("_root.slider", false, 10, 174, 220, 174);
}
on (release) {
stopDrag();
if (_root.slider>=200) {
nextScene();
}
}

or

on (press) {
startDrag("_root.slider", false, 10, 174, 220, 174);
}
on (release) {
stopDrag();
if (_level0.slider_x >=200) {
nextScene();
}
}

It has to be 75% or greater as well.
I have a link to the fla here http://www.exile.com.au/300x250_mark_flash5.fla
With some dummy pics in there one is my dog

PLEASE can someone help
Its something really simple I know

Or you can email me on my email listed

Scroll Pane Help Needed - Content Outside Of Scrollpane
hey all -

i'm having a problem with my scrollpane. I have a mc set as the content for my scrollpane. i can then change the content of that scrollpane just fine using:

myContent=myPane.getScrollContent();
myContent.replaceContent();

where replaceContent() is a function in the mc and is working fine.

the content of this mc is a variable number of text fields (created and populated at run-time from an outside .txt file). the content refreshes and all works well EXCEPT:

the content exists outside the pane. the pane will still scroll it, but it doesn't "mask" it or contain it. I've tried using:

myPane.refreshPane();

both inside the script as well as on a button just to force it and make sure it runs after the content has been changed. neither of these approaches is working.

any help would be greatly appreciated.

oh, and, i'm using flashmx.

Urgent Help Needed Scroll MoviClip Horizontal
Hi All !

Urgent Help Needed

Can any one help me in scrolling a movie clip horizontal.

For further more to understand what I am saying, I have attached the files in zip format.

In breif I have one file which load another movie into it, the loaded movie is to be scrolled as for the mouse movement and with also button event.

Basically I want my loaded movie to work like a tickler which were generally made using Java or javascript.

Thanks in antcipation.

Urgent Help Needed Scroll MoviClip Horizontal
Hi All !

Urgent Help Needed

Can any one help me in scrolling a movie clip horizontal.

In breif I have one file which load another movie into it, the loaded movie is to be scrolled as for the mouse movement and with also button event.

Basically I want my loaded movie to work like a tickler which were generally made using Java or javascript.

Thanks in antcipation.

Scroll Text > Button > Load Txt File > Reset Scroll Bar...?
Hi i am looking for a tutorial or an explanation of how you can load an external text file into a text field and have...let's say 3 buttons that load the .txt files...when they are loaded...i want the scroll bar to be reset to the top of the text field/box....

any help...welcome...

ta...tiger...

Linking Text Buttons In Scroll To Image Outside Scroll Area
Hi,
I am desperately hitting my head against a brick wall - so please help me!

I have created a flash area that is divided up with an image on top and a scroll area under.

I am trying to get the text buttons in the scroll area to each change the image above and cant seem to get it to work because of the masking.

I have tried heaps and heaps of different ways and am going crazy!

PLEASE HELP ME!!!!


thanks,
kova

Copyright © 2005-08 www.BigResource.com, All rights reserved