<HTML dir=ltr><HEAD><TITLE>RE: [Xerte] setting id</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText70343 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>after duplicating, you then need to loop over the cml nodes and set attributes.id, so that when the xml gets parse, it creates unique IDs on the icons,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>icon.nextSibling.duplicate(n);</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>for (i = 0; i < n; i++){</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2> icon.parentNode.childNodes[i+1].attributes.id = 'ic'+i;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>}</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>//something like that.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>There's no need to set IDs on icons once they exist - if you need similar icons to have unique IDs, do this,</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Paul Swanson<BR><B>Sent:</B> Fri 23/07/2010 18:17<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] setting id<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>It should be possible to create unique IDs when duplicating. Would<BR>something like the following work if entered as the id property?<BR><BR>myId + iconParent.repCount<BR><BR>If my syntax is correct, you should end up with different IDs for each<BR>page of the decision icon: myId1, myId2, etc.<BR><BR>> -----Original Message-----<BR>> From: xerte-bounces@lists.nottingham.ac.uk [<A href="mailto:xerte-">mailto:xerte-</A><BR>> bounces@lists.nottingham.ac.uk] On Behalf Of Dave Burnett<BR>> Sent: Friday, July 23, 2010 10:03 AM<BR>> To: Xerte list<BR>> Subject: RE: [Xerte] setting id<BR>><BR>><BR>><BR>> Hmm, no mention of setProperty in the archives.<BR>> Maybe no one uses it. ;-)<BR>><BR>> OK, the underlying issue is this:<BR>><BR>> I duplicate 5x a page of objects along a decision icon, they all end<BR>up<BR>> with the same ID<BR>><BR>> Once that is set up I would like to trigger the first leg by code.<BR>><BR>> sameID.onRelease();<BR>> always triggers the last leg of the duped items.<BR>><BR>> Way round it?<BR>><BR>> Dave<BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>> ________________________________<BR>> > From: maryann@moberg.com<BR>> > Date: Fri, 23 Jul 2010 11:59:30 -0400<BR>> > Subject: Re: [Xerte] setting id<BR>> > To: xerte@lists.nottingham.ac.uk<BR>> ><BR>> > Here's the flash documentation for setProperty - a movie clip<BR>> function. Is this what you had in mind?<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > setProperty(target:Object,<BR>> > property:Object, expression:Object) : Void<BR>> ><BR>> ><BR>> ><BR>> > Changes a property value of a movie clip as the movie clip plays.<BR>> ><BR>> ><BR>> ><BR>> > Availability: ActionScript 1.0; Flash Player 4<BR>> ><BR>> ><BR>> > Parameters<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > target:Object - The path to the instance<BR>> > name of the movie clip whose property is to be set.<BR>> ><BR>> > property:Object - The property to be set.<BR>> ><BR>> ><BR>> ><BR>> > expression:Object - Either the new literal value<BR>> > of the property, or an equation that evaluates to the new value of<BR>> the<BR>> > property.<BR>> ><BR>> ><BR>> > Example<BR>> ><BR>> ><BR>> ><BR>> > The following ActionScript creates a new movie clip and loads an<BR>> image into<BR>> > it. The _xand<BR>> > _y<BR>> > coordinates are set for the clip using setProperty(). When you click<BR>> > the button called right_btn, the _x coordinate of a movie clip<BR>> > named params_mc<BR>> > is incremented by 20 pixels.<BR>> ><BR>> ><BR>> ><BR>> > this.createEmptyMovieClip("params_mc", 999);<BR>> ><BR>> ><BR>><BR>params_mc.loadMovie("<A href="http://www.helpexamples.com/flash/images/image1.jp">http://www.helpexamples.com/flash/images/image1.jp</A><BR>> g");<BR>> ><BR>> ><BR>> ><BR>> > setProperty(this.params_mc, _y, 20);<BR>> ><BR>> > setProperty(this.params_mc, _x, 20);<BR>> ><BR>> > this.right_btn.onRelease = function() {<BR>> ><BR>> ><BR>> ><BR>> > setProperty(params_mc, _x, getProperty(params_mc, _x)+20);<BR>> ><BR>> > };<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > On Fri, Jul 23, 2010 at 11:25 AM, Dave Burnett> wrote:<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > I'm having another of my noticeably more frequent senior moments.<BR>> ><BR>> > At least I'll get half-price at the buffet soon...<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > icon.previousSibling.clip().getProperty('id')<BR>> ><BR>> ><BR>> ><BR>> > What's the syntax to set this same property?<BR>> ><BR>> ><BR>> ><BR>> > Thnx.<BR>> ><BR>> ><BR>> ><BR>> > Dave<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > _________________________________________________________________<BR>> ><BR>> > Hotmail is redefining busy with tools for the New Busy. Get more<BR>from<BR>> your inbox.<BR>> ><BR>> ><BR>><BR><A href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL</A><BR>> :ON:WL:en-<BR>> US:WM_HMP:042010_2_______________________________________________<BR>> ><BR>> ><BR>> ><BR>> > Xerte mailing list<BR>> ><BR>> > Xerte@lists.nottingham.ac.uk<BR>> ><BR>> > <A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR>> ><BR>> ><BR>><BR>> _________________________________________________________________<BR>> The New Busy is not the too busy. Combine all your e-mail accounts<BR>with<BR>> Hotmail.<BR>><BR><A href="http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=P">http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=P</A><BR>> ID28326::T:WLMTAGL:ON:WL:en-<BR>> US:WM_HMP:042010_4_______________________________________________<BR>> Xerte mailing list<BR>> Xerte@lists.nottingham.ac.uk<BR>> <A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR><BR><BR>_______________________________________________<BR>Xerte mailing list<BR>Xerte@lists.nottingham.ac.uk<BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></FONT></P></DIV></BODY></HTML>