# Flash-db guestbook scrollbar

**URL:** <https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308>\
**Category:** Uncategorized\
**Created:** [June 28, 2003, 7:03pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308 "2003-06-28T19:03:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![teet](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@teet](https://forum.kirupa.com/u/teet)\
**Post date:** [June 28, 2003, 7:03pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/1 "2003-06-28T19:03:51Z")

</div>

I followed the tutorial on flash-db to create your own guestbook. Everything works great on it except the scrollbar. This tutorial was written for Flash 5…before components.

My question is, does anybody know how to make the flash mx scrollbar component work with it. I know other people have had problems with it…I found one thread where electrongeek “fixed” the problem by changing the text field to input text and hitting return a bunch of times…I tried this, but it didn’t work for me.  
(you can see the problem with the scrollbar at [http://www2.truman.edu/~dat725/guestbook/GuestBook.swf](http://www2.truman.edu/~dat725/guestbook/GuestBook.swf) )

Any help would be greatly appreciated. Here’s a link to the \*.fla if you need it.

[http://www2.truman.edu/~dat725/guestbook/GuestBook.fla](http://www2.truman.edu/~dat725/guestbook/GuestBook.fla)

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 7:44pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/2 "2003-06-28T19:44:14Z")

</div>

I posted a fla once here:  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24908&perpage=15&highlight=scroll%20button&pagenumber=2](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24908&perpage=15&highlight=scroll%20button&pagenumber=2)

maybe it’ll help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 10:16pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/3 "2003-06-28T22:16:36Z")

</div>

thanks freddy…if nobody can figure out the scrollbar thing, i’ll do something like that. the only reason i was wanting to use the component scrollbar is b/c that’s what i use elsewhere in my site…i suppose i could change ALL the scrollbars (like all 4 of them haha)

🙂

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 10:54pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/4 "2003-06-28T22:54:59Z")

</div>

Yeah, I don’t know why but sometimes those components just don’t work. I don’t get it. I looked at your fla and it should work. Good luck in whatever you choose to do.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 11:16pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/5 "2003-06-28T23:16:11Z")

</div>

i THINK it might have something to do with the instance name business…since there wasn’t an instance name in flash 5, when you add one in it screws up something

just my guess.

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 11:17pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/6 "2003-06-28T23:17:49Z")

</div>

do you have a copy of the php script by chance? that is really nice.

Where is the tutorial for a guestbook?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 29, 2003, 3:39am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/7 "2003-06-29T03:39:26Z")

</div>

here is the link to the tutorial i followed

[http://www.flash-db.com/GuestBookTut/GuestBookDoc.php](http://www.flash-db.com/GuestBookTut/GuestBookDoc.php)

and here is the sample guestbook they show in the tutorial (with the PHP script and everything)

[http://www.flash-db.com/GuestBookTut/GuestBookTutorial.zip](http://www.flash-db.com/GuestBookTut/GuestBookTutorial.zip)

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 29, 2003, 5:46pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/8 "2003-06-29T17:46:34Z")

</div>

Are you sure it´s not just a cache problem. I had the same problem with loading text dynamically when using the scrollbar component and someone solved it for me ( think it was kax?).

Just add this in the end of your loadVar code

[AS]+new Date().getTime()[/AS]

but I would be suprised if this wasn´t already thought of in the code but it could be worth a go  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 1:51am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/9 "2003-07-01T01:51:19Z")

</div>

update:

i gave up on the component scrollbar idea…i went with something like freddy suggested. so now the scrollbar issue is resolved (well, at least it works).

i now have a new problem. the GuestBook.swf works fine when I view it alone, but I want to load the swf through my main site (if i were just going to do it in a popup, i wouldn’t be using a flash guestbook!). I can load the SWF just fine in the main SWF, but it doesn’t display any of the guestbook entries. i suck at actionscript (slowly learning) and I figure i need to change some “root” to “parent” or something like that.

