Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-03-2011, 07:41 AM   #1
patorikku
Registered User
 
Join Date: May 2010
Posts: 13
Default [AS3] UIScrollBar not working remotely

Hey,

My UIScrollBar works with my text field when I preview my file locally.

But when I upload my website files to my server romotely. The scroll bar is there, but it does not have any arrows and is not scrollable.

This is my code. I have the correct import statements.

ActionScript Code:
//UIScrollBar component code               var scrollBar:UIScrollBar = new UIScrollBar();               scrollBar.direction = "vertical";                  scrollBar.x = 752;               scrollBar.y = 45;                 scrollBar.setSize(myTextField.width, myTextField.height);               addChild(scrollBar);               scrollBar.scrollTarget = myTextField;

My textfield code is above this. I get no errors. It just does not work when I upload it.

Thanks in advance.

Last edited by patorikku; 12-03-2011 at 07:42 AM. Reason: needed to add some info
patorikku is offline   Reply With Quote
Old 12-03-2011, 12:45 PM   #2
solisarg
Senior Member
 
solisarg's Avatar
 
Join Date: Mar 2003
Location: Buenos Aires, Argentina
Posts: 496
Default

Are you loading dinamyc text to your textfield? If that the case, you need to set the target when text finish to load

Jorge
solisarg is offline   Reply With Quote
Old 12-03-2011, 01:37 PM   #3
patorikku
Registered User
 
Join Date: May 2010
Posts: 13
Default

I think it is dynamic text. The text file is a notepad file being retrieved from another folder.

How would I go about doing what you said?
patorikku is offline   Reply With Quote
Old 12-03-2011, 01:41 PM   #4
solisarg
Senior Member
 
solisarg's Avatar
 
Join Date: Mar 2003
Location: Buenos Aires, Argentina
Posts: 496
Default

How are you loading the text?

Jorge
solisarg is offline   Reply With Quote
Old 12-03-2011, 01:55 PM   #5
patorikku
Registered User
 
Join Date: May 2010
Posts: 13
Default

Using file paths and myReq

ActionScript Code:
//declare  path  and  file  name to the text document               filePath  =  "pagetxt/homepageText.txt";               myReq  =  new  URLRequest(filePath);               //create  URLLoader  to  load  the  file               myLoader  =  new  URLLoader();               myLoader.addEventListener(Event.COMPLETE,  fileLoaded)               myLoader.addEventListener(IOErrorEvent.IO_ERROR,  ioErrorHandler);

Theres more code to this, but it functions perfectly.
patorikku is offline   Reply With Quote
Old 12-03-2011, 02:34 PM   #6
solisarg
Senior Member
 
solisarg's Avatar
 
Join Date: Mar 2003
Location: Buenos Aires, Argentina
Posts: 496
Default

So you need to set the UIScrollbar in the fileLoaded function, that's the callback when text finish to load

Jorge
solisarg is offline   Reply With Quote
Old 12-03-2011, 03:12 PM   #7
patorikku
Registered User
 
Join Date: May 2010
Posts: 13
Default

Quote:
Originally Posted by solisarg View Post
So you need to set the UIScrollbar in the fileLoaded function, that's the callback when text finish to load

Jorge
I moved all the UIScrollBar code within the fileLoaded function and it seems to have done the trick. Thanks for the help.
patorikku is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:44 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.