UIScrollBar Problem

I've got a dynamic text box that updates it's content from an
XML file everytime a 'section' button is pressed. I noticed some
odd UIScrollBar behaviour: When a section is first loaded that
extends beyond the text box bottom, there is a scroll bar, and when
I click to load into a section that has text longer than the text
box, the scroll bar persists appropriately. However, when I click
into a section that does not have enough content to create a scroll
bar, the scrollbar appropriately disappears. When I click to load
another section that has enough content to extend past the text box
bottom and create a scroll bar, the scroll bar does not appear.
It is only after I click into a section that does not have
enough initial content to create a scroll bar does the actual bar
disappear. The scroll 'pane' or 'track' is still there, just not
the bar for scrolling. I've looked at the Adobe LiveDocs here:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003694.html
I did not see a way to 'refresh' the scroll bar or ask it to
reconsider whether or not it needed to be drawn.

Yes there is no any way to 'refresh' the scroll bar, the
proper way is to reset the targetInstanceName property after the
new text loaded, e.g:
_root.yourscrollbar._targetInstanceName = "your text field
instance name";
good luck
GG

Similar Messages

  • AS3 UIscrollBar problem

    Hi, I have a movie that I have used the UIscrollBar in within
    various nested movieclips. The text is contained in a series of
    vars which is then called into the dynamic text box. Everything
    works fine when I test the swf in flash, and also works in IE6, IE7
    and FF3, but not in Safari 2...?
    The UIScrollbar is called in 1 of 2 ways in the swf. Either
    through a function assigned to an MC that works as a button or
    through an onEnterFrame event listener and function, and its the
    onenterframe that does not work in safari. I'm completely mystified
    by this as I can't get my head round how a swf behaves differently
    in different browsers? Its not a complex swf and only references
    the Caurina tweener as external files - the rest of the AS sits
    inside the movie...
    Anyone had this? Does it makes sense?
    Thanks

    Hi,
    Yes. Well spotted. I had the instance name of buttText_mc,
    missing the _mc part on a few frames with motion tweens applied, on
    the button animation. I do not remember renaming it differently ;)
    - must blame tools ;)
    Kind Regards,
    Boxing Boom

  • Multiple instance of UIscrollbar problem

    Hi,
    In a project I have 10 textfields that I turn visible or insivible according to need. Some of those textfields must scroll. I used the UIscrollbar and it worked fine until I added another textfield that used it. At first, I thought it was the variable names and changed them all but it still didn't work.
    The only way I can make this work right now is by putting all my text movieclips (containing the textfieldand, scrollbar, etc) directly on stage instead of all in one container MC for all my text movieclips. That's really impractical.
    Is there any reason the UIscrollbar refuses to work in more than one instance if the MC they are in is inside the same MC?
    To explain better here's a bit of my code:
    private function createTxt():void
                   var mcEncadre:MovieClip;
                   mcEncadre = new MovieClip();
                   mcEncadre.name="txt3";
                   //mcEncadre.alpha=0;
                   zoneTxt_mc.addChild(mcEncadre);              
                   creerEncadre(mcEncadre,1,668,181,0x676767,0,0);
                   txt = creerTxtfield(mcEncadre,txtExpl_arr[2],txtExpl_fmt,627,150,25,20);
                   txt.wordWrap=true;
                   var vScrollBar:UIScrollBar = new UIScrollBar();
                   vScrollBar.direction = ScrollBarDirection.VERTICAL;
                   vScrollBar.move(txt.x + txt.width, txt.y-19);
                   vScrollBar.height = txt.height+29;
                   vScrollBar.scrollTarget = txt;
                   mcEncadre.addChild(vScrollBar);
                   mcEncadre = new MovieClip();
                   mcEncadre.name="txt10";
                   //mcEncadre.alpha=0;
                   zoneTxt_mc.addChild(mcEncadre);              
                   creerEncadre(mcEncadre,1,668,181,0x676767,0,0);
                   txt = creerTxtfield(mcEncadre,txtExpl_arr[9],txtExpl_fmt,627,150,25,20);
                   txt.wordWrap=true;
                   var vScrollBar2:UIScrollBar = new UIScrollBar();
                   vScrollBar2.direction = ScrollBarDirection.VERTICAL;
                   vScrollBar2.move(txt.x + txt.width, txt.y-19);
                   vScrollBar2.height = txt.height+29;
                   vScrollBar2.scrollTarget = txt;
                   mcEncadre.addChild(vScrollBar2);
                   vScrollBar.update();
                   vScrollBar2.update();
    I tried .update() and it changes nothing. With this code only the first scrollbar works but if I add the second mcEncadre directly to the stage instead of to my text container (zoneTxt_mc) then they both work. Urgh!
    Anyone encountered this before?

    A spelling or punctuation mistake, or sometimes a trailing space usually causes this after the artists and/or song/album name, which fools the iPod into thinking that there are two different artists, albums or songs. The trailing space is the hardest to spot.
    Best way to cure this is to go into iTunes, highlight that artist and/or songs/albums, right click on them and select "get info".
    This brings up the multiple song info window. If you see the "artist" field is left blank, then there is a discrepancy with that name.
    So to correct this, retype the name, as you would like it, and then click ok. You should do this even if no mistakes are immediately visible.
    Re sync this new artist/song/album info to your iPod.
    If the above is not the issue, try this also. Highlight all the songs for that artist, right click on them and select "apply sort field/same artist".
    See if that works.

  • Problem with UIScrollBar

    I've used this many times in the same exact fashion, but I've
    never run into this problem:
    I've got a movieclip on which there is this code:
    onClipEvent(load) {
    loadVariables("content.txt", this);
    onClipEvent(data) {
    nextFrame();
    In that movieclip:
    - there's a stop(); on the actions layer on frames 1 and 2
    - there's a dynamic text box with the UIScrollBar attached
    onto it on the 2nd frame
    This works for me every other time I've tried it, but now I'm
    getting a funky problem, which is this:
    It displays all the text correctly, however, when I go to
    scroll it, it looks like the text was loaded in twice, because the
    text scrolls, but also there is a copy that stays put. I've checked
    multiple times to make sure that I didn't have doubles of the
    dynamic text field... I just can't seem to fix it. Any
    ideas?

    When you write to a textfield that has a scrollbar assigned to it, you need to refresh the scrollbar if you change/add text after the file is playing.  I don't have the help documents available at the moment, but if you should be able to look thru the UIScrollbar methods and find the method that is used for this... possibly reset() or refresh() or update().  So once you write to the textfield, use that command to make the scrollbar readjust to the new next situation.

  • Little probleme with UIScrollBar

    Hi,
    Im having a problem with my UIScrollBar.,
    I have a dynamic text field "My_text" in the scene.  the text is aplied to it  dynamicly    like this: My_text=String(theVarText). The text appear but the scroll dont scroll. but if i set the text in the textfield in the actual FLA and export the movie, the scroll works, Can someone tel me WHY ??

    When you write to a textfield that has a scrollbar assigned to it, you need to refresh the scrollbar if you change/add text after the file is playing.  I don't have the help documents available at the moment, but if you should be able to look thru the UIScrollbar methods and find the method that is used for this... possibly reset() or refresh() or update().  So once you write to the textfield, use that command to make the scrollbar readjust to the new next situation.

  • Text area and UIScrollbar - CS3/AS2

    I have a problem with the UIScrollbar component not being
    visible when the movie is generated in CS3/AS2.
    Following the method shown in
    this
    TechNote, the scrollbar displays correctly when the text area
    is the only frame in a movie.
    In the real movie I'm working on, however, the text area is
    in a library item. In that item's definition, I've dragged the
    scrollbar onto the area and the component's targetinstancename
    parameter shows the correct name of the text area. But while the
    text area displays when I preview the movie, the scrollbar is
    invisible. Making it more puzzling, if I guess where it is, I can
    drag it.
    Any thoughts?
    John

    I tried this but the text looks warped and much different than it should. Seems anyway I embed it in the properties panel looks this way.. any other options??

  • Displaying Text as HTML in the UIscrollbar component

    Greetings.
    I have a window on my Flash stage that has some scrollable copy in it.  The problem is, I can't seem to have any formatting for the text ... if I select a word or two to make bold, it all turns bold.  I gather I need to use the "Display Text as HTML" checkbox and then paste in some HTML formatted text but this doesn't seem to work.  I searched this forum and found that others were designating "htmlText" in Actionscript instead of just "text" ... that didn't work either.  I probably just did it wrong, or maybe it's becuase I'm using the UI component "UIscrollBar" for it's scrolling of the text.
    Is there anything else I need to do to be able to format some text with strong tags and maybe some href links?
    I have my properties inspector with the following check marks:
    Display as HTML
    Multiline
    Dynamic Text
    selectable
    Thanks everyone.

    Shamelss bump

  • How can I set down the UIScrollBar of my TextArea?

    Hello world...
    I have a little problem:
    I have a TextArea for a Chat. When I write a lot, the UIScrollBar remains on the top of my TextArea...
    I'd like my UIScrollBar is located at the bottom of TextArea...
    Can someone help me?
    Thanks.
    Emiliano.

    Try using the following code after each time you write to the TextArea.  I am assuming you are using a TextArea component and are trying to control the position of where it is scrolled to when it refreshes with the chat data.
    "ta" is the instance name of the TextArea
    ta.verticalScrollPosition = ta.maxVerticalScrollPosition;

  • How to Scroll the UIScrollBar component to the top?

    I'm using the UIScrollBar with a dynamic text field. If
    content gets scroll by the user, and then the text fiel dis update
    with new text, the new text remains "pre-scrolled". So, obviously,
    I want to set the scroll position to 0 every time I update the
    content in that field. But how do you do this?
    Is this something I do to the text field or to the
    UIScrollBar component?
    What is the method?
    Could somebody please give me an example?
    Thanks in advance...

    Silly me, I think I walked past this one several times
    thinking I had tried it.
    // To scroll the UIScrollBar to the top
    info_txt.scrollV = 1;
    My problem was that I was using the parantheses to pass the
    value, like this:
    // This doesn't work
    info_txt.scrollV(1);

  • Update for UIscrollBar

    I have a scene with 3 buttons that each type a text in a textbox when I click. The third text that appears require a scrollbar which I have. My problem is that I´ve finally find out that I need an Update to make it work. I searched, and did it like this:
    knapp3.addEventListener(MouseEvent.CLICK, showStringIn);
    function showStringIn(Event:MouseEvent):void {
    var myString:String = textbox.htmlText;
    textbox.multiline = true;
    textbox.htmlText = "VINTER ,<i> VÅR </i> SOMMAR,<i>HÖST</i> ,VINTER,VÅR,SOMMAR,HÖSTVINTER,VÅR,SOMMAR,HÖST,VINTER,VÅR,SOMMAR,HÖSTVINTER,VÅR,SOMMAR,HÖS T,VINTER,VÅR,SOMMAR,HÖST"
      scroll.update();
    Where scroll is the name on my UIscrollbar. The scrollfunction now works but I get an error:
    TypeError: Error #1009: Det går inte att få åtkomst till en egenskap eller metod för objektreferensen null.
        at uppgift4_fla::MainTimeline/__setProp_scroll_Del3_textbox_0()
        at uppgift4_fla::MainTimeline/frame1()
    When I put this scene toghether with other scenes that I made.
    I´m new on ActionScript 3, but I wan´t to learn!
    Can anyone give me a hint?

    If the problem only exists when you are using multiple scenes, then there is a problem with something in one or more of those scenes. My first guess is that there is/are duplicate instance names, or function names in more than one scene.
    Scenes are an archaic design method that is left over from the earliest versions of Flash. It is best to not use them.

  • FB 4.5 and UIScrollBar

    Hi everybody,
    I am working on a project: I have a FLA file set to publish for AIR 2.6 with all the assets inside. I've set up a Flash Professional Project in FB 4.5.
    The problem is that I have a UIScrollBar in the FLA file. If I try to retrieve this object from a class file within FB, it is not recognized. I can still publish the file within flash without problems but the errors in FB are not nice and I miss the code hinting. I get errors like:
    1046: Type was not found or was not a compile-time constant: UIScrollBar.
    1172: Definition fl.controls:UIScrollBar could not be found.
    Is this because FB is using the 4.5.1 Flex SDK and not the 2.6 AIR SDK? Is there a way to set this correctly?
    Thank you!
    F.

    Hi,
    I found this article:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f2d.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7f34
    I follow adding new locales.
    Still have the error:
    unable to open 'C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\frameworks\locale\en_US,es_ES'
    I'm sure something simple is missing.
    Any ideas?
    It is a way to attach my test app zip file here?
    Thanks

  • UIScrollbar creates conflicts

    Hi!
    I've just a strange thing happening; I managed to succefully
    use a dynamic scrollbar, everything worked perfectly, but then,
    willing to add some UIScrollBars to my existing flash 8 site, I
    found that just the pasting (and immediate deleting) of the
    component on the scene would "corrupt" my programmation; some
    strange things would happen (incorrect load of external jpgs i.e.),
    any idea of what would be the cause and eventual solution?
    Tks for your advice & help

    The solutioin should be deleting everything related to the
    ui-comp not only from stage but from the libeary too.
    The problem (I find most annoying) with v2 components is,
    that the break al regular depth management and introduce the (in my
    eyes) cumbersome textmanager.
    So essentially you should decide upfront if you want to juse
    version 2Components or will not ever, at least not afert having a
    considerably complex project.
    They are quite heavy in size, and not really easy to
    customize (in terms of looks) I mosly use them for building
    "boring" frontendt for adnimstring websites or stuff like that, the
    are helpfull there, but I don't like them for public placement in
    websites.
    my 2 cents

  • UIScrollBar not showing arrows

    I'm working on an FLA from templatemonster, you know, the
    ones with a lot of nested MCs and default named layers.
    What I'm Trying To Do
    Add the UIScrollBar component to a dynamic text box.
    Symptoms of the Problem
    Just displays a white rectangular box that has a border with
    the exact same height as the text box.
    What I've Tried Already
    - Renaming the default _targetInstanceName and instance name
    on the dynamic textbox. --Fails
    - Importing External Library StandardComponents.fla and
    dragging UIScrollBar to my library --Fails
    - Copying all of the symbols inside of the nested MC and
    pasting them into a new Flash document and then adding the
    component there --Works
    - Going to the root of the timeline, adding a new layer,
    textbox, and attaching the UIScrollBar --Fails
    - Checked the UIScrollBar properties: Export for Actionscript
    and Export in first frame checked --Fails
    Note: When I attach the UIScrollBar I drop it
    ON the text box and it's set to dynamic. By fails I mean I'm
    still having the same problem.
    What I'm Not Trying to Do
    Load external data(text)
    Has anyone ran into the same problem? I've already spent
    about 2 hours researching this problem. It seems like the answer
    isn't obvious.

    I am having an identical problem with the UIScrollBar, but
    after downloading those components, it still doesn't work. I also
    tried importing them but the components are grayed out and I cannot
    select any of them. I still always get a white rectangle where the
    scrollbar should be. External text is coming in just fine,
    scrollbar snaps to and automatically picks up the name of the text
    area. Just doesn't work. I'm using Flash MX 2004 on an Intel Mac
    laptop.

  • Trying To Add UIScrollbar To Flash Website But FLA File Has No Layers

    I was asked to add content to a flash website page... When I open the FLA file, there are aboslutely no layers for me to work with. I found an .as file that contained the page content and so I added the needed content there. But this is where I run into a problem. I'm fairly new to flash so perhaps this is common. After adding the additional content, the content now extends vertically and beyond the page borders. In doing research, I discovered that the solution is to change the TextField to "dynamic" and add a UIScrollbar during the build. I've learned to do this but the problem remains that I don't have any layers to modify for this particular website. Can someone explain why or how I can find the layers for this file? I am using Flash CS3... and unsure what version the original designer was using. I guess another option is to add a UIScrollbar to the website by modifying the .as file directly. Can this be done? Please help!

    It appears that the only items in the library are movie clips and a couple bitmaps. Here is a screenshot of my FLA file when opened in Adobe Flash: http://www.flashvideopro.net/images/flash_screenshot.jpg. Any ideas from what you see? I'm fairly new to Flash, but I have never before opened up an existing flash file for a flash website without seeing the layers for the site. Apparantly there are different ways to create flash content? Could it be that the textlayer I am looking for is hidden in a movie clip? And if that's the case would this be editable? I menitoned in my original post that I can actually edit the page in the main.as page as you see in this image. But I have no clue how to add a UIScrollbar without having the textlayer in front of me. The FLA file I am trying to edit is for global and trendy links (dot) com.

  • UIScrollBar text htmlText

    Hi,
    I hope somebody can help me with this.
    I want to add a horizontal scrollbar to a textfield that shows the text in HTML format.
    When I try that in other documents without scrollbar I get it to work.
    In the code bellow, which I mainly took from the Actionscript Reference, the code works when I use text (like in the Actionscript Reference).
    But when I change it to htmlText to get it HTML formatted (and get rid of the HTML codes) the textField doen't show anything.
    May be somebody can point me out where I go wrong.
    I greatly appreciate your help,
    Jos
    The code:
    import fl.controls.ScrollBarDirection;
    import fl.controls.UIScrollBar;
    var myTextField:TextField = new TextField();
    myTextField.width = 160;
    myTextField.height = 120;
    myTextField.border = true;
    myTextField.x = 10;
    myTextField.y = 10;
    addChild(myTextField);
    var hScrollBar:UIScrollBar = new UIScrollBar();
    hScrollBar.direction = ScrollBarDirection.HORIZONTAL;
    hScrollBar.scrollTarget = myTextField;
    hScrollBar.width = myTextField.width;
    hScrollBar.move(myTextField.x, myTextField.y + myTextField.height);
    addChild(hScrollBar);
    var myURLLoader:URLLoader = new URLLoader();
    myURLLoader.addEventListener(Event.COMPLETE, completeHandler);
    myURLLoader.load(new URLRequest("http://localhost/xxx/xxx/xxx.php"));
    function completeHandler(event:Event):void {
        var txt:String = URLLoader(event.currentTarget).data as String;
        myTextField.htmlText = txt;
        hScrollBar.update();

    I don't see a problem if I use your code and some static html text instead of loading from a file.  Are you sure your txt variable holds what you expect it to?  Does the data contain quotation marks that might be interupting the text?
    Aside from that, it kind of does not make sense to have a horizontal scrollbar along with a height that is greater than one line of text

Maybe you are looking for

  • PR to PO and Reservation to PR

    How to find the Table link between PR & PO and Reservation & PR? EKPO>>> BANFN >>> EBELN  (PR to PO) RESB >>> BANFN (reservation to PR) Is the above correct? Advice me on this RS Edited by: Ramapuram Saravanan on Mar 8, 2009 11:50 AM

  • Adobe download assistant download not complete

    adobe download showed download completed but every next time i open my system and check for acrobat it again shows download in process..what to do?

  • Macbook vs Ultrabook

    Hi there! I am planning to buy a new Macbook Pro after selling my HP Windows 7 laptop. i have heard about this new Ultrabook series of laptops. but what makes a Macbook Pro better than an Ultrabook? Thanks.

  • My WishList  of features for next Version

    Hi Team, As  Developer I really love Catalyst,It does complete my FlashBuilder development experience  all the way, but still  I would like to share some of my wishes on features that could be nice to have  for next Version: 1) Build but dont automat

  • How do I get a picture to stay when I move and scale it for my home screen?

    How do I get a picture to stay when I move and scale it for my home screen?