How to override base class events

I Have faced one event problam. That is i have called one AA class in to stage. AA class is extends from BB class. BB class extends from CC class.CC class extends MovieClip.  In CC class i have given CLICK event trace("this is CC class"). i am also given for AA class CLICK event ("this is AA class ").When I Click the AA in out put panel "this is CC class" ,"this is AA class ") i want to stop CC Class mouseEvents.

Events bubble by default... It sounds like you want to look at the Event class' stopImmediatePropagation method.

Similar Messages

  • Missing base class Events (flash.events) | Flex 4.1 SDK | Flex Builder 3

    Hello,
    I am experience the following problem, I am not able locate or find base class Events when I do "import flash.events;" - autocomplete does not work as well. in import flash. only available - flash.errors and flash.text
    However if I switch from Flex 4.1 SDK to Flex 3.2 SDK then no problem and I can add flash.events
    Flex 4.1 SDK version is 4.1.0.65265, I also tried Flex 4.0 SDK, the same problem not able to find events.
    Require flash player version I tried both: 10.0.0 and 10.1.0 nothing helped.
    Could you please suggest what might be wrong. Unfortunately not able to find this info in the forum or google
    Thank you
    Regards,
    Marakame

    Did you try
        import flash.events.*;
    Or
        import flash.events.Event;

  • How to override component default events

    How to override the scroll panel default click event to custom event.

    Events bubble by default... It sounds like you want to look at the Event class' stopImmediatePropagation method.

  • How to extends base class???

    Hi here I want to extend GoogleApiKeyStore. I am sure that this class is availabe, because when I  writing to import this class flash showing this classname in hint dialogue box. but when i make object of mykey in my document class then it shows error: The definition of base class GoogleApiKeyStore was not found.
    package code {
              import be.boulevart.google.apicore.GoogleApiKeyStore
              public class mykey extends GoogleApiKeyStore{
                        public static const API_KEY : String = "xxxxxxxxxxxxxxxxxxxxxxxx"
                        public function mykey() {
                                  // constructor code

    download and save the class to make it local.

  • How to inherit base class properties ?

    Hi All,
    I have one doubt.Can anyone clear this doubt?
    Steps:
    1)I have created One movieClip & named as MyComp
    2)I export this movieclip to actionscript.Class name for this movieclip is MyComp.
    3)After that,Dynamically I have created 5 instance for this class & added to stage.
    4)Now i need to change width of MyComp. it should reflect on previous 5 instance too.
    I tried like,
    I have created MyComp.as file in same location. There I tried to inherite DisplayObject properties Width.
    Example :
    In authoring time,I have one movieclip in my library which contains one rectangle shape..Im adding 5 instance of that movieclip in stage.
    After that i get into one movieclip,and im increasing width of that movieclip by increasing Shape width. it ll get reflect in all instance..
    i need this thing in actionscript.... is it possible?
    Thanks...

    you can't do what you are trying to do the way you are trying to do it.
    I have included some code here (pure AS3, no timeline or library) which you might be able to adapt to your needs
    Basically I have created a static property (_rectWidth which controls the rectangles width) on the MovieClip class that contains the rectangle and a render() function that redraws the rectangle tot he correct width. Note you will have to call render() after setting a new width to see the rectangle drawn at the new  width.
    Then in the main class I create 5 rectangles with random colours and positions.
    The main class also listens for the "arrow up" and "arrow down" keys to change the rectangle's size. Note: I change the size of the rectangle and then run through all of the Main classes children (which are all RectMC's) and call render();
    package
              import flash.display.Sprite;
              import flash.events.Event;
              import flash.events.KeyboardEvent;
              public class Main extends Sprite
                        public function Main():void
                                  if (stage) init();
                                  else addEventListener(Event.ADDED_TO_STAGE, init);
                        private function init(e:Event = null):void
                                  removeEventListener(Event.ADDED_TO_STAGE, init);
                                  // entry point
                                  for (var i:int = 0; i < 5; i++)
                                            var col:uint = Math.floor(Math.random() * 0xffffff);
                                            var rectX:int = Math.floor(Math.random() * stage.stageWidth);
                                            var rectY:int = Math.floor(Math.random() * stage.stageHeight);
                                            var rectMC:RectMC = new RectMC(col);
                                            rectMC.x = rectX;
                                            rectMC.y = rectY;
                                            addChild(rectMC);
                                  stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
                        private function onKeyDown(e:KeyboardEvent):void
                                  switch (e.keyCode)
                                            case 38:
                                                      RectMC.rectWidth += 20;
                                                      break;
                                            case 40:
                                                      RectMC.rectWidth -= 20;
                                                      break;
                                  for (var i:int = 0; i < numChildren; i++)
                                            var rectMC:RectMC = getChildAt(i) as RectMC;
                                            rectMC.render();
    package 
              import flash.display.MovieClip;
              import flash.events.Event;
               * @author steven O'Boyle
              public class RectMC extends MovieClip
                        protected static var _rectWidth:int = 100;
                        protected static var _rectHeight:int = 50;
                        protected var _rectColour:uint;
                        public function RectMC(col:uint)
                                  _rectColour = col;
                                  render();
                        public function render():void
                                  graphics.clear();
                                  graphics.beginFill(_rectColour);
                                  graphics.drawRect(0, 0, _rectWidth, _rectHeight);
                                  graphics.endFill();
                        public static function set rectWidth(value:int):void
                                  _rectWidth = value;
                        public static function get rectWidth():int
                                  return _rectWidth;

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • Class override, how to create the child class and then the base class

    I started to write a program for a smart DMM, the problem is every version of the DMM the company change the communication commend.
    My idea is to write a child class for every DMM version and every SubVI of the child will override the base class SubVI.
    My problem is, i want first to create one child class and after i will see every thing is work,  start to create the base class. that way i will see if am thinking the right way.
    My question is
    How can i create a child class and then create the base class and configure the SubVi of the child class to be Override of the base class?
    I tried to search in the property of the class but i didn't see nothing.
    Thanks
    Solved!
    Go to Solution.

    This can be done and I've done it on occasion.
    You simply create the base class with the dynamic dispatch methods you require (connector panes need to be identical to thos of the child class).
    Then set the inheritance of the class to inherit from this base class.  If your method is defined as a dynamic dispatch method in the parent, you'll most likely now have some errors (unless your child method was already DD in which case you might just be OK already).
    To change the inheritance of a class, right-click the properties of the class in your project and select properties.  I believe the ineritance tree is at the lower end of the properties.  Click on the "change inheritance" (or something similar) to choose the class from which you now wish to inherit.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • How to expose and code the event handlers of a base class?

    I have created a class that inherits NumericUpDown. When I instantiate an object from that class, I can make it visible and have it appear on my form just like any other NUD. How can I get that instantiated object to expose the event handlers of its base
    class, the NUD in this case, so that, for example, I can tell the client what action to take when the value of the instantiated object changes?
    Thanks for your help.

    I am not sure exactly what you mean.  Are you adding your NUD controls to the Form at design time from the toolbox or adding them in code at run time?  If you are adding them to the form from the toolbox then you access the events the same way
    you would a standart NUD control.   If it is at runtime and you have a fixed amount of them you are going to add then you can declare them Class Scoped using the
    WithEvents keyword which will let you access all their events.
    Public Class Form1
    Private WithEvents Nud1 As New NUD
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Controls.Add(Nud1)
    End Sub
    Private Sub Nud1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Nud1.ValueChanged
    Me.Text = Nud1.Value.ToString
    End Sub
    End Class
    Public Class NUD
    Inherits NumericUpDown
    'Your custom code to make it work how you want...
    End Class
     If this is not what you are doing then you may need to explain a bit more and show the code you are using so we understand better.
    If you say it can`t be done then i`ll try it

  • How to deserialize xml with structure of abitrary nested layers of base class?

    let say i want to represent arithmetic expression using xml:
    <?xml version="1.0" encoding="utf-8" ?>
    <expr>
    <add>
    <num>10</num>
    <num>20</num>
    </add>
    </expr>
    and here is my classes to represent this:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace Test
    public abstract class Evaluable
    public abstract int Eval();
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Xml.Serialization;
    namespace Test
    [Serializable]
    [XmlRoot("expr")]
    public class Expr
    [XmlElement]
    public Evaluable Evaluable { get; set; }
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Xml.Serialization;
    namespace Test
    [Serializable]
    [XmlRoot("add")]
    [XmlType("add")]
    public class Add : Evaluable
    [XmlElement]
    public List<Evaluable> Elems { get; set; }
    public override int Eval()
    return Elems.Select(e => e.Eval()).Sum();
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Xml.Serialization;
    namespace Test
    [Serializable]
    [XmlRoot("num")]
    [XmlType("num")]
    public class Num : Evaluable
    [XmlText]
    public int Val { get; set; }
    public override int Eval()
    return Val;
    but it doesn't work, and it's reasonable, since Serializer doesn't know any thing about the subclass. but how to make it work?
    here is my deserialization code:
    var serializer = new XmlSerializer(typeof(Expr), new[] { typeof(Add), typeof(Num) });
    Expr expr = null;
    using (var file = new StreamReader("expr.xml"))
    expr = serializer.Deserialize(file) as Expr;

    I think what you want is to set the XmlElement attribute on the container (Elems).
    It can be done if the deserializer can be made aware of all the potential subclasses of the base class.  It's ok to put multiple XmlElement attributes on the container to let the deserializer know about the various subclasses it can deserialize.
    I don't think there's a way to tell the XmlSerializer externally about new types.  I could be wrong.  [If someone shows me how to do that, I'd sure appreciate it!]   [WORKAROUND:  A potential workaround
    is to create a class that contains all the potential children including the class itself and serialize that.  Seems a little like cheating.]
    Here is a complete example:
    [Serializable]
    public class Foo
    [XmlAttribute( "name" )]
    public string name;
    [XmlElement( "Foo", Type = typeof( Foo ) )]
    [XmlElement( "Bar", Type = typeof( Bar ) )]
    public List<Foo> children = new List<Foo>();
    public void Dump( int level )
    ShowProperties( level );
    foreach( var f in children ) {
    f.Dump( level + 1 );
    protected virtual void ShowProperties( int level )
    Console.WriteLine( "{0}{1}", new string(' ', level * 4 ), name );
    [Serializable]
    public class Bar : Foo
    public string stuff;
    protected override void ShowProperties( int level )
    base.ShowProperties( level );
    Console.WriteLine( "{0}{1}", new string(' ', level * 4 ), stuff );
    class Program
    static void Main( string[] args )
    // <Foo name="A">
    // <Bar name="B">
    // <Foo name="D" />
    // <stuff>B's Stuff</stuff>
    // </Bar>
    // <Bar name="C">
    // <stuff>C's Stuff</stuff>
    // </Bar>
    // </Foo>
    // A
    // B
    // B's Stuff
    // D
    // C
    // C's Stuff
    Foo a = new Foo() { name = "A" };
    Bar b = new Bar() { name = "B", stuff="B's Stuff" };
    Bar c = new Bar() { name = "C", stuff="C's Stuff" };
    Foo d = new Foo() { name = "D" };
    a.children.Add( b );
    a.children.Add( c );
    b.children.Add( d );
    XmlSerializer xs = new XmlSerializer( typeof( Foo ) );
    // There:
    XmlSerializerNamespaces ns = new XmlSerializerNamespaces( new[] { XmlQualifiedName.Empty } );
    StringBuilder sb = new StringBuilder();
    using( XmlWriter xw = XmlWriter.Create( sb, new XmlWriterSettings() {
    OmitXmlDeclaration = true,
    Indent = true
    xs.Serialize( xw, a, ns );
    Console.WriteLine( sb.ToString() );
    // And Back Again:
    using( StringReader sr = new StringReader( sb.ToString() ) )
    Foo root = (Foo)xs.Deserialize( sr );
    root.Dump( 0 );

  • Override a private method in a Base class?

    How can a subclass override a final method in its superclass.
    This code compiles cleanly.
    How is this possible?
    Or Am I overlooking any point?
    class MySuperClass{
    private final String getMessage(){
         return "hello";
    protected String getAnotherMessage(){
         return getMessage() + "world";
    class MySubClass extends MySuperClass{
    private final String getMessage(){
         return "hi";
    public String getAnotherMessage(){
       return "anothermessage";
    }

    getMessage is declared as private in the base class, and therefor cannot be overridden in any subclass.
    Edit: I think I understand the question better now. You want to know why it compiles when you think it shouldn't. It's because the private method isn't really inherited at all. Your subclass created a brand new private method of the same signature, but it's completely unrelated.

  • How to specify a base class for Remote Interface in Workshop 9.2? -- URGENT

    Hi,
    I am trying to create a UUP EJB in WebLogic 9.2 workshop. I am using @FileGeneration to create my home & remote interfaces. And the generated remote interface is extending javax.ejb.EJBObject;I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager which in turn implements javax.ejb.EJBObject. Can someone tell how i can do it in Workshop?.
    I came across Predefined Variable: remote.baseClass and as per docume
    ntation..."If specified, the value of this variable will be used as the base class for all generated remote classes. Where i should specify it?. @FileGeneration does nt have any option for it. Any help is grtly appreciated.
    Following are my code snippets:
    IMPL Class
    @FileGeneration(remoteClass = Constants.Bool.TRUE,remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE,remoteClassName = "MyEntityPropertyManager",remoteHomeName = "MyEntityPropertyManagerHome")
    public class MyEntityPropertyManagerImpl extends GenericSessionBean implements
              SessionBean {
    //code
    }

    This question was posted to both the bea.workshop.developer.general and weblogic.developer.interest.workshop (I had replied to the later on 10/19); after seeing an identical question today on this list want to include a reference to that reply here:
    http://forums.bea.com/bea/message.jspa?messageID=600044925&tstart=0
    -Rob

  • How to call derived class to base class

    Hello everybody,
    I create a GUi application in java swing. Now i want to navigate between the screen but the timing between the screen is very slow bcoz i imported the class from package to another package. Now i want to extends one package to another package to reduce the navigation time but it saying error bcoz i cant able to call my derived class to base class. if anyone know the answer for this please answer this immediately.
    If any other method is there to optimise the navigation time please tell me
    by
    (kamal)

    Sorry, I've got major difficulties understanding your query:
    I create a GUi application in java
    ication in java swing. ok
    Now i want to navigate between
    the screenwhat? switch screens? display a different dialog?
    but the timing between the screen is very
    slowtiming? do you mean the time it takes to display a different dialog?
    bcoz i imported the class from package to
    another package.how did you come to the conclusion that that is the reason for the slowness? Did you do any profiling or is this just guess-work?

  • [svn:osmf:] 13027: Fix bug in SerialElement where the durationReached event was dispatched on a child-to-child transition due to the base class thinking that the duration had been reached  (since the second child didn't have a duration yet).

    Revision: 13027
    Revision: 13027
    Author:   [email protected]
    Date:     2009-12-16 18:09:46 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Fix bug in SerialElement where the durationReached event was dispatched on a child-to-child transition due to the base class thinking that the duration had been reached (since the second child didn't have a duration yet).  Injection from trait refactoring.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/CompositeTimeTrait.as

    http://ww2.cs.fsu.edu/~rosentha/linux/2.6.26.5/docs/DocBook/libata/ch07.html#excatATAbusErr wrote:
    ATA bus error means that data corruption occurred during transmission over ATA bus (SATA or PATA). This type of errors can be indicated by
    ICRC or ABRT error as described in the section called “ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)”.
    Controller-specific error completion with error information indicating transmission error.
    On some controllers, command timeout. In this case, there may be a mechanism to determine that the timeout is due to transmission error.
    Unknown/random errors, timeouts and all sorts of weirdities.
    As described above, transmission errors can cause wide variety of symptoms ranging from device ICRC error to random device lockup, and, for many cases, there is no way to tell if an error condition is due to transmission error or not; therefore, it's necessary to employ some kind of heuristic when dealing with errors and timeouts. For example, encountering repetitive ABRT errors for known supported command is likely to indicate ATA bus error.
    Once it's determined that ATA bus errors have possibly occurred, lowering ATA bus transmission speed is one of actions which may alleviate the problem.
    I'd also add; make sure you have good backups when ATA errors are frequent

  • How to trigger a workflow though a class event

    Hi,
    I have created a class and included interface IF_WORKFLOW in the interface. Also created a event 'START' with one parameter. I have created a workflow and assigned the class event 'START' as its triggerring event.
    I want to trigger my workflow from a custom program. But I am not able to trigger the workflow by passing the event container.
    How do I start trigger the class event with the req. container element?

    Hi
    You could check the class CL_HRECM00_WORKFLOW_EVENT, together with the corresponding workflows of package
    PAOC_ECM_ADM_PLANNING_OVERVIEW.
    Best Regards
    Raquel

  • How to use reflection to get base classes protected field

    I have one base Base classes which have protected fields and public get method to get the field.
    class Base
    protected int proField;
    public int getProField(){return proField;}
    Class Derive extends base class Base
    class Derive extends Base implements OtherInterface
    public void funtion(){};
    Now I have an instance of Derive, how can I use reflection to get the protected field inherited from Base. It seems Java Reflection only give runtime accessibility to public field and decleared field, protected-inherited field is excluded.
    Thanks
    Lei

    as the last poster said, traverse up the class hierarchy.
    ex:
    private void doSumfinToField(String fieldName throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException {
    Class clazz = getClass();
    Field field = findFieldInClass(clazz, fieldName);
    //field.doSumfin;
    private Field findFieldInClass(Class clazz, String fieldName) throws NoSuchFieldException {
    try { // to find the field in this class    
    return clazz.getDeclaredField(fieldName);
    } catch (NoSuchFieldException e) {
    // if we don't have a superclass, continue
    if (clazz.getSuperclass().equals(Object.class)) {
    throw e;
    // check in the superclass
    return findFieldInClass(clazz.getSuperclass(), fieldName);
    }

Maybe you are looking for

  • GRIR manual clearing

    We configured GRIR account for automatic posting and it also not allow to post celring thru F-03. Now I want to clear balance in GL : 322001 with corresponding entry in GL : 322007 both are GRIR accounts to knock off open items. This is required beca

  • Fusion middleware 11g installation steps

    Hello, I am trying to install Oracle Fusion Middleware 11g and found some of the binaries to be installed.Please let me know if these are the software needed and Also, please confirm which product needs to be installed first. Here, is what my guessin

  • Journal tables in SQL Developer Data Modeler

    In my database I use journal tables, which can be generated automatically by Oracle Designer. Now that I'm trying to start using SQL Developer Data Modeler, I can't find how to make journal tables with it. Does anyone know whether Data Modeler suppor

  • Script to "Optimize to file size" (automatically) in "Save for Web"?

    Hello, all, I'm a novice when it comes to scripts in Photoshop, but I'm really coming to the conclusion that this is the only way to automate the actions I need to do, whithout having to do it one-by-one. Is it possible to write a Script to automatic

  • Problem in threading operation...

    Hi All, I have developed an application based on threads. An application contains two threads which starts separately (separate class for each thread). On first thread I am showing continuous animation & on second thread I am doing socket connection.