Flash-db guestbook scrollbar

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 )

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

-teet

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

maybe it’ll help.

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)

:slight_smile:

-teet

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.

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

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

Where is the tutorial for a guestbook?

here is the link to the tutorial i followed

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

-teet

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
:slight_smile:

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 --this SWF works fine

Now go to, 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

-teet

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!

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

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

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!!

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

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:


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…

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

…word…:stuck_out_tongue: