Article View: adobe.atmosphere
Article #28907Re: Reusing the subworld file
From: Rolu
Date: Thu, 09 May 2002 01:45
Date: Thu, 09 May 2002 01:45
26 lines
2162 bytes
2162 bytes
"Norm Lindenberg" <nlindenberg@home.com> wrote in message news:ef86495.5@WebX.aaQKaf7vad4...
> Rolu,
>
> Thanks for clarifying the picture.
>
> I recoded as you suggested and while the mouse overs work they still all seem to be sharing the same function. The code below is a
condensation of the portion of the script involved.
>
> vsw.onWorldLoad=function(succ) { this.world.onMouseOver = function() {chat.print("You are pointing at "+vsw.Name);} }
>
> vsw = SubWorld("<file name>").add(); vsw.Name = "<subworld name>";
>
> The above two statements are repeated for each subworld to be created.
>
> Each subworld is given a different position; they are being created and placed at the correct locations. However, when mouse overs
are done they all report the name of the last subworld created.
>
> Do you see any obvious mistakes?
Are you calling every subworld vsw? Your print statement is chat.print("You are pointing at "+vsw.Name), that prints the Name
property of whatever object is currently in the vsw variable. You should give every subworld a different name - vsw1, vsw2, etc.
Also, put the onWorldLoad line after the SubWorld line for every case. If that doesn't help, post the full code - maybe something
else is influencing things too.
Rolu
Technical Details
Message-ID:
<151E27AC8E6C8525F08107C03006BDFC@in.WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef86495.-1@WebX.aaQKaf7vad4> <ef86495.5@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa820,71055f44dd0e58e2 X-Google-Attributes: gidfa820,public X-Google-ArrivalTime: 2002-05-08 19:07:47 PST From: "Rolu" <rolu@roce.org> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.atmosphere Subject: Re: Reusing the subworld file Message-ID: <151E27AC8E6C8525F08107C03006BDFC@in.WebX.aaQKaf7vad4> Date: Wed, 8 May 2002 18:45:14 -0700 References: <ef86495.-1@WebX.aaQKaf7vad4> <ef86495.5@WebX.aaQKaf7vad4> Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit