# \[CS3\] getting a textfield to scroll when only comprised of images

**URL:** <https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658>\
**Category:** flash\
**Created:** [July 11, 2008, 3:03am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658 "2008-07-11T03:03:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 3:03am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/1 "2008-07-11T03:03:54Z")

</div>

I thought that I’d just do a quick post while I’m looking around for some info, but here’s my question. I’m going to populate a textfield created with actionscript completly with .png images. The problem is that the scrollBar/textField doesn’t seem to register that the image is larger than the viewable area, and after a scrollBar.update call, the scrollbar appears as it would if the textfield was populated text that is contained with the viewable area. in other words, you can’t scroll and look at the entire image. Does anyone know of a workaround? I know that I have the scrollbar set up properly because I was previously loading a lot of text into the textfield and it was scrolling properly. I changed to an image without changing any of the code that would affect the behavior of the scrollbar.

---

<div class="post-metadata">

**Author:** ![saxx](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@saxx](https://forum.kirupa.com/u/saxx)\
**Post date:** [July 11, 2008, 3:16am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/2 "2008-07-11T03:16:56Z")

</div>

Did you design your own? because theres sevral here on kirupa that will do what you want

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 3:19am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/3 "2008-07-11T03:19:54Z")

</div>

i was just using the default component, and was going to change the skins. You mean in the tutorials there’s a selection of scrollbar tutorials instruction on this exact issue? cool, I was searching the help docs for info on why the scrollbar.update wasn’t working. thanks for the pointer saxx!

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 3:24am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/4 "2008-07-11T03:24:33Z")

</div>

I was also thinking of changing the textfield over to a sprite with a mask so that I could just move the .y position of the container sprite to create a scrolling effect.

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 3:38am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/5 "2008-07-11T03:38:25Z")

</div>

This question is sort of morphing for me, but Any feedback could be interesting and appreciated. I was wondering if anyone new if there’s a way to link the scrollbar position to the y property of a sprite? Unless I’m mistaken, I didn’t see anything in the help docs. The property I need is the total size of the image. It seems like there is some calculations that are going on in the background of scrollBar.update that they didn’t give the developer the ability to adjust and control. But again, I haven’t experimented with it yet, as I’ve only read the docs, so perhaps that is my undoing.

---

<div class="post-metadata">

**Author:** ![saxx](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@saxx](https://forum.kirupa.com/u/saxx)\
**Post date:** [July 11, 2008, 3:38am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/6 "2008-07-11T03:38:39Z")

</div>

let me see if i can find the scrollbar i’m using at the moment. I don’t remember where i got it exactly but here it is

edit  
I don’t have a very good understanding of sprites 😃  
I’m not sure about your other question, could you explain a bit more?

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 4:03am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/7 "2008-07-11T04:03:57Z")

</div>

Thanks saxx for your file. It works and is helpful, but my other questions are still unanswered:red:

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 11, 2008, 4:31am UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/8 "2008-07-11T04:31:10Z")

</div>

I found out that there is a scrollevent class that allows you to access the events of the scrollbar. That’s what I needed. thanks for your help saxx!! apreciate it greatly!

---

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [July 12, 2008, 8:36pm UTC](https://forum.kirupa.com/t/cs3-getting-a-textfield-to-scroll-when-only-comprised-of-images/265658/9 "2008-07-12T20:36:27Z")

</div>

Thanks for your help amarghosh! I had not found that method yet. which reminds me, I need to look more carefully at the docs.

I appreciate because of your help!
