PDA

View Full Version : Hide object problems


yoni
06-14-2003, 01:01 PM
I'm having a problem I just can't figure out. It's either a bug of some sort or I've completely misunderstood the hide object command (which is much more likely). I'm hoping someone can enlighten me as to what's going on.

Here's what I want to happen, what I've done, and what's happening:

I've got a page that has a flash object on it. I want that object to have the file preloaded on it (which as far as I understand makes it start playing faster when activated. RIght?) and remain hidden until the user clicks a button on my APM page at which point it will appear and start to play.

So I've set the page's On Initialize properties to first hide the object and then load the file.
Next I set the button to show the object and then play it.

It sounds like it should work to me, but when I preview the page, and click on what should be the play button, I get an error message that says the object was not found on the page. If I disable Hide object on initialize command the flash plays fine, but I would like to be able to keep the object hidden till i want it to appear.

Could someone please let me know where I've gone wrong. I can post my actual scripts if it helps, but it's just straight actions.

Thanks.

yoni
06-14-2003, 01:34 PM
I'm sorry. I've found my problem. I honestly wouldn't have posted if I hadn't been trying to figure it out for over an hour without any luck.

While I'm here though, is there a simple way to have a click on one object disable the properties of other objects until an action is performed?

What I'm looking for is after a user clicks on a button to start the flash object playing, I'd like them not to be able to click on any other buttons until an FScommand executes but I don't want to hide the buttons. Is this possible?

THanks all again.

TJ_Tigger
06-14-2003, 04:22 PM
Sure is. When the user click the button to show the Flash object, set a variable at the same time. Something like %Clickable% = "FALSE". Then on all of the other buttons on the page put this at the top of the actions list,

IF (%Clickable% = "FALSE")
RETURN
ENDIF

What that will do is check to see if the %Clickable% variable is FALSE and if that is a true statement, the RETURN command will stop processing any other actions on the list. To make sure that the buttons are clickable, I would set the %Clickable% variable to TRUE when the page initializes.

When your Flash Object ends, use the ON FSCommand to set %Clickable% back to true.

That is how I would approach it.

yoni
06-14-2003, 04:35 PM
Thanks Tiger. That makes perfect sense.

Using this way, it doesn't seem that you would be able to disable the roll over actions (as in the actions that are defined under Captions and Sounds) without creating a set of dummy buttons. But I've been suprised by the things people know that I hadn't thought of, so is there a way to do that?

thanks again.

TJ_Tigger
06-15-2003, 08:41 AM
Actually you could do that as well. You would need to remove the sounds from the Sound tab and play the sound you want on the 'On Mouse Over' action page using the Wav.Play action. I am not sure how you would hide the graphics change on the mouse over unless you went the route you mentioned with using dummy buttons.

HTH
Tigg