[Xerte] Re: Get index using clip nomen - kind of urgent

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Jan 26 10:53:38 GMT 2011


Same thing: that is the actual movieClip that iconID refers to. iconID is just a variable / reference to that long path in the Flash player hierarchy.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 25 January 2011 22:56
To: Xerte list
Subject: [Xerte] Re: Get index using clip nomen - kind of urgent

Daa. I knew it had to be simpler.

I just got it with this:

for (i = 0; i < tempIC._parent._parent.pages.length; i++) {
  if (tempIC._parent._parent.pages[i] == tempIC._parent) {
    debug(i);
    break;
  }
}



myIconID.XMLElement.index()

How do I get from
_level0.engine.IFC.PG_MC3.DEC_MC1.PG_MC2.DEC_MC3.PG_MC3.DIS_MC4
to
myIconID



________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Tue, 25 Jan 2011 22:42:35 +0000
Subject: [Xerte] Re: Get index using clip nomen - kind of urgent
myIconID.XMLElement.index()

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson [Paul.Swanson at harlandfs.com]
Sent: 25 January 2011 22:40
To: Xerte discussion list
Subject: [Xerte] Re: Get index using clip nomen - kind of urgent
Add one more _parent to the statement and that should get you the parent of <PG>. _name will get the movie clip instance name, if that helps.

The list of properties for class MovieClip can be found here: http://flash-reference.icod.de/MovieClip.html
It's for an older version of Flash, so there may be more properties available than listed.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Tuesday, January 25, 2011 2:23 PM
To: Xerte list
Subject: [Xerte] Re: Get index using clip nomen - kind of urgent

Brilliant!

Half-way.

Now I have the reference to <PG>
Now how do I find out what index or child number it is?

I need to get it's parent so I can then find out what the index() is.

<DEC>
  <PG> // need the index of this page
    <DIS> //can get this



________________________________
Date: Tue, 25 Jan 2011 13:57:17 -0800
From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Get index using clip nomen - kind of urgent
This help (from http://flash-reference.icod.de/)?

_parent Property

public _parent : MovieClip

Player version: Flash Player 5

A reference to the movie clip or object that contains the current movie clip or object. The current object is the object that references the _parent property. Use the _parent property to specify a relative path to movie clips or objects that are above the current movie clip or object.

You can use _parent to move up multiple levels in the display list, as in the following code:

this._parent._parent._alpha = 20;

Example
The following example traces the reference to a movie clip and its parent timeline.The following example logs the reference to a movie clip and its relationship to the main timeline. Create a movie clip with the instance name my_mc, and add it to the main timeline. Add the following ActionScript to your FLA or AS file:

my_mc.onRelease = function() {
    trace("You clicked the movie clip: "+this);
    trace("The parent of "+this._name+" is: "+this._parent);
}

When you click the movie clip, the following information appears in the Output panel:When you click the movie clip, the following information writes to the log file:


      You clicked the movie clip: _level0.my_mc
      The parent of my_mc is: _level0


See also
                Button._parent, _root, targetPath(), TextField._parent

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Tuesday, January 25, 2011 1:38 PM
To: Xerte list
Subject: [Xerte] Get index using clip nomen - kind of urgent


I can trap this:

_level0.engine.IFC.PG_MC3.DEC_MC1.PG_MC2.DEC_MC3.PG_MC3.DIS_MC4

I need to get it's parent so I can then find out what the index() is.

<DEC>
  <PG> // need the index of this page
    <DIS> //can get this

Can't figure the syntax


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110126/b1169fee/attachment-0001.html>


More information about the Xerte mailing list