[dirGames-L] asigning castmember to sprite

nik crosina ncrosina at gmail.com
Wed Dec 21 02:30:58 EST 2005


"but I'll use my native language as the default on a project."

that's what I did and it now works fine even in run time mode which
was the big roblem before,

thx
nik c


On 12/21/05, Mark Castle <markie at the-castle.com> wrote:
> The way I typically approach this is to use a separate castLib for each
> language. You can even have an "empty" one with members that are placeholder
> only, but I'll use my native language as the default on a project.
>
> When the movie runs, it's linked to the default castLib (native language or
> "empty" castLib)
> Code determines what language you should be displaying for, and the castLib
> path is set on the fly to the correct castLib.
>
> The thing to note is that each castLib needs to have the exact same members
> in the exact same places. Same kind, same size, etc. It's pretty simple once
> you get your head around it. One line to swap the castLib, and no other
> code.   :-)
>
>
> Markie
>
> -----Original Message-----
> From: dirgames-l-bounces at nuttybar.drama.uga.edu
> [mailto:dirgames-l-bounces at nuttybar.drama.uga.edu]On Behalf Of nik
> crosina
> Sent: Tuesday, December 20, 2005 5:34 PM
> To: Director - Shockwave - and Flash Game Production
> Subject: Re: [dirGames-L] asigning castmember to sprite
>
>
> the problemn I encounter here is that which cast are the sprites
> pointing to BEFORE i reasign them to say 'dummy' (which by this time
> has had its filename set according to language choice?
>
> I always wipe out the sprites in the by removing a cast, so I presume
> they need to point to something. And when I point them to an external
> cast, then it does not seem to switch with the filename asignement.
>
> :(
>
> On 12/19/05, nik crosina <ncrosina at gmail.com> wrote:
> > nio, it's not web based, no I ma sort f lucky here, becasue this
> > CD-ROM has to be done virtually in one day. Not bad if I can pull it
> > off...
> >
> > Nik
> >
> > On 12/19/05, Sebastian Lucas <sebas at gamesandweb.com> wrote:
> > > Hi,
> > >
> > > Nik, is your project is a web based director movie? if your answer was
> yes
> > > try this:
> > >
> > > First of all create an empty castLib external (eg. "dummy.cst") and
> import
> > > it to your movie (don't put any data here).
> > >
> > > Your languages castlibs must be externals you must download it with the
> > > preloadNetThing procedure. When you have this point done you must set
> the
> > > castLib (x).fileName (where "x" could be "dummy") to the lenguage (eg.
> > > castLib ("dummy").fileName = "German.cct").
> > >
> > > When you have to set the member of an sprite you have to write this:
> sprite
> > > (1).member = member (1, "dummy").
> > >
> > > Remember, first download the language castLib after set the member.
> > >
> > > I hope that it solves your little problem. =)
> > >
> > > ----- Original Message -----
> > > From: "nik crosina" <ncrosina at gmail.com>
> > > To: "Lingo programming discussion list" <lingo-l at lists.fcgnetworks.net>;
> > > "Director - Shockwave - and Flash Game Production"
> > > <dirgames-l at nuttybar.drama.uga.edu>
> > > Sent: Sunday, December 18, 2005 8:51 PM
> > > Subject: [dirGames-L] asigning castmember to sprite
> > >
> > >
> > > > Hi,
> > > >
> > > > I have 3 casts:
> > > > - 1 internal with common cast members
> > > > - 2 identical casts in respect of their content and the way the cast
> > > > members are named, but different in what the images / text are (ie one
> > > > displays words in English as images and text, the other in Spanish)
> > > >
> > > > I choose the language by setting a global variable, whereby the
> > > > clicked sprites member name is the name of the cast as well (ie.
> > > > 'english' and 'spanish'):
> > > >
> > > > **************
> > > > global gLanguage gLanguage
> > > > property SpriteNum SpriteNum
> > > >
> > > > on mouseUp me mouseUp me
> > > > gLanguage = sprite(SpriteNum).member.name
> > > > end
> > > > **************
> > > >
> > > > To each sprite that has a 'langugae sensitive' member attached to it,
> > > > I attach this script:
> > > >
> > > > **************
> > > > global gLanguage
> > > > property SpriteNum
> > > >
> > > > on beginSprite
> > > >  sprite(SpriteNum).member = member("Capital", value(gLanguage))
> > > > end beginSprite
> > > > **************
> > > >
> > > > While working very well in Authoring mode, it comes up with a
> > > > 'castmember not found' error during run time? And I can't see where I
> > > > am going wrong....
> > > >
> > > > Any ideas? Anyone dealt with language selection efficiently, without
> > > > having to load in two sets of members, just in case?
> > > >
> > > > Thanks
> > > >
> > > >
> > > > --
> > > > Nik C
> > > >
> > > > _______________________________________________
> > > > dirGames-L mailing list  -  dirGames-L at nuttybar.drama.uga.edu
> > > > http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
> > >
> > > _______________________________________________
> > > dirGames-L mailing list  -  dirGames-L at nuttybar.drama.uga.edu
> > > http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
> > >
> >
> >
> > --
> > Nik C
> >
>
>
> --
> Nik C
>
> _______________________________________________
> dirGames-L mailing list  -  dirGames-L at nuttybar.drama.uga.edu
> http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
>
> _______________________________________________
> dirGames-L mailing list  -  dirGames-L at nuttybar.drama.uga.edu
> http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
>


--
Nik C



More information about the dirGames-L mailing list