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

Paul Swanson Paul.Swanson at harlandfs.com
Tue Jan 25 21:57:17 GMT 2011


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
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110125/41071480/attachment.html>


More information about the Xerte mailing list