[Xerte] setting id

Kemp Johnathan johnathan.kemp at ntlworld.com
Fri Jul 23 19:51:59 BST 2010


If you are using the same kind of technique to duplicate a protoItem several
times, for example see the quiz page Wizard structure. Icons that do not
have an id specified in the protoItem icon structure will get an id assigned
to them when Xerte duplicates the icons. You can see it if you display the
structure after it has been created. So normally you don't set the ids where
you are going to duplicate (you can identify the item you are going to
duplicate by name rather than ID) you let Xerte do it.

You may then be able to address the first page in the decision by
decisionIconID.firstChild()

It may be that by assigning an ID before you duplicate you are creating
problems for yourself.

Kind regards

Johnathan

On 23 July 2010 18:56, Paul Swanson <Paul.Swanson at harlandfs.com> wrote:

> Drat. Just a WAG, not surprised it didn't work. Can't think of anything
> else to try, but Jules might have some suggestions when he gets online.
>
> > -----Original Message-----
> > From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-
> > bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> > Sent: Friday, July 23, 2010 10:45 AM
> > To: Xerte list
> > Subject: RE: [Xerte] setting id
> >
> >
> >
> >
> > No luck.
> >
> > rootIcon.onRelease();
> > does nothing.
> >
> >
> > ----------------------------------------
> > > Subject: RE: [Xerte] setting id
> > > Date: Fri, 23 Jul 2010 10:38:38 -0700
> > > From: Paul.Swanson at harlandfs.com
> > > To: xerte at lists.nottingham.ac.uk
> > >
> > > Maybe your event should be rootIcon.onRelease() ...
> > > myDecisionPageId.onRelease() might only fire if you are actually in
> > > myDecisionPageId. You will always be in rootIcon.
> > >
> > >> -----Original Message-----
> > >> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-
> > >> bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> > >> Sent: Friday, July 23, 2010 10:28 AM
> > >> To: Xerte list
> > >> Subject: RE: [Xerte] setting id
> > >>
> > >>
> > >>
> > >> As an addendum:
> > >>
> > >> I am debugging the ID's of the duplicates, running the set ID's
> > >> routine, then debugging again.
> > >>
> > >> It sure looks like they are being set, but the onRelease call that
> > >> worked when they are all the same, does not work for the new ID's
> > >>
> > >> ----------------------------------------
> > >>> Subject: RE: [Xerte] setting id
> > >>> Date: Fri, 23 Jul 2010 10:17:37 -0700
> > >>> From: Paul.Swanson at harlandfs.com
> > >>> To: xerte at lists.nottingham.ac.uk
> > >>>
> > >>> It should be possible to create unique IDs when duplicating. Would
> > >>> something like the following work if entered as the id property?
> > >>>
> > >>> myId + iconParent.repCount
> > >>>
> > >>> If my syntax is correct, you should end up with different IDs for
> > >> each
> > >>> page of the decision icon: myId1, myId2, etc.
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-
> > >>>> bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> > >>>> Sent: Friday, July 23, 2010 10:03 AM
> > >>>> To: Xerte list
> > >>>> Subject: RE: [Xerte] setting id
> > >>>>
> > >>>>
> > >>>>
> > >>>> Hmm, no mention of setProperty in the archives.
> > >>>> Maybe no one uses it. ;-)
> > >>>>
> > >>>> OK, the underlying issue is this:
> > >>>>
> > >>>> I duplicate 5x a page of objects along a decision icon, they all
> > > end
> > >>> up
> > >>>> with the same ID
> > >>>>
> > >>>> Once that is set up I would like to trigger the first leg by
> code.
> > >>>>
> > >>>> sameID.onRelease();
> > >>>> always triggers the last leg of the duped items.
> > >>>>
> > >>>> Way round it?
> > >>>>
> > >>>> Dave
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> ________________________________
> > >>>>> From: maryann at moberg.com
> > >>>>> Date: Fri, 23 Jul 2010 11:59:30 -0400
> > >>>>> Subject: Re: [Xerte] setting id
> > >>>>> To: xerte at lists.nottingham.ac.uk
> > >>>>>
> > >>>>> Here's the flash documentation for setProperty - a movie clip
> > >>>> function. Is this what you had in mind?
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> setProperty(target:Object,
> > >>>>> property:Object, expression:Object) : Void
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> Changes a property value of a movie clip as the movie clip
> plays.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> Availability: ActionScript 1.0; Flash Player 4
> > >>>>>
> > >>>>>
> > >>>>> Parameters
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> target:Object - The path to the instance
> > >>>>> name of the movie clip whose property is to be set.
> > >>>>>
> > >>>>> property:Object - The property to be set.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> expression:Object - Either the new literal value
> > >>>>> of the property, or an equation that evaluates to the new value
> > of
> > >>>> the
> > >>>>> property.
> > >>>>>
> > >>>>>
> > >>>>> Example
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> The following ActionScript creates a new movie clip and loads an
> > >>>> image into
> > >>>>> it. The _xand
> > >>>>> _y
> > >>>>> coordinates are set for the clip using setProperty(). When you
> > >> click
> > >>>>> the button called right_btn, the _x coordinate of a movie clip
> > >>>>> named params_mc
> > >>>>> is incremented by 20 pixels.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> this.createEmptyMovieClip("params_mc", 999);
> > >>>>>
> > >>>>>
> > >>>>
> > >>>
> > >>
> > >
> >
> params_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jp
> > >>>> g");
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> setProperty(this.params_mc, _y, 20);
> > >>>>>
> > >>>>> setProperty(this.params_mc, _x, 20);
> > >>>>>
> > >>>>> this.right_btn.onRelease = function() {
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> setProperty(params_mc, _x, getProperty(params_mc, _x)+20);
> > >>>>>
> > >>>>> };
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> On Fri, Jul 23, 2010 at 11:25 AM, Dave Burnett> wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> I'm having another of my noticeably more frequent senior
> moments.
> > >>>>>
> > >>>>> At least I'll get half-price at the buffet soon...
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> icon.previousSibling.clip().getProperty('id')
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> What's the syntax to set this same property?
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> Thnx.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> Dave
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> _________________________________________________________________
> > >>>>>
> > >>>>> Hotmail is redefining busy with tools for the New Busy. Get more
> > >>> from
> > >>>> your inbox.
> > >>>>>
> > >>>>>
> > >>>>
> > >>>
> > >>
> > >
> >
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL
> > >>>> :ON:WL:en-
> > >>>> US:WM_HMP:042010_2_______________________________________________
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> Xerte mailing list
> > >>>>>
> > >>>>> Xerte at lists.nottingham.ac.uk
> > >>>>>
> > >>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> > >>>>>
> > >>>>>
> > >>>>
> > >>>> _________________________________________________________________
> > >>>> The New Busy is not the too busy. Combine all your e-mail
> accounts
> > >>> with
> > >>>> Hotmail.
> > >>>>
> > >>>
> > >>
> > >
> >
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=P
> > >>>> ID28326::T:WLMTAGL:ON:WL:en-
> > >>>> US:WM_HMP:042010_4_______________________________________________
> > >>>> Xerte mailing list
> > >>>> Xerte at lists.nottingham.ac.uk
> > >>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> Xerte mailing list
> > >>> Xerte at lists.nottingham.ac.uk
> > >>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> > >>
> > >> _________________________________________________________________
> > >> The New Busy is not the too busy. Combine all your e-mail accounts
> > > with
> > >> Hotmail.
> > >>
> > >
> >
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=P
> > >> ID28326::T:WLMTAGL:ON:WL:en-
> > >> US:WM_HMP:042010_4_______________________________________________
> > >> Xerte mailing list
> > >> Xerte at lists.nottingham.ac.uk
> > >> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> > >
> > >
> > > _______________________________________________
> > > Xerte mailing list
> > > Xerte at lists.nottingham.ac.uk
> > > http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> >
> > _________________________________________________________________
> > The New Busy is not the too busy. Combine all your e-mail accounts
> with
> > Hotmail.
> >
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=P
> > ID28326::T:WLMTAGL:ON:WL:en-
> > US:WM_HMP:042010_4_______________________________________________
> > Xerte mailing list
> > Xerte at lists.nottingham.ac.uk
> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100723/9c272b19/attachment.html


More information about the Xerte mailing list