If you don’t understand what I mean, go to [http://www2.truman.edu/~dat725/GuestBook.swf](http://www2.truman.edu/~dat725/GuestBook.swf) --this SWF works fine

Now go to, [http://www2.truman.edu/~dat725/main.htm](http://www2.truman.edu/~dat725/main.htm) and click on the “contact” link (i know it’s half off the page, but you can tell it isn’t working).

here’s a link to the GuestBook.fla if you need it. [http://www2.truman.edu/~dat725/GuestBook.fla](http://www2.truman.edu/~dat725/GuestBook.fla)

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 3:08am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/10 "2003-07-01T03:08:51Z")

</div>

I didn’t look at it, but I will if you need me to. \_root. means to go back to the main movie - no matter what. \_parent tells an object like a movie clip or variable to go to the timeline that it is in. What I would do is take out all the \_root.'s that you have in that movie you’re loading in (the guestbook one)- that way all the variables will reference back to the guestbook’s timeline instead of the original, main-movie timeline (know as \_root)

I don’t know if that helped or hurt you…either way, good luck!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 3:38am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/11 "2003-07-01T03:38:05Z")

</div>

i really appreciate all your help.

here is the problem. this small piece of actionscript is what actually tells flash to load the text file via the PHP script (i think).

* * *

NumLow = 0;  
NumHigh = 10;  
loadVariablesNum (“GuestBook.php?NumLow=”+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 0);  
stop();

* * *

so there isn’t really any “root” to take out…there is some on the buttons…the previous, next, and submit…but that wouldn’t affect the actual text from the entries from loading (or would it).

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 3:45am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/12 "2003-07-01T03:45:50Z")

</div>

update: i changed all the “root” on the submit button (the previous and next button didn’t have any) to “parent”

nothing changed…

here’s my new theory…the variable name on the Guestbook text field (where the entries actually go) is “GuestBook” —\>is loading the Guestbook SWF through another SWF somehow screwing up the variable name?

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 1:44pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/13 "2003-07-01T13:44:15Z")

</div>

I’m not sure, I’m at work now and don’t have Flash, but I will look at your fla after work. In the mean time try this. If I’m understanding correctly, you need to refer to a var called ‘guestbook’…If so (presuming the movieClip that you load your external swf file to is called ‘container’) try:  
[AS]  
\_root.container.guestbook  
//when refering to that variable  
[/AS]  
That way, Flash will start at the main timeline, then go to the timeline in the movieClip, then to the variable.

That’s what I would try. I’m learning this PHP/MySQL thing as we go as well, so I can only offer suggestions until I look at it later. Hope it helps anyhow!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 6:39pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/14 "2003-07-01T18:39:09Z")

</div>

hmmm…not sure what you mean exactly, but i tried changing the actionscript on the “contact” button from

on (release) {  
\_root.contents.loadMovie(“GuestBook.swf”);  
}

to

on (release) {  
\_root.contents.GuestBook;  
}

somehow, i don’t think that is what you were meaning.

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 1, 2003, 11:21pm UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/15 "2003-07-01T23:21:22Z")

</div>

No, that’s not what I meant. I actually just took a look at it and it’s beyond me. Logically, it shouldn’t matter if the flash movie containing the guestbook is on the root or not.

What I meant was in your PHP script, instead of saying:

```php

print "Guest Book="$whatever;
// to
print "_root.contents.Guest Book="$whatever;

```

because the Guest Book is on the \_root timeline of contents. If that’s how you’re sending your vars back; I’m not sure, but that makes sense to me all of a sudden. Yeah, I hope that works…Let me know…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 2, 2003, 3:47am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/16 "2003-07-02T03:47:14Z")

</div>

that did the trick…just modified a line in the PHP script like you said

thanks for all your help man…if you ever need anything just holla

-teet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 2, 2003, 6:10am UTC](https://forum.kirupa.com/t/flash-db-guestbook-scrollbar/24308/17 "2003-07-02T06:10:14Z")

</div>

…word…😛
