Hello all!,
my first post here! I’ve visited Kirupa a lot, though, as it’s always been fairly straightforward and never overly technical - just what I like!
My problem is this.
I have a static shopping centre floorplan with movieclips for each unit. There is also a list of the stores fed in from an XML page. When they rollover either the unit on the floorplan or the storename in the list, a little information panel appears for each store.
All that’s fine.
The problem is I want the corresponding unit to highlight when the text is rolled over and vice versa, but just can’t seem to get it to work!!! You would think that would be the easy part.
I have a variable - currentunit - which I pass from the onRollover. This is the same as the corresponding instance name of the floorplan unit.
I though I could use something like
[currentunit]gotoAndPlay("_over");
but no success.
I’d be grateful for your thoughts…
Ta
Oh,
I think it’s a syntax thing - this seems to get me close to what I need.
**_root[currentunit].gotoAndPlay("_over"); **
Hi sugarfree,
I’d be interested to see your fla if possible, as am working on a something similar, a rollover map of london boroughs.
cheers
dfg
Yes it is, when targeting vars in the square brackets, it has to be appended with this or _root or wherever it is, you can’t start a line with the square brackets.
HOwever the square brackets are usually used to target multiple variables in a loop, I don’t see why you need them at all here.
Doctor - an flv is a video file.
[quote=rumblesushi;2336331]
Doctor - an flv is a video file.[/quote]
noted, thanks 
[quote=rumblesushi;2336331]Yes it is, when targeting vars in the square brackets, it has to be appended with this or _root or wherever it is, you can’t start a line with the square brackets.
HOwever the square brackets are usually used to target multiple variables in a loop, I don’t see why you need them at all here.
Doctor - an flv is a video file.[/quote]
Hi,
it doesn’t work when I don’t have the brackets.
I guess, could it be cos my rollover function needs to ‘evaluate’ the currentunit variable?
Either way, just glad it seems to work!
function btnOnRollover(){
currentunit = this.unitid.text;
_root[currentunit].gotoAndPlay("_over");
//this.menubg.gotoAndPlay("_over") ;
GetPage();
}
[quote=doctorfeelyg;2336322]Hi sugarfree,
I’d be interested to see your fla if possible, as am working on a something similar, a rollover map of london boroughs.
cheers
dfg[/quote]
Hi,
I’ve still to tidy it a fair bit. I’ll get back to you! :thumb2: