Surely all you need to do is just name the placeholder MovieClip instances
appropriately?

So if the database returns a seat identifier, then access a clip named
seat_<someID> with:

var seatClip:MovieClip=myTimeline["seat_"+seatID];

where we assume seatID is a string returned from the database (e.g. "2A"),
and myTimeline is whatever timeline all your clips are on. (e.g. _root, if
you must). And we assume clip instances are named "seat_1A","seat_2A" etc.
Note that's clip instances (the 'instance name' box in the Properties
dialog), not library symbol names.

Or am I missing something?

Ian

On 12/20/05, Jan Huzelius <[EMAIL PROTECTED]> wrote:
>
> Hi Eric,
>
> Thanks for thinking out loud! :)
>
> >Or are the seats "reservé" once a user registers (logged in or not)?
>
> Yes. Apparently, once they register they get a seat and they can't change
> seats. they can reserve a seat though (expires after 24hrs)
> The reason why we've chosen to place the empty movieClip on stage
> manually is because the drawing of the stadium is quite arbritrary. It
> would
> be difficult but not impossible to come with a fool-proof solid way of
> doing
> this dynamic because of the way the stadium is drawn.
> By placing the mcs on stage, will let the designer decide exactly where he
> wants to place an object/avatar!
>
> >your Flash designer could have a load image fonction to place the avatar
> (jpg image outside your flash?) inside itself and scalled to fit?
> >
>
> The avatars are actually created based on various component elements a use
> chooses duing registration process (head, top, bottom, skincolor) not
> through loading jpgs).
>
> > 2. you tell the MC corresponding to his seat to load his/her avatar
>
> Currently, we're close to having a solid solution that scales (depending
> on
> amount of users we have), but we can't seem to be able to link "the MC
> corresponding to his seat" with the seat number he is given. <--- if that
> makes any sense?
>
> Thanks
>
>
>
> On 20/12/05, Éric Thibault <[EMAIL PROTECTED]> wrote:
> >
> > OK!
> >
> > The empty MC (or component) placed on every seat representation by your
> > Flash designer could have a load image fonction to place the avatar (jpg
> > image outside your flash?) inside itself and scalled to fit?
> >
> >    1. the user logs in to your system
> >    2. you tell the MC corresponding to his seat to load his/her avatar
> >
> > Or are the seats "reservé" once a user registers (logged in or not)?
> >
> > In that case, on init of the flash application, pullout all the users
> > and init their seat (with a active / inactive representation based on
> > the component settings like _alpha)?
> >
> > Just thinking out loud!
> >
> > A+
> >
> > Jan Huzelius wrote:
> >
> > >Yeah, the users are allowed to choose their seat.
> > >And I can loop trough the avatar object and pull out his seatNumber but
> > we
> > >need a good way to link that seatID in the db with the one onstage.
> > >
> > >Thanks
> > >Jan
> > >
> > >
> > >
> > >On 20/12/05, Éric Thibault <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >>Just a suggestion...
> > >>
> > >>Are your users choosing their seat or are you populating your stadium
> in
> > >>a orderly fashion? One way or the other, when they register you
> > >>attribute them their seat and store that info (the seat id) in a
> > >>BD...And when they return to the stadium, just pullout the seat...
> > >>
> > >>(It gives me an idea for project of mine!)
> > >>
> > >>Thanks.
> > >>
> > >>
> > >>Johan Lopes wrote:
> > >>
> > >>
> > >>
> > >>>Hi franto,
> > >>>
> > >>>Thanks for your reply. Dude, your english is not that bad :)
> > >>>
> > >>>The current idea I'm working on is to get the Flash designer to place
> > >>>an empty MovieClip on every seat of the stadium and name this empty
> > >>>clip with a unique ID (Tier1_Block1_Stand1_Row1_SeatNumber1). Pretty
> > >>>much as you suggested. But how am I going to connect the avatar's
> seat
> > >>>number (given to him when he registers) with his specific seat on
> > >>>stage?
> > >>>
> > >>>Thanks again,
> > >>>
> > >>>Jan
> > >>>
> > >>>On 12/20/05, franto <[EMAIL PROTECTED]> wrote:
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>it's hard to say, i think it depens of your 4 views :)
> > >>>>can it be matematically told that you can assign ID to every seat by
> > >>>>some math formulas?
> > >>>>
> > >>>>or you want just create your views after you will find a good way to
> > >>>>populate them? (sorry for my english :)
> > >>>>
> > >>>>
> > >>>>On 12/20/05, Jan Huzelius <[EMAIL PROTECTED]> wrote:
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>>Hi list,
> > >>>>>
> > >>>>>I'm creating a 2D football stadium in Flash (4 views) which will be
> > >>>>>populated with avatars/users from a .NET webservice.
> > >>>>>
> > >>>>>The football stadium is illustrated - it's not 3D. The avatars are
> > >>>>>
> > >>>>>
> > >>simple
> > >>
> > >>
> > >>>>>animated MovieClips.
> > >>>>>
> > >>>>>Every section of the stadium has a stand with a certain number of
> > >>>>>
> > >>>>>
> > >>seats.
> > >>
> > >>
> > >>>>>What's the most elegant or most scalable way to populate my stadium
> > >>>>>
> > >>>>>
> > >>seats
> > >>
> > >>
> > >>>>>with a bunch of MovieClip avatars?
> > >>>>>
> > >>>>>Bearing in mind that a single avatar must be placed in the exact
> same
> > >>>>>
> > >>>>>
> > >>seat
> > >>
> > >>
> > >>>>>everytime (no random seats).
> > >>>>>
> > >>>>>Any suggestions welcome.
> > >>>>>
> > >>>>>Thanks in advance.
> > >>>>>_______________________________________________
> > >>>>>Flashcoders mailing list
> > >>>>>[email protected]
> > >>>>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>--
> > >>>>
> > >>>>
> >
> >
> >>>>-----------------------------------------------------------------------------------------------------------------------------------------------------------------
> > >>>>Franto
> > >>>>
> > >>>>http://blog.franto.com
> > >>>>http://www.flashcoders.sk
> > >>>>_______________________________________________
> > >>>>Flashcoders mailing list
> > >>>>[email protected]
> > >>>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>_______________________________________________
> > >>>Flashcoders mailing list
> > >>>[email protected]
> > >>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>--
> > >>===============================================================
> > >>
> > >>Éric Thibault
> > >>Programmeur analyste
> > >>Réseau de valorisation de l'enseignement
> > >>Université Laval, pavillon Félix-Antoine Savard
> > >>Québec, Canada
> > >>Tel.: 656-2131 poste 18015
> > >>Courriel : [EMAIL PROTECTED]
> > >>
> > >>===============================================================
> > >>
> > >>Avis relatif à la confidentialité / Notice of Confidentiality /
> > >>Advertencia de confidencialidad <
> > >>http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>
> > >>
> > >>_______________________________________________
> > >>Flashcoders mailing list
> > >>[email protected]
> > >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>
> > >>
> > >>
> > >_______________________________________________
> > >Flashcoders mailing list
> > >[email protected]
> > >http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > >
> > >
> >
> >
> > --
> > ===============================================================
> >
> > Éric Thibault
> > Programmeur analyste
> > Réseau de valorisation de l'enseignement
> > Université Laval, pavillon Félix-Antoine Savard
> > Québec, Canada
> > Tel.: 656-2131 poste 18015
> > Courriel : [EMAIL PROTECTED]
> >
> > ===============================================================
> >
> > Avis relatif à la confidentialité / Notice of Confidentiality /
> > Advertencia de confidencialidad <
> > http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>
> >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to