"Ralph??" <ravensha@stis.net> writes:
[color=blue]
> I'm trying to use object pointers to access/modify various properties of
> various layers.
> The problem i'm having is that pointers created within my functions dont
> have world scope even though the variables used are world variables.[/color]
....[color=blue]
> Now when switcher(a) is called lines 1 & 2 do not effect the 2 layer's
> z-index while line 3 does what I want it to.
> So I'm assuming that the object pointers created in initIE() are not given
> world scope.[/color]
They are, but they don't work as you seem to expect them to.
After initIE, you have two object references, lyr1 and lyr2, each
pointing to a style object. Inside that style object is a property
called "z", which has nothing to do with the style of an element. It
currently holds the same value as the "zIndex" property of the same
element. Changing the "z" property does nothing to the "zIndex"
property.
[color=blue]
> How do I rectify this?[/color]
Forget the "z" property and change the two first lines of switcher to
lyr1.zIndex = 9;
lyt2.zIndex = 8;
/L
--
Lasse Reichstein Nielsen -
lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'