As3 event flow, and a rant

ok, more rant than help, if i dont find the answer here ill probably think of something in the morning but at least i get to vent some. the geniuses of adobe tried to to an event handling closer to traditional programming, only different in every aspect. ok, event handling, wow, lets do something that is not like common declarative languajes (c, c#, java etc), or that looks similar to at least as2, so lets create an event handling thats is not close to anything else, and instead of specifying or 'turn on' the right flow of the event, let the user 'turn off' all the cases that are not the ones he/she wants (that should keep things interesting), so instead of, if i want to pass an event to a container form the control or sprite that gets it, lets create an event that goes from all controls from the inside to all conatiners, and that does not stop unless the user specifically specifies to stop propagating, so let the user create an event handler for a control that should not need an event handler so it does not propagate, and lets make some useless help in the manual aboput some babbling, i mean bubblibng, and lets spit and let the user imagine whatever we could not do right in design time. in other words, lets be creative.
i have a text field, if i want it to receive input i have to set it to 'mouseenabled=true', and if it has mouseenabled=true, it will propagate the click event (when user clicks over textfield to set focus on it) to the stage or whatever container it has.
so the stage or container or whatever receives a click event, but oh lucky, it gets the parameters relative to the object which got the event in the first place, not relative to the stage (so if the user clicks on the text field, and even though the textfield handled the event, it will propagate the click to whatever sprite contains the textfield, and will be handled by those handlers). so the user clicks on the textfield, the textfield gets focus or whatever, and then withoput specifying to propagate the event, it will pass it to the stage. the stage gets the mouse click, but instead of the stage coordinates, it gets the click with coordinates relative to the textfield (so if the textfiled was clicked on x=10, y=10 relative to itself, the stage will get a click event with x=10 and y=10, evenn if relative to the stage the coordinates where something different -they should be the same only if the textfield was in 0, 0, which is not the case- ). ok, the damage is done, so lets learn how to stop the 'bubbling', and lets make guesses since besides of designing it with thier feet, the other geniuses of adobe could not even write it right in the manual. is there at least in the mouseevent object some property that says who was the original caller? (if i dont find an answer here soon i will look into it in the morning, but i wanted to say this anyway)

hmm.. hi, what you said it probably helps, yes it is related to the taget of an event that propagates so you got it right, and i could probably get the atributes from each object in the list, and i wrote the things above because i was pissed at the time (and as i said, i got over it using a mix of stageX and Y with localX and Y). anyway, it does not seem a right way to handle things that instead of stopping in a control that handles the event, and the control having the possibility to propagate it to its containers, do the other way, to have to stop the event from propagating, even though controls and forms and containers and stuff have been treated long enough in many other ides and languajes, and as3 does it all just the contrary of the usual, with having to explicitly stop from 'bubbling', and passing the parameters in the propagation relative to the first object, instead of the current container (so what is the pourpose of this, check the whole list and do the math to find current parameters?), well in any case it was just it, and it was solved. tnx anyway

Similar Messages

  • Flash CS4 - how to create event flow from children to parents?

    In my opinion natural event flow direction is from children
    to its parants.
    E.g. when in dialog box buttons are pressed it is natural to
    inform only
    this dialog box about these actions. When dialog box can't
    handle particular
    event then passes it to its parent and so on .
    Unfortunately this direction is not well supported by Flash.
    To achieve
    support for this event direction it is necessary to call
    parent.dispatchEvent() with bubbling option off. This
    solution is
    inconvenient because sometimes I can't predict what event
    types will be
    triggered inside dialog components. Most likely there is no
    function to
    catch all events which have no defined handlers in dialog in
    order to be
    possible to pass them one level higher.
    Have you got any experience with building communication model
    between
    objects in Flash applications?
    Regards,
    Marek

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY- ERROR EVENT_RAISED - Error updating the process object

    Hi All
    I have set up a simple custom HCM process and Form regarding Infotype TO CREATE AND CHANGE POSITION. I have checked the process and form consistency and it seems fine. Now when I run the process from HRASR_DT it generates a process number but it also gives an error workflow could not start.I get following error (SWIA log - Step history)
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Exception occurred - Error when starting work item 000000007031
    PROCESS_NODE - Error when processing node '0000000014' (ParForEach index 000000)
    CREATE - Error when creating a component of type 'Step'
    CREATE_WIM_HANDLE - Error when creating a work item
    CREATE_VIA_WFM - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event CREATED and (target) status
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY->ERROR
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Executing flow work item - Work item 000000007031: Object FLOWITEM method EXECUTE cannot be executed
    Executing flow work item - Error when processing node '0000000014' (ParForEach index 000000)
    Points to be noted:
    1) I have searched few SAP notes such as 1384961(Notes for 6.0.4) but our system is in higher level patch 6.0.5
    2) WF-BATCH have SAP_NEW and SAP_ALL authorization.
    Appreciate your valuable suggestions.
    Thanks
    Ragav

    Hi Ragav
    did you try to debug this? maybe something is missing in config of P&F?
    Since you are on 605, the following note would be there in your system....use it to debug:
    1422496 - Debugging background workflow tasks in HCM P&F
    This will help you find the root cause.
    regards,
    modak

  • Problem in Events (Create and Change)

    Hi all,
    I have developed a worlflow for transaction FV50. Now the problem is that when i create a parking document a mali is sent to approver for approval.
    Now suppose if approver doesn't do any action on the workitem which he had in his inbox and initiator changes the same document then the previous mail has to be removed and new mail has to be present in the approver inbox.
    I tried using fork with two branches.
    In one branch i kept entire flow and in one branch i have created a WAIT for event. It worked i.e. when i create a doc approver is receiving mail..but when i change the same doc then old mail is deleting from his inbox but he is not getting new mail for the changes he made for the document.
    So please help me how to achieve the same.
    Regards,
    Sagar.

    Hi Raj,
    Thaks for ur reply.
    And it helped me a lot.
    One more thing i need to know is regarding FORK. For the first i am using the same in WF.
    As i said In one branch i have whole logic and in other branch i have wait for event.
    Do i need to do have the same process which is done for create in change branch also.
    Please explain how FORK works.
    Thanks.
    Sagar

  • Dispaly Object Exclude from Event Flow

    Hi!
    I m building a little application, im design the graphic in Flash and im using Flash Builder for the Programming Side.
    I have 5 MovieClip inside a Sprite (the container), and i want to listen for MOUSE.CLICK.
    I add the event listener to the Sprite, instead of one for MovieClip, and its working good like this.
    What if inside the Sprite (the container) i have also a TextField and exclude it from the event flow?
    Thanks!

    Inside flash i have a movieClip, inside this movieClip(the container) i have 5 other movieClip and e text  (look at the picture):
    i want to trigger mouse click just on the movie cilip and not on the text.
    colorPikerUI.addEventListener(MouseEvent.CLICK,clickPikerListener);
    private function clickPikerListener(e:MouseEvent):void{
                    for(var i:int=0;i<colorPikerUI.numChildren;i++){
                        colorPikerUI.getChildAt(i).alpha = 1;
                    MovieClip(e.target).alpha = .3;
                    var indexColor:int = colorPikerUI.getChildIndex(MovieClip(e.target))
                   trace (indexColor)
    colorPikerUI it's a clip inside the red rectangle!
    Thanks!

  • Help regarding event flow/event listening best practices

    Hi, I'm making a flash memory card game to learn more about
    to actionscript.
    I have:
    - a main class that loads on start. This class instantiates
    a:
    - CardLoader class that imports graphical assets and uses
    these to create all my cards:
    - Card class that represents individual card. Can dispatch
    CardEvent when clicked:
    - CardEvent contains info on the Card that dispatched it,
    such as the cards ID number and the ID of it's matching card.
    What I want to do is to have another object to act as a game
    logic handler.
    Example:
    - Card 1 was clicked, dispatches CardEvent that ends up with
    the LogicHandler.
    - Card 2 was clicked and also dispatches event.
    LogicHandler compares these two cards and does the
    appropriate thing depending on they being a match or not.
    Now, the big questions is, how do I get this event to the
    LogicHandler?
    My custom CardEvent has it's bubbles property set to true.
    So, I can manage to get such an event all the way back to my main
    class, in this order: CardEvent > Card > CardLoader >
    Main.
    The problem arises when I want to have my LogicHandler class
    created by Main. When my CardEvent bubbles back, it does not go
    through this LogicHandler since it is not part of the event flow on
    it's way back.
    Questions: How do I, following the best possible programming
    practises, send the event the way I want it to go?
    I can only think of one solution myself, being that inside my
    Main method I set up an eventlistener that listens for this event
    and passes it on downwards, in this case to the LogicHandler. Sure,
    it's only a few lines of code in the main method, but what if you
    have 50 different events in a larger project that needs the same
    treatment?
    Your main method will be a mess by then!
    How would you do it?

    Ok let me see if I get this straight:
    In my example, I would have to pass a reference of the
    LogicHandler to my Card class.
    In my Card class, I have something like:
    logicHandler.addDispatcher(this);
    this being the Card of course.
    Inside LogicHandler class I have the addDispatcher method
    that calls the addEventListener method.
    So far so good?
    The addDispatcher method adds an eventlistener to the Card
    object, from what I can tell. But it does it inside the
    LogicHandler, thus the method that is called by the
    addEventListener can be inside the LogicHandler?
    To put it in other words, what's confusing me is that the
    Listener object adds an EventListener to the dispatching object.
    Logically for me the listener should add a listener to itself?
    The way I first did it in my Card class was:
    testevent = new CardEvent(CardEvent.CLICK);
    dispatchEvent(testevent);
    And then set up the EventListener in the object that I wanted
    to receive the event.
    I'm sorry I don't understand this, despite your obviously
    good explanations (I think I understand a lot more now, just not
    the best approach). I will look into the callback functions, sounds
    a lot interesting as well

  • AS3 event model broken?

    Recently I posted a
    question
    on this forum regarding the mouseclick event. After some
    experimenting I finally figured out that the AS3 event model might
    be broken.
    I include two classes to illustrate my point.
    The first has a sprite inside a sprite. The inside sprite has
    a box drawn in it. As expected when clicking the box you get two
    click events, one for the inside sprite and one for the outside
    one.
    The second has exactly the same structure, yet you only get
    one click event(for the outside sprite). What changed in the second
    is that I rearranged the structure of the display list so that my
    class ClickTest2 becomes the inner sprite.
    How can we explain this behaviour? My only suspicion is that
    somehow the basic class of the application although being a sprite
    is treated in a special manner.

    "Roland G" <[email protected]> wrote in
    message
    news:gg7alf$sgj$[email protected]..
    > Recently I posted a
    >
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=58
    > 5&threadid=1407048&enterthread=y on this forum
    regarding the mouseclick
    > event.
    > After some experimenting I finally figured out that the
    AS3 event model
    > might
    > be broken.
    > I include two classes to illustrate my point.
    > The first has a sprite inside a sprite. The inside
    sprite has a box drawn
    > in
    > it. As expected when clicking the box you get two click
    events, one for
    > the
    > inside sprite and one for the outside one.
    > The second has exactly the same structure, yet you only
    get one click
    > event(for the outside sprite). What changed in the
    second is that I
    > rearranged
    > the structure of the display list so that my class
    ClickTest2 becomes the
    > inner
    > sprite.
    >
    > How can we explain this behaviour? My only suspicion is
    that somehow the
    > basic
    > class of the application although being a sprite is
    treated in a special
    > manner.
    I'm really amazed that having an object remove itself from
    the stage and
    reparent itself works at all. It's not surprising that screws
    stuff up.

  • QT in html, events fired and movie internals doc

    Hi,
    The Javascript Scripting Guide says under "Executing JavaScript Functions From QuickTime", page 11:
    Wired actions can be triggered by user interaction, as a result of a frame in the movie being displayed, or as the
    result of arbitrary wired calculations.
    It also briefly describes (page 23) the matrix and rectangle properties, saying "You can use a movie’s transformation matrix to scale, translate, and rotate the movie image. For details on the transformation matrix, see Movie Internals."
    And the Rectangle is defined as "void SetRectangle(string rect)"
    Where can I find the reference to the events fired by QT automatically ?
    Where can I find this Movie Internals description ?
    I'm not very familiar with javascript... That's not a QT issue, but where can I find a description of the rect ?
    Many thanks
    Jean-Pierre
      Windows XP Pro  

    Yes, you can navigate to other pages using buttons/code in an swf file.  And you can trigger an event as well, though I don't know if that's what you intended to say if navigating to another page is what you are really after.
    In AS3, to make a button work with code, you need to add an event listener and event handler function for it.  You might need to add a few (for different events, like rollover, rollout, clicking it, but for now we'll just say you want to be able to click it to get a web page to open.  In the timeline that holds that button, in a separate actions layer that you create, in a frame numbered the same as where that button exists, you would add the event listener:
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    The name of the unique function for processing the clicking of that button is specified at the end of the event listener assignment, so now you just have to write that function out:
    function btn1Click(evt:MouseEvent):void {
       var url:String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req);

  • When we will go to triggering events programatically and when throgh tab?

    hi experts........
    i am new to work flow can any one tell me that when we will trgger events programatically and when we will trigger through by events tab, what is differnce between them?
    i searce in sdn/google but exactly i didnot get the answer?
    thanks in advance

    Sorry but forum is not for basic training, as you are asking "what are workflow events". Moreover, you should post (more elaborate questions) to workflow forum

  • Regarding Event Flow in Flex.

    Hi all,
               i have a doubt may be silly but i need an clear idea on this,
               Actually coming to events the event flow occurs in 3 phases capturing,targeting and bubbling phases.
               Now suppose inside my application (Main Application ) i have an VBox and inside that i have Hbox and inside Hbox i have Button .
              Suppose now when the user clicks button first what phase will it check wether will it be checking for capturing or bubbling or targeting ?
              i want to know first what phase will it check?
             Sorry for my poor english.

    The main app's capture listener will be first, followed by the hbox capture
    listener, then the button target listener, then the hbox bubble listener
    then the main app's bubble listener.

  • Upgraded to ios 7.1 battery drain is significant and have lost my calendar events. how do i get my events back and why am i losing so much power now?

    how do i get my calendar events back and why the power drain after upgrading my operating system to 7.1?

    Thought I'd reply to this seen as no one else has, I am also experiencing very similar problems with my 4s and by the looks of it is it's across all handsets. I've never had any battery issues with my iPhone even 7.0.6 was fine, but since updating to 7.1 the battery is ticking down very fast. I fully charged in the morning and left it in my locker all day at work when I got my hands on it it's gone down to 52% just on its own!!
    I really hope they sort this out fast the irony is 7.1 was supposed to help battery life!

  • What is difference between ADF Task Flow and Faces-Config - when delpoy ?

    What is difference between ADF Task Flow and Faces-Config? When I create navigation between pages with ADF task flow then the navigation don't work when I deploy my application to Weblogic 10.3. When I use default server then navigation works fine. With Faces_config in both situations all works ok - on Stanalone server and default.
    Where is the problem?
    Best regards!

    Shay, I don't use both faces-config and adf task flow! When I failed with task flow I tried faces-config.
    I have active on my weblogic - adf.oracle.domain(1.0,11.1.1.0.0). This is the right ADF? If yes then where is the problem?
    Best regards!

  • Training n event management and pd

    Hi gurus,
    my cliient wants to implement training n event mgnmt and pd.client is not specific about the procedures of training and development. he wants to implement as per the best practices of sap. i was only into om , pa and payroll.
    i dont even  have a tinge of idea abt these submodules. i tried searching in forums and other sites to to my dissapointmnt. i am in a big soup now as i need to gather the requirement and do the configurations in a weeks time i.e by next weekend. plzzzzzz help me out with some best practices or some config docs as i dont know even the basics of these. I would appreciate if some body is helping me out with config docs.
    Thanks n advance,
    tulsi

    Hi Tulsi,
    Please go to our help website :
    Appraisals
    http://help.sap.com/saphelp_47x200/helpdata/en/77/bff8ab4a2911d182b80000e829fbfe/frameset.htm
    and you can also use the link:
    https://websmp209.sap-ag.de/bestpractices
    Thanks
    Chetan

  • Training & Event management and Appraisal

    Hi,
    Can anyone tell us that Training & Event management and Appraisal are available standard ESS package?
    Thanks,
    Anumit

    Yes, Training & Event management and Appraisal are available in ITS based ESS business package.
    But latest ESS business package(webdynpro based) do not have training and event management. You may need to deploy Learning solution. Full functionality of Appraisal is available with ehp4 of ESS BP.

  • Flow and Static checks

    Hi there,
    I created a datamodel and have applied a condition to it. When I execute the interface the invalid records are captured in the E$ table but all the other valid records do not appear on the target table. I couldn't able to find the reason for this. I have applied flow and static check to the condition and the same for the table column. Im not sure why the validate records are rejected.
    Any help is appreciated.
    Cheers

    HI!
    Let me understand, do you want the invalid records at target table?
    If you use the flow control it will keep the records at E$ and WILL NOT load it.
    If you use static control, it will LOAD the data and, after that, verify what are the records with problems.
    Don't use both controls at same time, it doesn't make logical sense unless when needs to validate distinct constraints at each moment.
    Does it help you?

Maybe you are looking for