Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default EVENTS in flex

    hi friends,
    I am developing an application just like FLEXSTORE sample application.But i
    don't get the eventDispatch in the sample. I have navigate through the source
    several times. But i don't get the idea. Please any one help me to put some
    light on it?.....

    regards

    cvnbgcbn Guest

  2. Similar Questions and Discussions

    1. flex chart data change events
      I need to capture an event for when the data is updated in a chart. I take a snapshot of the chart and save it to a file. But when I do it via a...
    2. Does flex can dispatcher the events by an order
      I got a problem with flex dispatcher events: there is a main button to control the other 5 buttons click event,that means when you click the main...
    3. Flex 2 Project in Flex 3 Swf File Size Increase?
      I have imported my Flex 2 Projects into Flex 3, when I compile my code the resulting swf file is 100-200K larger. Why is that? I thought Flex 3 made...
    4. Not Flex JSP tag lib def in flex-bootstrap.jar (Flex 2Beta 2)
      Hi, The taglib.tld file that was in the Flex 1.5 flex-bootstrap.jar isn't present in the Flex2 Beta2 version of that jar. The interfaces are there...
    5. Is the newest version of flex framework enough good fordeveloping flex rpc services?
      Hallo guys, I've already installed the newest version of flex framework (flex2 beta2 version). I already used beta1 version for developing Rpc...
  3. #2

    Default Re: EVENTS in flex

    I think you will need to clarify where you are seeing the problem.
    Greg Lafrance Guest

  4. #3

    Default Re: EVENTS in flex

    hi,
    I got the problem in productCatalogueEvent.In their is function called
    "dispatchEvent";I doubtfull here.
    If this function is caled here where does it affect?
    I can't get wat will do wen this function called?

    regards


    cvnbgcbn Guest

  5. #4

    Default Re: EVENTS in flex

    I dont have your sample but Events are integral to Flex and it is something
    that is a bit different to most programming. Basically dispatching an event is
    sending information out to anything that is LISTENING to say that something has
    occurred. So, to receive the information you/they define an eventListener
    which listens for that event being dispatched. When the event is dispatched,
    the listener picks it up and then continues with the processing of the program.


    There are lots of sample material for events in the Adobe reference material
    so I suggest going through a few examples of what events are, and what they do.

    BaliHi Guest

  6. #5

    Default Re: EVENTS in flex

    I would examine the FB3 help on events. Bascially, your UI just sits there
    "waiting" for events to be dispatched by other components in response to user
    interaction with the UI, or else dispatched by data availability, for example
    in an HTTPService or WebService.

    I haven't looked at the code, so I don't know how productCatalogueEvent is
    being used in the area of code you are examining, but evidently an event was
    fired probably because of user activity that accesses the product catalog,
    perhaps by filtering what will be displayed.

    Spend a couple of hours in the FB3 help system reading up on events and you
    will be much clearer on what is going on.

    Greg Lafrance Guest

  7. #6

    Default Re: EVENTS in flex

    A handy way as well to approach the documentation is to look at the events
    associated with the particular component in question e.g. button.

    Do a search in help docs FB3 for 'button'. You want to find out what events
    are associated with button, click 'Events' in the menu section associated with
    your find results for 'button', Scroll down until you see a section called
    'Method Detail', this is a list of all the methods associated with button
    events, e.g 'clickHandler() method

    See this kind of info:

    protected function clickHandler(event:MouseEvent):void

    Default handler for the MouseEvent.CLICK event

    Other info here gives other methods e.g mouseDownHandler() method.

    so now you have enough info to use in your code eg

    <mx:Script>
    <![CDATA[
    private function clickHandler(event:MouseEvent):void
    {
    myMessage.text='You clicked it';


    }
    <mx:Button label="Hi There" click="clickHandler()"/>
    <mx:Label text="Label" id="myMessage"">

    Of note is the fact that you get the info clickHandler(event:MouseEvent)
    from searching 'button' in the help docs. Hope this helps get you started.

    Colm


    otisme Guest

  8. #7

    Default Re: EVENTS in flex

    Hi,

    Should have said also, for a look at more complex event handlers and event
    management in Flex Applications, you won't miss out by having a look on
    lynda.com at David Gassner's series of video tutorials on 'Flex 3 Essential
    Training' - also Beyond the Basics

    cheers


    Colm

    otisme Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139