PDA

View Full Version : Hide object -Show object problem... bug??


Pupi
12-09-2002, 01:34 PM
Hi guys:
i have come across a weird behavior in AMS4. Hopefully someone has a workaround. I have this page were i place pictures (image objects) on top of one another. Of course only the topmost is visible at any time. Then i make them cycle with succesive hide obect, show object commands. The problem is that the very first click on the image, does nothing. After that, the cycle begins and flows smoothly, but the first click after loading the page seems like its null. In other words i have to click on the image twice when i first load the page with the photos but after that everything is fine. Has anyone come across this behavior before?. BTW i have tried refresh, hide object twice before show object, but nothing seems to make the cycle snap as soon as the page is loaded. Help!
Mark

Worm
12-09-2002, 03:55 PM
How are you hiding them? It sounds like you're using a variable that hasn't had a default value set. Once the image is clicked the first time, the variable is being set, hence the next click does what you wanted.

Pure speculation though...

Pupi
12-09-2002, 04:55 PM
I hide images with the hide object command followed by show object command for the second image (the one underneath. Something like this:
On MouseClick
Page.HideObject(ImageObject2)
Page.ShowObject(ImageObject2)

The top image goes down and the bottom image goes up in the stack.

Pupi
12-09-2002, 05:50 PM
if this were the case. Please show me how to set the variable
Tnaks in advance
pupi

Worm
12-09-2002, 08:16 PM
Here is an example... I did the same as your post, and it works for me here. If this doesn't work, make sure you are on the latest version,

Get it here. (http://www.warmuskerken.com/ams/imagestack.zip)

Pupi
12-09-2002, 08:58 PM
ok let me try it.
I'll let you kno how it goes