Add/remove parent, child objects. help needed

I'm working on interactive map for my client. But i'm stuck on functionality.
It's basically has 3 locations (child1-3) on base map(Bg), each stands for link to their assigned popup boxes.
Child2 and Child3 shares same Mag object which shows additional 5 locations.
i've done showing my base Bg and 3 initial locations. Also i tried to show first popup box by clicking child1 and it has some success.
But further i'm having problem for removing Box1 and it's BoxX button which means i want to return my Main_MC state by removing objects.
**pls help me on my work so i'll appreciate for your valuable time for helping me. I'm open to send some bonus via Skrill or Paypal.
Main_MC (parent)+
|
|___Bg
|
|
|___child1+
|              |___ Box1
|             
|___child2+
|              |
|              |                       |__box2
|              |                       |__box3
|              |___Mag+___|__box4
|              |                       |__box5
|              |                       |__box6
|              |
|              |
|              |
|___child3+
Here is my toddler looking code i just started.
package{
    import flash.display.Sprite;
    import flash.display.DisplayObject;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.events.Event;   
    public class Main extends Sprite{
        private var Bg:Sprite;
        private var child1:Sprite;
        private var child2:Sprite;
        private var child3:Sprite;
        public function Main(){           
            var Bg:Sprite = new BgInstance();
            Bg.x=360;
            Bg.y=212;
            Bg.name="BgMap"
            addChild(Bg);
            child1 = new child1Instance();
            child1.buttonMode = true;
            child1.x=479;
            child1.y=132;
            child1.name="child1Name";
            child1.addEventListener(MouseEvent.CLICK, showBox);
            addChild(child1);
            child2 = new child2Instance();
            child2.buttonMode = true;
            child2.x=463;
            child2.y=282;
            child2.name="child2Name";
            child2.addEventListener(MouseEvent.CLICK, showMag);
            addChild(child2);
            child3 = new child3Instance();
            child3.buttonMode = true;
            child3.x=389;
            child3.y=335;
            child3.name="child3Name";
            addChild(child3);
        } //closing brace for Function Main     
        //Handler       
        private function showBox (e:MouseEvent):void{
            var box1:Sprite;
            box1=new box1Instance();
            box1.x=-279;
            box1.y=-32;
            box1.name = "box1name";
            var boxX:Sprite;
            boxX=new boxXInstance();
            boxX.x=-159;
            boxX.y=-79;
            boxX.name="boxXname";
            buttonMode = true;
            child1.addChild(box1);
            child1.addChild(boxX);           
            trace(child1.numChildren); //it returns 3 instead of 2 ?
            trace(box1.numChildren); //it returns 3 instead of 0 ?
            boxX.addEventListener(MouseEvent.CLICK, boxXHandler);
            } //closing brace for function showBox
            //function for removing showBox
        private function boxXHandler(evt:MouseEvent):void {
            child1.removeChildAt(0); // it removes child1 itself on first click?
            }//closing brace for function boxXHandler
            //function for managing showMag
        private function showMag (e:MouseEvent):void{
            var MagBox:Sprite;
            MagBox=new MagInstance();
            MagBox.x=-275;
            MagBox.y=-95;
            MagBox.name="MagBoxName";
            var MagBoxX:Sprite;
            MagBoxX=new magXInstance();
            buttonMode = true;
            MagBoxX.x=-145;
            MagBoxX.y=-190;
            MagBoxX.name="MagBoxXName";
            child2.addChild(MagBox);
            child2.addChild(MagBoxX);
            trace(child2.getChildAt(0).name);
            MagBoxX.addEventListener(MouseEvent.CLICK, MagBoxXHandler);
        } //closing brace for function showMag
        private function MagBoxXHandler(evt:MouseEvent):void {
    } //closing brace for Class Main
} //closing brace for package

This is my code for right now:
package{
    import flash.display.Sprite;
    import flash.display.DisplayObject;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.events.Event;
          import flash.events.EventDispatcher;
    public class Main extends Sprite{
        private var Bg:Sprite;
        private var child1:Sprite;
        private var child2:Sprite;
        private var child3:Sprite;
        public function Main(){           
            var Bg:Sprite = new BgInstance();
            Bg.x=360;
            Bg.y=212;
            Bg.name="BgMap"
            addChild(Bg);
            child1 = new child1Instance();
            child1.buttonMode = true;
            child1.x=479;
            child1.y=132;
            child1.name="child1Name";
            child1.addEventListener(MouseEvent.CLICK, showBox);
            addChild(child1);
            child2 = new child2Instance();
            child2.buttonMode = true;
            child2.x=463;
            child2.y=282;
            child2.name="child2Name";
            child2.addEventListener(MouseEvent.CLICK, showMag);
            addChild(child2);
            child3 = new child3Instance();
            child3.buttonMode = true;
            child3.x=389;
            child3.y=335;
            child3.name="child3Name";
            addChild(child3);
       } //closing brace for Function Main     
            //Handler
            private function showBox (e:MouseEvent):void{
            var box1:Sprite;
            box1=new box1Instance();
            box1.x=-279;
            box1.y=-32;
            box1.name = "box1name";
            var boxX:Sprite;
            boxX=new boxXInstance();
            boxX.x=-159;
            boxX.y=-79;
            boxX.name="boxXname";
            buttonMode = true;
            child1.addChild(box1);
            child1.addChild(boxX);
            child1.removeEventListener(MouseEvent.CLICK, showBox);
            //tired to remove event listerner for child1 ?
            boxX.addEventListener(MouseEvent.CLICK, boxXHandler);
            } //closing brace for function showBox
            //function for removing showBox
            function boxXHandler(evt:MouseEvent){
            child1.removeChild(child1.getChildByName("box1name"));
            child1.removeChild(child1.getChildByName("boxXname"));
            child1.addEventListener(MouseEvent.CLICK, showBox);
            // tried to reassign event listener for child1 ?
            }//closing brace for function boxXHandler
            //function for managing showMag
            private function showMag (e:MouseEvent):void{
            var MagBox:Sprite;
            MagBox=new MagInstance();
            MagBox.x=-275;
            MagBox.y=-95;
            MagBox.name="MagBoxName";
            var MagBoxX:Sprite;
            MagBoxX=new magXInstance();
            buttonMode = true;
            MagBoxX.x=-145;
            MagBoxX.y=-190;
            MagBoxX.name="MagBoxXName";
            child2.addChild(MagBox);
            child2.addChild(MagBoxX);
            child2.removeEventListener(MouseEvent.CLICK, showMag);
            trace(child2.getChildAt(0).name);
            MagBoxX.addEventListener(MouseEvent.CLICK, MagBoxXHandler);
            } //closing brace for function showMag
            function MagBoxXHandler(evt:MouseEvent):void {
            child2.removeChild(child2.getChildByName("MagBoxName"));
            child2.removeChild(child2.getChildByName("MagBoxXName"));
            child2.addEventListener(MouseEvent.CLICK, showMag);
          } //closing brace for Class Main
} //closing brace for package

Similar Messages

  • Need to be enlightened on Parent, Child object assignments

    Hi!
    I am too boggled with parent class, child class objects assignments. For example say I have something like this:
    class parent{
       int a;
        void doStuff(){...}
    class child extends parent{
    int b;  
    void doOtherStuff(){...}
    }Ok. Now. if have have something like this:
    parent p;
    child c;Then which one of the below is legal and why and why not?
    1.) c = p;
    2.) p = c;
    I think p = c is legal. If so, can I do p.a =12; p.b=15;
    Why and why not?
    Please be my lifesaver.
    Thank You for reading!

    parent p;
    child c;
    If these are defined as global variables then both p and c will be null, meaning they refer nothing. Since a child inherits properties of the parent you can hold a child object using a parent reference
    so this is legal
    p = c;
    (Note: you need to understand the concept of a reference and object well. Here p and c are both references not objects).
    When you hold a child object using a parent's reference only parent's properties are visible. If you want to see the child's properties then you need to cast that reference to a child reference. So you can't say p.b=12.
    Hope you got what you want

  • I cannot uninstall Firefox, either through Control Panel Add/Remove or by running helper.exe from Program Files.

    Nothing happens when I click on REMOVE for Mozilla Firefox from the Add/Remove screen of Control Panel. I then tried to run helper.exe from the Mozilla Firefox folder in Program Files, but that wouldn't run either. Any suggestions?
    == This happened ==
    Just once or twice
    == When I tried to uninstall Firefox

    unistalled foxtab, however the window saying "want to add this pers. button to toolbar" no matter what I do I can't get it off , close firefox, remove or delete or get a new firefox download to replace it in the harddrive etc. Its locked up firefox and I have to use safari to access the web. how do I get this circular message etc. off ?

  • Best way to add additional parent child attribute values.

    I have a parent Child attribute in my dimension.  I am currently displaying the correct ID value as the business wants.  So now they can see the rollup of the ID(intOrgNodeID
    values.They would also like to see the same rollup of the Name (vcharOrgNodeName)  for this ID.However they do
    not want it concatenated.  They want to be able to see them separate.
    You cannot create two parent child attibutes in one dimension so not sure if there is some simple trick to make this work? 
    It seems like there should be some simple trick for this. 
    My dimension table looks something like this
    intdimOrgNodeID int Key (surreget key)
    intOrgNodeID int (Actual ID)
    intDimParentOrgNodeID
    vcharOrgNodeName
    In the Propertys I have set this below.
    KeyColumns  = tbldimOrgNode.intDimParentOrgNodeID
    NameColumn = tbldimOrgNode.intOrgNodeID
    Ken Craig

    Hi Ken,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Failed to create object.Help needed

    Hi, I have some program here, the BPDU class and also the RootBridge class. The BPDU class is just a simple class with all the getMethods and the setMethods. For the RootBridge class, it is suppose to connect to the JDBC ODBC database, and create arraylist and retrieve the mac address, priority and also the port id from the database. However, when I tried to create a BPDU object, it gives me an error saying :
    --------------------Configuration: j2sdk1.4.2_01 <Default>--------------------
    F:\new Project FYP\RootBridge.java:43: BPDU(java.lang.String,double,java.lang.String,int,java.lang.String,java.lang.String) in BPDU cannot be applied to ()
                        BPDU bpdu =new BPDU();
    ^
    1 error
    Here are the classes:
    BPDU class:
    public class BPDU
         private String BridgeIDMac;
         private double BridgeIDPriority;
         private String MsgType;
         private int CostPath;
         private String PortID;
         private String ComputerName;
         public BPDU(String BridgeIDMac, double BridgeIDPriority,String MsgType,int CostPath, String PortID, String ComputerName)
              this.BridgeIDMac=BridgeIDMac;
              this.BridgeIDPriority=BridgeIDPriority;
              this.MsgType=MsgType;
              this.CostPath=CostPath;
              this.PortID=PortID;
              this.ComputerName=ComputerName;
         public String getBridgeIDMac()
              return BridgeIDMac;
         public double getBridgeIDPriority()
              return BridgeIDPriority;
         public String getMsgType()
              return MsgType;
         public int getCostPath()
              return CostPath;
         public String getPortID()
              return PortID;
         public String getComputerName()
              return ComputerName;
         //SET METHODS
         public void setBridgeIDMac(String mac)
              BridgeIDMac=mac;
         public void setBridgeIDPriority(double priority)
              BridgeIDPriority=priority;
         public void setMsgType(String msg)
              MsgType=msg;
         public void setCostPath(int costpath)
              CostPath=costpath;
         public void setPortID(String portid)
              PortID=portid;
         public void setComputerName(String computername)
              ComputerName=computername;
    RootBridge Class:
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    import java.net.*;
    import java.lang.*;
    public class RootBridge
         private Connection con;
         private String macaddress;
         private int priority;
         private int portid;
         public RootBridge()
              try
                   //ESTABLISH THE JDBC DATABASE CONNECTION
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:BPDU");
              catch(ClassNotFoundException c)
                   System.out.println(c+": JDBC Driver Could Not Be Loaded.");
              catch(SQLException s)
                   System.out.println(s+": Database Connection Could Not Be Established.");
         //TO RETRIEVE THE COMPUTER NAME  IN DATABASE
         public ArrayList retrieveComputerName()
              ArrayList arraylist=new ArrayList();
              try
                   PreparedStatement p=con.prepareStatement("Select ComputerName from BPDU");
                   ResultSet rs= p.executeQuery();
                   if(rs.next())
                        //************Here is the error
                                                                                         BPDU bpdu =new BPDU();                    bpdu.setComputerName(rs.getString("ComputerName"));
                        arraylist.add(bpdu);
              catch(SQLException s)
                   System.out.println(s+": Could not retrieve computer name from database");
              return arraylist;
         //to get the mac address that belong to the computer
         public BPDU retrieveMacAddress(String computername)
              System.out.println("DB1"+computername);
              try
                   PreparedStatement p=con.prepareStatement("Select BridgeIDMAC from BPDU where ComputerName=?" );
                   System.out.println("DB2"+computername);
                   p.setString(1,computername);
                   p.setString(2,computername);
                   p.setString(3,computername);
                   ResultSet rs=p.executeQuery();
                   if(rs.next())
                        macaddress=rs.getString("BridgeIDMAC");
                   System.out.println("DB4"+macaddress);
              catch(SQLException s)
                   System.out.println(s+": Could not retrieve the mac address from database");
         //to retrieve priority from database
         public BPDU retrievePriority(String computername)
              System.out.println("DB1"+computername);
              try
                   PreparedStatement p=con.prepareStatement("Select BridgeIDPriority from BPDU where ComputerName=?" );
                   System.out.println("DB2"+computername);
                   p.setString(1,computername);
                   p.setString(2,computername);
                   p.setString(3,computername);
                   ResultSet rs=p.executeQuery();
                   if(rs.next())
                        priority=rs.getInt("BridgeIDPriority");
                   System.out.println("DB4"+priority);
              catch(SQLException s)
                   System.out.println(s+": Could not retrieve the priority from database");
         //to retrieve port id from database
         public BPDU retrievePortID(String computername)
              System.out.println("DB1"+computername);
              try
                   PreparedStatement p=con.prepareStatement("Select PortID from BPDU where ComputerName=?" );
                   System.out.println("DB2"+computername);
                   p.setString(1,computername);
                   p.setString(2,computername);
                   p.setString(3,computername);
                   ResultSet rs=p.executeQuery();
                   if(rs.next())
                        portid=rs.getInt("PortID");
                   System.out.println("DB4"+portid);
              catch(SQLException s)
                   System.out.println(s+": Could not retrieve the port id from database");
    }Please see //************Here is the error in the Root Bridge class.Help me to solve the problem.Thank You very much

    Hi,
    The error message means that the BPDU class doesn't have an empty constructor. You must pass the in needed arguments to the BPDU constuctor.
    /Kaj

  • Removing a Child Object

    I have a web site that creates a page by calling another
    class object. When I return from that page to the Main page I want
    the old page removed. I have done it like this but I am getting
    errors.
    Two vars in GlobalVarsContainer:
    public static var removePages:Boolean;
    public static var pageToRemove:Object;
    Create new page object:
    function onClickBtn1():void
    var servicesHome:ServicesHome=new ServicesHome();
    addChild(servicesHome);
    Return from sub page:
    function onMotionFinish(event:Event):void
    GlobalVarContainer.removePages=true;
    GlobalVarContainer.pageToRemove=servicesHome;
    var displayBtns=new ButtonHandler(introVid);
    addChild(displayBtns);
    Function on returning page to remove old object:
    //removes a sub page
    if (GlobalVarContainer.removePages==true)
    removeChild(GlobalVarContainer.pageToRemove);
    This is the error:
    ReferenceError: Error #1065: Variable servicesHome is not
    defined.
    So I know it's getting back here with all vars set correctly.
    I’ve tried changing the public static var
    pageToRemove:Object; to a string but that is not right.
    Any help please, I would greatly appreciate.

    Great minds think alike LOL:
    This is what I have now!!!
    function onClickBtn1():void
    var servicesHome=new ServicesHome ;
    addChild(servicesHome);
    GlobalVarContainer.removePages=false;
    GlobalVarContainer.pageToRemove=servicesHome;
    if (GlobalVarContainer.removePages==true){
    removeChild(servicesHome);
    GlobalVarContainer.removePages=false;
    with a call on return from ServicesHome after setting
    GlobalVarContainer.removePages ==true:
    if (GlobalVarContainer.removePages == true)
    onClickBtn1();
    but nothing happens. No error no child removed...weird

  • A better way to do this -- add/remove multiple childs

    I have 6 movieClips on stage.  When I roll over any one of them, I want to:
    A) removeChild the remaining 5 movieClips and then
    B) bring a new movieClip onto stage that would hold a description and possible button links
    Upon rollOut, I want to fire a 3 second delay, removeChild the description movieClip and then addChild the original 5 (removed) movieClips.
    Make sense?
    I started typing away and came to the impression that I might be going about this the LONG way.  Any shorter/smarter ideas would be appreciated.
    Here's the code:
    package{
        import flash.display.*;
        import flash.events.*;
        public class mainAS extends MovieClip{
            public var backgroundImage:imageMap2_mc = new imageMap2_mc();
            public var holder1:holder_mc = new holder_mc();
            public var holder2:holder_mc = new holder_mc();
            public var holder3:holder_mc = new holder_mc();
            public var holder4:holder_mc = new holder_mc();
            public var holder5:holder_mc = new holder_mc();
            public var holder6:holder_mc = new holder_mc();
            public function mainAS():void{
                //background image
                backgroundImage.x = 0;
                backgroundImage.y = 0;
                addChild(backgroundImage);
                // holder 1
                holder1.x = 50;
                holder1.y = 30;
                addChild(holder1);
                holder1.addEventListener(MouseEvent.ROLL_OVER, holder1Fire)
                // holder 2
                holder2.x = 250;
                holder2.y = 30;
                addChild(holder2);
                holder2.addEventListener(MouseEvent.ROLL_OVER, holder2Fire)
                // holder 3
                holder3.x = 450;
                holder3.y = 30;
                addChild(holder3);
                holder3.addEventListener(MouseEvent.ROLL_OVER, holder3Fire)
                // holder 4
                holder4.x = 50;
                holder4.y = 225;
                addChild(holder4);
                holder4.addEventListener(MouseEvent.ROLL_OVER, holder4Fire)
                // holder 5
                holder5.x = 250;
                holder5.y = 225;
                addChild(holder5);
                holder5.addEventListener(MouseEvent.ROLL_OVER, holder5Fire)
                // holder 6
                holder6.x = 450;
                holder6.y = 225;
                addChild(holder6);
                holder6.addEventListener(MouseEvent.ROLL_OVER, holder6Fire)
            //Fire away
            private function holder1Fire(e:Event):void{
                trace("holder 1");
                //removeChild all remaining
               //addChild description MovieClip
              // description_mc.addEventListner(function to include rollOff Listener -- fire timer -- remove description + add original mc's)
            private function holder2Fire(e:Event):void{
                trace("holder 2");
                //removeChild
            private function holder3Fire(e:Event):void{
                trace("holder 3");
                //removeChild
            private function holder4Fire(e:Event):void{
                trace("holder 4");
                //removeChild
            private function holder5Fire(e:Event):void{
                trace("holder 5");
                //removeChild
            private function holder6Fire(e:Event):void{
                trace("holder 6");
                //removeChild

    If the main reason for adding and removing is so that only one is visible, then you can just use the visible property along with a reduction in code.  Here's a few thoughts along those lines, though not the whole deal...
    Create a function that turns all of the object visible/invisible using a loop...
    function showAll(truefalse:Boolean){
         for(var i=1; i<7; i++){
              this["holder"+String(i)].visible = truefalse;
    Then have all your object share the same rollover function....
    holder1.addEventListener(MouseEvent.ROLL_OVER, clickHolder);
    holder2.addEventListener(MouseEvent.ROLL_OVER, clickHolder);
    holder3.addEventListener(MouseEvent.ROLL_OVER, clickHolder);
    etc...
    function clickHolder(evt:MouseEvent):void {
         showAll(false);  // hide all first
         evt.currentTarget.visible = true;  // show the one being hovered
         // store the name of the description mc with the clip and call it...
         this[evt.currentTarget.desc].visible = true;

  • Middleware and Adapter Object help needed

    Hi all,
    We are trying to replicate business agreements from CRM to contract accounts in our R/3 IS-U system. We've followed the various cookbooks and guidelines but have so far been unsuccessful. For object BUAG_MAIN, is an adapter object needed? If so, we are unable to find one in R3AC1.
    If we check the BDoc message, we are getting two Technical errors after creating the business agreement:
    1. "Outbound call for BDoc type BUAG_MAIN to adapter module CRM_UPLOAD_TO_OLTP failed."
    2. "Service that caused the error: SMW3_OUTBOUNDADP_CALLADAPTERS"
    Any ideas? Points will be awarded for helpful responses. Thanks in advance.
    Message was edited by:
            John S

    So in R3AC1 there is a button to show inactive adapter objects. Hitting this showed BUAG_MAIN. After that, we opened BUAG_MAIN and activated the object. This resulted in a couple of changes that we clicked through. We then were able to do an initial load of the business agreements and replications of newly created ones happened thereafter.

  • Sorting a list with parent/child object relations

    Hi,
    I have an ArrayList of Genre objects that I want to sort:
    class Genre{
    int CategoryID;
    int ParentCategoryID;
    String name;
    String level;
    Example objects:
    Pop (CategoryID=10, ParentCategoryID=root, "popular music", 1);
    Jazz (CategoryID=11, ParentCategoryID=root, "jazz music", 1);
    Indie pop (CategoryID=12, ParentCategoryID=10, "indie pop", 2);
    American Indie pop (CategoryID=13, ParentCategoryID=12, "american indie pop", 3);
    Soul (CategoryID=15, ParentCategoryID=root, "soul music", 1);
    Commercial pop (CategoryID=14, ParentCategoryID=10, "commercial pop", 2);
    I hope that you see the point:
    I want that the order will be like this in my arraylist:
    jazz music
    popular music
    commercial pop
    indie pop music
    american indie pop
    soul music
    I'll implement the comparator-class in Genre and then add the compareTo-method in my genre-class.
    But my brain is too tired to figure out what to write in the compareTo-method?
    Have somebody done a similar method??
    Best regards,
    Thomas

    Unfortunately is this solution not plausible since I
    don't can have the parent genre in the genre class.
    ... Hashmap?Hashmap works. Here you go, using your structure, minus the level, I'm sure you can work around that though. Don't use -1 as a category id, it's reserved for your root. This code is not thread safe, I leave that to you. Don't forget that as implemented, parent Genres must be constructed prior to any of their children. You could get around this with a two pass initialization process.
    // Not thread safe.
    import java.util.*;
    public class Genre implements Comparable {
         private static Map<Integer, Genre> genreForId = new HashMap<Integer, Genre>();
         private int id;
         private int level;
         private int parentId;
         private String name;
         public Genre(int id, int parentId, String name) {
              this.id = id;
              this.parentId = parentId;
              this.name = name;
              this.level = level(this);
              Genre.genreForId.put(id, this);
         private static int level(Genre genre) {
              int i = 0;
              while (genre != null) {
                   genre = genre.getParent();
                   i++;
              return i;
         public static void main(String[] args) {
              Genre pop = new Genre(10, -1, "popular music");
              Genre jazz = new Genre(11, -1, "jazz music");
              Genre indiePop = new Genre(12, 10, "indie pop");
              Genre americanIndiePop = new Genre(13, 12, "american indie pop");
              Genre soul = new Genre(15, -1, "soul music");
              Genre commercialPop = new Genre(14, 10, "commercial pop");
              Genre[] genres = { pop, jazz, indiePop, americanIndiePop, soul,
                        commercialPop };
              Arrays.sort(genres);
              System.out.println(Arrays.toString(genres));
         public int compareTo(Object o) {
              Genre lhs = this;
              Genre rhs = (Genre) o;
              switch (Integer.signum(lhs.getLevel() - rhs.getLevel())) {
              case -1:
                   rhs = rhs.getParent();
                   if (lhs == rhs)
                        return -1;
                   break;
              case 0:
                   if (lhs == rhs)
                        return 0;
                   else {
                        if (lhs.getParent() == rhs.getParent())
                             return lhs.getName().compareTo(rhs.getName());
                        else {
                             lhs = lhs.getParent();
                             rhs = rhs.getParent();
                   break;
              case 1:
                   lhs = lhs.getParent();
                   if (lhs == rhs)
                        return 1;
              return lhs.compareTo(rhs);
         public int getLevel() {
              return level;
         public String getName() {
              return name;
         public Genre getParent() {
              return Genre.genreForId.get(getParentId());
         public int getParentId() {
              return parentId;
         public String toString() {
              return name;
    }-S

  • Removing an unwanted object-HELP!

    Hello,
    I'm editing a project in FCP, and I've noticed that a boom mic has hovered into one of my shots. I have a clean freeze frame that I'd like to use to edit out the microphone.
    What's the simplest way to get rid of it?
    Should I use a matte, or mask? If so, which one?
    So far I have tried using a four point garbage matte, with the freeze frame underneath it and the filter set to "inverted." But that wasn't any help. Of course, I could be using the wrong matte (that was the one suggested to me).
    I have Final Cut Pro (including Motion 4) and Adobe Photoshop at my disposal. Unfortunately, I can't download any plug-ins (shared computer).
    Any possible solutions are welcome, but those using only FC Studio are ideal. My experience with photoshop is extremely limited.
    Thank you!!

    Hi -
    The easiest way to do this is place the scene with the boom mike in it on V1. Then edit the freeze frame without the boom on V2, directly above the scene on V1.
    If your timeline does not have a V2 track, control-click on the space above V1 and select Add Track.
    As soon as you place the freeze on V2, you will no longer see the moving image on V1. This is OK, we will fix that now.
    Double click on the freeze clip on V2, so that it loads to the viewer, and in the viewer, click on the Motion Tab.
    Open the Crop pane by clicking on the little triangle next to the word Crop, and move the paddle for the Bottom until it reveals the moving scene beneath it while still masking the boom. You may want to adjust the Edge Feather paddle to smooth out the transition between your in motion shot and your freeze.
    Depending on the horsepower of your computer, you may have to render this effect in order to see it playback.
    MtD

  • Need to add superscript for text field--HELP NEEDED.

    Hi Friends,
    Is there any way to implement superscript and subscript text in Crystal?  For example, I would like to superscript the portion (1) of the following string:
    "Buy(1) or Sell(1)"
    The only way I have found to do this is to put the "235" in a separate text field that uses a smaller font size, and overlay it into the gap that I intentionally left in the larger text field.  For display and printing purposes, this works OK, but if a report containing these strings is exported to Excel, the text fields are exported as separate cells, which makes the exported report look funny.
    I can create this string in Word, then cut and paste it into a text field in Crystal (which initially seems to work), but as soon as I click off the field, all the characters in it are converted to the same font size.
    If this can't be done in the current version of Crystal, are there any plans for it to be implemented in future versions?

    hello all,
    the text interpretation for html or rtf in fields will not render superscript or subscript. the basic rule is that whatever you can format directly in a crystal reports text object, that's what you can have interpreted.
    look up "text interpretation html" in kbase for a full list.
    one option is to turn html passthrough on the server in question if this is a huge deal for you...if you want instructions on how to turn html passthrough on, they are located in the webelements user guide at
    http://diamond.businessobjects.com/node/255
    after doing so, you'd drop the database field into a formula and any html in the database field would be interpreted.

  • Parent child query help

    my requirement:
    3 columns in table
    column a    column b   data column
    10          9     
    13              10       acb
    12              13       rerer
    15          17     
    16              15      
    20          16     iiio
    output:
    column a    column b   data column
    13              10       acb
    20          16     iiioThanks.
    Edited by: user12988565 on Apr 14, 2010 1:59 PM
    Edited by: user12988565 on Apr 14, 2010 2:00 PM

    Hi All,
    Please let me know for any more details:
    column a    column b   data column
    10          9     
    13              10       acb
    12              13       rerer
    15          17     
    16              15      
    20          16     iiio
    output:
    column a    column b   data column
    13              10       acb
    20          16     iiiohow the output is reached at?
    1st set
    10 - 9
    13 - 10 acb -- data found, display the data. though for 13 there was rerer data in data column
    2nd set
    15 - 17
    16 - 15
    20 - 16 iiio -- data found display the data.
    Thanks.

  • Help needed - can't switch to page

    I followed a tutorial about how to create a simple website. The buttons i've created SHOULD fade out the current page and fade in the new page. In it's current state it fades out the m1 instance (mainmenu_mc) but won't fade in the new page selected(p1,p2,p3orp4). After it's faded out if i click in the same area the button was the mainmenu_mc page flashes onto the screen. and when i let go of clicking it, dissapears again.
    I hope i've made the situation clear enough for you to understand and you can help me out with this project.
    Code:
    var m1:mainmenu_mc =new mainmenu_mc;
    var p1:page1 =new page1;
    var p2:page2 =new page2;
    var p3:page3 =new page3;
    var p4:page4 =new page4;
    pageContainer_mc.addChild(m1);
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    m1.menuBtn1_btn.addEventListener(MouseEvent.CLICK, btn1Click);
    m1.menuBtn2_btn.addEventListener(MouseEvent.CLICK, btn2Click);
    m1.menuBtn3_btn.addEventListener(MouseEvent.CLICK, btn3Click);
    m1.menuBtn4_btn.addEventListener(MouseEvent.CLICK, btn4Click);
    function btn1Click (event:MouseEvent):void{
    var btn1Outro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 1,0,1, true);
    btn1Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn1Transition);
    function runBtn1Transition (event:TweenEvent):void{
    pageContainer_mc.removeChildAt(1);
    pageContainer_mc.addChild(p1);
    var btn1Intro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 0,1,1, true);
    function btn2Click (event:MouseEvent):void{
    var btn2Outro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 1,0,1, true);
    btn2Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn2Transition);
    function runBtn2Transition (event:TweenEvent):void{
    pageContainer_mc.removeChildAt(1);
    pageContainer_mc.addChild(p2);
    var btn1Intro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 0,1,1, true);
    function btn3Click (event:MouseEvent):void{
    var btn3Outro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 1,0,1, true);
    btn3Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn3Transition);
    function runBtn3Transition (event:TweenEvent):void{
    pageContainer_mc.removeChildAt(1);
    pageContainer_mc.addChild(p3);
    var btn1Intro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 0,1,1, true);
    function btn4Click (event:MouseEvent):void{
    var btn4Outro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 1,0,1, true);
    btn4Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn4Transition);
    function runBtn4Transition (event:TweenEvent):void{
    pageContainer_mc.removeChildAt(1);
    pageContainer_mc.addChild(p4);
    var btn1Intro:Tween = new Tween(pageContainer_mc, "alpha", Strong.easeOut, 0,1,1, true);

    A few things I notice off the bat...
    1) You should not be nesting functions within functions.  It is bad practice and unnec3saary.
    2) If you are removing the childAt 1, are you sure that is what you intend?  Child indexes start at 0.
    3) If you only fade an object by reducing its alpha property to 0 it is still present and can still be clicked/interacted with.  Removing the child should help avoid that, but otherwise setting the visible property to false is necessary.
    While having repetitive code in itself is not a functional problem, whenever you have code such as you show where a pattern is repeated, you should be able to reduce it all and have a singular shared function that replace all those of that pattern.  In your case, the only difference between them all is a single digit (1,2,3,4), which you could deal with in a number of ways such that you onkly need one btnClick function and one runTransition function that can be shared by all the buttons.

  • Parent/Child Master Data Type

    I recently created a new master data type in my model, which included one attribute with the 'parent' check box checked - to signify that it was to be used as the parent.
    Upon activating the master data type - the system auto generated several other attributes within the master data type.  My question is, what is the purpose of these additional attributes and how are they to be used?
    Before Activation:
    Attribute
    Description
    Notes
    ID
    ID
    << marked as key and as required
    DESCR
    Description
    << no special check boxes checked
    PID
    Parent ID
    << marked with parent check box
    After activation:
    Attribute
    Description
    Notes
    ID
    ID
    << marked as key and as required
    DESCR
    Description
    << no special check boxes checked
    PID
    Parent ID
    << marked with parent check box
    IDA
    Ancestor: ID
    << auto added after activation
    IDL
    Level: ID
    << auto added after activation
    IDLA
    Ancestor: Level: ID
    << auto added after activation
    IDPTH
    Path: ID
    << auto added after activation
    IDPTHA
    Ancestor: Path: ID
    << auto added after activation
    DEACRA
    Ancestor: Description
    << auto added after activation
    PIDA
    Ancestor: Parent ID
    << auto added after activation

    https://share.sap.com/a:r2l29c/MyAttachments/38b00c31-a7f4-404c-8247-1a99ef4b0509/
    Hey JJ,
    The purpose of these attributes is for parent-child hierachy relationship.
    In addition to above mentioned attributes, you should also notice (via HANA studio), that another Planning object gets generated automatically.  The new planning object should be the name of your parent-child object plus "_ANC" prefix at the end.
    If you take a look at this planning object, you will notice that the object contains all the generated attributes (your attriubute plus "A" prefix at the end) in the definition.
    Once you load data into your parent-child hiearchy object the "_ANC" object will automatically get populated with parent-child node relationship.
    "A-prefix" attriubutes essentially represents the attributes of ancestor in this case.
    In addition, in order to do Ancestor rolllup in your calculation you will also need to create an ancestor planning level which contains all the attriubutes of your base planning level as well as these "A-Prefix" attributes.
    Please take a look at the document we created for "How to configure Parent-Child Hiearchy" from the share link
    It has more detailed information.
    Thanks.
    Daniel.

  • Flash player .msi fails to install, multiple entries in add remove programs cant be deleted

    we are seeing installation failures when using the .msi installatoin file.  We see an error 2753. The file 'InstallAX.exe' is not marked for installation.  Also, we shoe multiple entries in Add/Remove Programs for Flash Player, but they cannot be removed from add/remove programs.
    We have tried the Flash Uninstall program, but it will not remove them either.
    We have tried installing using the .exe and it installs, but still leaves the old "ghost" entries in add/remove programs.
    Any help in cleaning up this up and allowing us to use the .msi would be greatly appreciated.
    Steve

    i also unistaled this multi time but cant g
    et the prob to resolve

Maybe you are looking for