Global Events

Hi There,
I just wanted to clear something up in my mind about Forte Global Events.
By a Forte Global Event I mean an event that is posted in a method of an
EVSO.
Presumably there is no internal application logic to such a posting, as to
what machines it is destined to go to, ie, it is a straight Network
Broadcast (255.255.255.255)
1.
If this is the case, and your phsyical network consists of a number of
sub-nets, it could potentially be broadcast to all devices on all sub-nets,
assuming that your router didn't prevent this.
In order to prevent such broadcasts, presumably, the router would disable
all broadcasts destined to logical port X, which would be the port that Forte
communicates via, to all clients and servers.
Would this port X, be defined as the same port number that is used by the
NameService (?)
2.
If the above is true then presumably it would be considered better to
some application logic to direct the posting of a global event only to active
clients, ie, pass to a server cache, anchored objects from the Client, and loop through
these active clients posting an event to each.
- Carl

Event propagation is a favorite subject of mine.
So I'll join in this discussion.
My view is Forte Events is one of the coolest features of the
system. It is something you usually have to pay a lot
for elsewhere. But hidden in the details of Event propagation
and reception are deep issues where different vendors and
different implementation techiques can have enormously big
impacts on scalability. It turns something that seems rather
simple and benign (posting Events) into a big differentiating factor.
What Forte calls Events is called Publish/Subscribe elsewhere.
I divide Publish/Subscribe into two subclasses: Anonymous and Registered.
Anonymous Publish/Subscribe is where the publisher never knows
who is subscribed at any particular moment. The publisher
publishes blindly, as it were. Examples are Ethernet Multicast,
Radio, TV, Satellite Downlink, etc. Maybe no one is listening,
maybe the whole world. It doesn't matter to the publisher.
Registered Publish/Subscribe is where the publisher does keep
a list of subcribers and sends an individual message to each.
Examples are various forms of push technology, magazine and
periodical publishers, and Forte's event model.
Yes, Forte implements in its event model a form of Registered
Publish/Subscribe. They hide the details of the registration
and deregistration process from the programmer using their
"Post..." and "Event Loop ... When <event> " language
constructs and their sophisticated runtime system.
But everything about the registration is still there under
the covers. Forte is keeping a list of listeners and sending a
message to each one.
So what is the difference between Anonymous and Registered
publish/subscribe from a performance standpoint? From the
subscriber's vantage point, not much. You see the same message
regardless. From the network's point of view (and the publisher's)
there are big differences, especially if you are running over shared
media (such as ethernet).
With Registered Publish/Subscribe the network sees N copies
of the same message being sent, one to each registered listener.
For a large number of listeners this traffic can be
overwhelming and can choke your network.
From the publishers point of view, there is the enormous cost of creating and sending individual messages to each subscriber.
You could, if you were really clever about this, decide to
compute the message (serializing the object graphs and
all that) just once and then sending the message N times.
But I don't think Forte runtime is this clever. Nothing
prevents them from doing this in the future. In fact I
suspect this is one of the reasons Forte's designers hide
the fact of the registration process so well that you cannot
gain access to the list of registered listeners. This will allow
them in the future to tranparently swap out the costly
one-message per listener messaging
model and swap in a more efficient model based on true
Anonymous Publish/Subscribe without a change to the language.
Why is Anonymous Publish/Subscribe more efficient? Because
it uses just a single message broadcast to all destinations.
Much easier on the publisher (server) and the network.
Harder on the subscriber (client) since it receives all the
messages and must filter out the ones it is not interested in.
To solve the "all clients see everything" problem, you can
switch to multicast and provide a way to manage the mapping of
events into different multicast groups. TIBCO and other pub/sub
messaging vendors do this quite well on Ethernet to avoid flooding
every workstation with the entire multicast traffic. I'm not
trying to plug TIBCO here (they are a subsidiary of Reuters,
the company I work for). Just using them as an example of
how this can be done differently.
Footnote: of course, in order to construct the "event" message
just once and send it N times you have to implement a policy such
as "receiver makes right" or always sending "network byte order".
By definition you only generate one message. So it has to be
readable by clients of any byte order or machine architecture.
As Carl points out below, there are good reasons for using
a Registered Publish/Subscribe Model. This occcurs where you
want to perform something special for each client, such as to
send a different message or to not send (filter) the message at all.
These types of decision have to be made on a listener-by-listener
basis.
Fred Scholldorf
[email protected]
516 434 6230
Thanks to Dale V. Georg and David Bell for their quick reponses.
It appears that my assumptions were completely incorrect and that
when an object registers an event on another object in a remote
partition that Forte keeps track of this and when that event is posted,
Forte directs it to only those references.
With this in mind then, I presume that I am correct in assuming that,
1.
Global events are not as network traffic intensive, as I was lead to believe,
ie, you can actually use them, if the need arises.>
2.
it would mean that if you were to want to broadcast a global event
it would probably be more efficient to let Forte do the posting, and
not try yourself to build up a list of references to active client partitions
and post individually to them one at a time. The only time you would want
to really do this would be if you were to broadcast to a subset of
the active cilents, using a single event.
Thanks,
- Carl------------------------------------------------------------------------
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Reuters Ltd.

Similar Messages

  • Global event handler for preinitialize

    Is there anyway to add a global event handler on the
    components preinitialize event?
    What I need to do is to be able to enable / disable, and show
    / hide component dynamically based on a access list. My plan was to
    have a global event handler that listens to the preinitialize
    event, at that time, checks if the user has access to the component
    or not. If not, I'll disable / hide the component.
    What I did so far is:
    in my main app.mxml file, I have:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    preinitialize="preinit(event)"
    so the preinit() function is invoked on the app's
    preinitialize event.
    Then I have the preinit() function (see attached code below).
    However, it does work as there is no trace message printed.
    I changed to use KeyBoardEvent.KEY_DOWN and that seems
    working when I press any key.
    I also tried to use the app.stage.addEventListener() but the
    stage object is null in the preinitialize event.
    Thanks in advance for your help.

    Thank you for follow up on my question.
    I do know these two properties. But that does not solve the
    problem. Let me explain it with an example.
    That's say, when the user logs in, I loads the access list.
    Then the app displays a panel with some form entries. If I am able
    to register a global event listener for the component
    initialization events, I can check the permission and optionally
    hide some components. Otherwise, I would need to programmatically
    travels my component tree to evaluate each component individually
    to set there visible/includeInLayout properties, which is error
    prone.
    The problem is that the component is visible to one user but
    would be hidden to another, so it can not be set at the design
    time.
    The approach I am using right now is to extend the default
    components to add an event listener. But I'd like to know if it is
    possible to register a global event listener to be notified when
    any component is created. As my first post says, I tried to use the
    systemManager and listen to the PREINITIALIZE event, but that
    didn't get always get invoked.

  • Global Event Listeners for all Views in a ViewNavigatorApplication

    Hello,
    As the subject states, I have a ViewNavigatorApplication and I am trying to set up a "global" event listener for all views. Which I am able to do, however I am having problems...
    In my first view, I assign this listener:
    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
    And I also have this function:
    public function handleKeys(event:KeyboardEvent):void {
         if (event.keyCode == Keyboard.MENU) {
                        trace("menu pressed");
                        navigator.pushView(MainMenuView);
    This works fine from the first view. But when I switch views, I get an exception on pushView (navigator is null). I think I understand why, so what is the best practice for something like this? How can I get access to the spark component navigator from that function when called from a different view? Or is there a better way to go about this?
    Thank you!

    Try putting the code in the main mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        firstView="home"
        applicationComplete="init()" >
        <fx:Script>
            <![CDATA[
                private function init():void {
                    this.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
                private function handleKeys(event:KeyboardEvent):void {

  • Catch Global Events

    Hi,
    i have a idea for a program. I want to catch all actions from the users. If the user performed this action with the mouse, i wanna show him a notification with the shortcut of this actions. For example: The user open with the mouse a new tab in Safari the program recognize this and show him a message "Hey you can do this with: Apple + T".
    I played around with the
    Code: 
    addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask
    but i can't find a connection to the Event that has been performed. Is there anybody with a idea how i can do this with build in classes from Cocoa/Objective-c?  Thank in advance for your help Greetings from Germany  Tobi

    Investigate Display.addFilter().
    "John Daly" <[email protected]> wrote in message
    news:c2800n$fdg$[email protected]..
    > How can I catch Global events in SWT. I want to carry out certain
    > functionality when the user pressed a certain button on the keyboard.
    >

  • Interprocess communication with global events and handlers - how?

    Hello. I have a special problem.
    Imagine we have an application running, without using a sap gui.
    This application consists of three objects, interacting with each other.
    The are based on z-classes.
    Now this application runs and runs and runs.
    Suddenly an external device decides to call a rfc-enabled function module.
    As we all know, the external device , which calls the remote enabled function module will open another session for that.
    And the running app is also in another session.
    How could I inform this three running objects, that the rfc module was called???
    Did anyone already encouter this problem and found a solution?
    Global events or whatever???
    Would be very nice,.
    Thanks,

    Hello,
    I did not faced this kind of problem but can suggest to tackle the scenario....
    I would suggest to create a comon function group which call that RFC and other function moudle for status update.
    Use an global data in function group and pass some info when RFC is getting called,,,
    the status FM will only fetch data preiodacily and has to be called from classes...
    I thiknk you would have solution in this way.
    Thanks

  • Global Event Handling

    I am writing a program that needs to detect keystrokes and mouseclicks globally. Right now I am using KeyListener and MouseListener to keep track of all keystrokes and mouseclicks, but that only handles keystrokes and mouseclicks in the window of my application. How can I detect global keystrokes and mouseclicks? I want to be able to open another Windows application (say Notepad) and have my application detect all the keystrokes occuring within that application.
    Thanks

    You will need to research native methods in order to do this. Essentially you will have to have the OS inform your application of these events.

  • Global Event Dispatcher

    I have a Flex object that defines a listener:
    this.addEventListener("dbConnDataChange", dataChanged);
    I have a http service object with an onResult handler that
    will dispatch an event.
    model.appReference.dispatchEvent(new
    Event("dbConnDataChange",true));
    When I dispatch this event it is not caught in the the
    listener object.
    However if I add the listener to the Application mxml object
    it will be caught in the Application object.
    I thought that the dispatcher will walk the through all the
    children of the application and check for listeners but I must be
    missing something. Should this work?
    Thanks for any help

    I can explain this, but I don't think I can do a better job
    than the docs:
    Handling events for display objects
    When Flash Player dispatches an event object, that event
    object makes a round-trip journey from the Stage to the display
    object where the event occurred. For example, if a user clicks on a
    display object named child1, Flash Player dispatches an event
    object from the Stage through the display list hierarchy down to
    the child1 display object.

  • How to handle events between two custom components?

    Hi ,
         i want to handle events between two custom components, example if an event is generated in one custom component ,and i want to handle it any where in the application.....can any one suggest me any tutorial or meterial in this concept...
    thanks

    Events don't really go sideways in ActionScript by default. They bubble upward. If you want to send an event sideways, you will probably have to coordinate with something higher up in the event hierarchy. You can send the event to a common ancestor, and then pass it down the hierarchy as a method argument.
    Another option is to use a framework that supports Injection. There are a number around these days. The one I'm most familiar with is Mate, which allows you to handle events and inject data in MXML. Mate is meant to be used as an MVC framework, and you may want to look into it if your application is complex, but you can also use it to coordinate global event handling if you don't need that level of structure.

  • Removed individual alerts continue to override global alerts?

    Hi.. I seem to have run into a bit of an odd one... I think I have figured out the cause, but I can't figure out a fix.. and I'd like to see if anyone else can reproduce my findings.
    I have recently turned on global alerts for both of the Buddy Becomes Available/Unavailable events which include the default "speak text" alert. This is working fine for all but a couple of my buddies. After some investigation, it seems that the buddies it is failing for are ones that previously had individual Speak Text alerts set for the same two events.
    The implication here is that in the config I now have a "do nothing" configured for these buddies which is overriding the global events. I would have expected that removing the buddy-specific events would have left those buddies with no events, allowing the global event to take place, instead of events that tell iChat to do nothing.
    Can anyone else confirm this behavior? Seems like a bug to me...
    Assuming it can be confirmed, does anyone have any suggestions for fixing the configuration for those buddies?
    iMac G4   Mac OS X (10.4.3)   iChat 3.1

    Hi Matthew,
    Welcome to the Apple Discussion pages
    I have not had this problem with Global and individual Alerts clashing like this.
    The one sure cure is to delete the .plist involved and reset.
    Delete com.apple.ichat.plist from User/(your account)/Library/Preferences
    This will unfortunately also lose saved Status Messages, Text chat Bubble colours, Font styles amoungst others.
    Ralph

  • Using key event

    hey, I have an application with multiple frames and dialogs, that are in top of each other, I would like to define a short key (Ctrl+s for example) on the top frame and to handle the event of this key combination, no matter where the focus is, it might be on other dialog... how can I accomplish this?

    [Global Event Listeners|http://www.camick.com/java/blog.html?name=global-event-listeners]

  • 7344 servo motion switching between open and closed loop operation

    I have a custom end-of-line test system presently using a 4-axis 7344 servo controller to perform various functional tests on small, brushed DC motors. The system is programmed in C/C++ and uses flex motion functions to control the motor during testing. Motors are coupled to external encoder feedback and third party PWM drives running in closed-loop torque mode from an analog command signal. The system uses all four motion axis channels on the 7344 board to independently and asynchronously test up to four production motors at a time.
    In closed-loop mode, the system runs without issue, satisfying the battery of testing protocols executed by this system. I now have a request to add additional test functionality to the system. This testing must be run in open loop mode. Specifically, I need to use my +/- 10v analog output command to my torque drive to send different DAC output levels to the connected motor.drive while monitoring response.
    I do not believe the flex motion library or 7344 controller includes functions to easily switch between open and closed loop mode without sending a new drive configuration. I am also under the impression that I cannot reconfigure one (or more) servo controller axis channels without disabling the entire drive. As my system runs each axis channel in an asynchronous manner, any requirement to shutdown all drives each time I change modes is an unworkable solution.
    I am open to all ideas that will allow asynchronous operation of my 4 motor testing stations. If the only solution is to add a second 7344 controller and mechanical relays to switch the drive and motor wiring between two separately configured servo channels, so be it. I just want to explore any available avenue before I place a price tag on this new system requirement.
    Bob

    Jochen,
    Thank you for the quick response. The 7344 board does an excellent job running my manufacturing motor assemblies through a custom end-of-line tester in closed loop mode. A portion of the performance history and test result couples the motor through a mechanical load and external shaft. The shaft is in contact with a linear encoder that closes my servo loop.
    My new manufacturing requirement is to also sample/document how the small DC motor behaves in open loop operation. Your solution is exactly what I need to perform the additional functional tests on the product I am manufacturing. I see no reason why this cannot work. I was originally concerned that I would need to reinitialize the 7344 board after changing axis configuration. Initialization is a global event and impacts all four channels on the 7344 board.
    Using flex_config_axis() to change axis configuration on a single channel without disturbing other potentially running axis channels will solve my concern. It will be several weeks before I can return to the manufacturing facility where the 7344-based testing machine is located. I will update this thread once I verify a successful result.
    Bob

  • How do I change tempo (batch samples)?

    Hi,
    I have a bunch of loops - 2 to 4 bars in length - melodic... at 120 BPM.
    My project is at 70 BPM.
    The loops at 120 BPM are melodic - and even feel like halftime (60 bpm).
    I would like to get all the samples to my project tempo.
    The loops are .wav files - though just converted to .aiff files.
    Incidently, these "loops" are not going to be looped - they are just snippets of melodies.
    Please let me know best sound, least complicated way to get the same tempo as my project.
    Thanks in advance...

    Okay, fair enough; I'll give it a go.
    First, a quick summary, & then the details from the manual in case my summary *****. Oh, I forgot you can't say s-u-c-k-s; I mean, if it's not terribly good. (And the stuff in my previous post also applies.)
    SUMMARY:
    You can insert tempo changes on the Tempo Track, just underneath the Bar Ruler. It may be that at the moment you don't see a Tempo Track, so in order to display it you need to choose View > Global Tracks.
    (It sounds like you may have been trying to input tempo changes on Audio or MIDI tracks; that's not the right place. It has to be on a Tempo Track.)
    Hopefully that's all you need, but JIC the rest of the info follows; ignore it if you're sorted!
    Of course, if you're already doing all this, & it still isn't working, please get back in touch again…
    In the Arrange Window (Windows > Arrange), the Arrange area is where all MIDI and audio information is recorded, on horizontal tracks. Above the Arrange area is the Bar Ruler, which displays position information.
    Global Tracks provide a perfect way to view and edit global events, such as Tempo, which affect all tracks in the arrangement.
    There are several types of Global tracks, & one of them is the Tempo track, which contains all tempo changes of a song.
    Global tracks can be displayed in the Arrange window, just below the Bar Ruler.
    Global tracks are displayed or hidden by use of the View > Global Tracks menu option.
    Creating Global Events:
    To create a global event (a tempo change, for example), use the Pencil tool and click at the desired position in the track. (If you haven’t changed the default tool assignments, this is done by clicking while holding the Command key). Watch the help tag while holding down the mouse button: It displays the exact position and value (if applicable) of the event to be inserted, until the mouse button is released.

  • How to stop video from playing?

    Hi,
    i have a problem that i've already see that is pretty usual, the videoplayer that i have works fine but when i click in a button to go to another page the videoplayer doesn't stop,the audio continues playing even when i'm not on the videoplayer page.
    I've already found some solutions in the web but none of them worked,probably because i didn't put them in the right place
    The code is a little long:
    // ############# CONSTANTS
    // time to buffer for the video in sec.
    const BUFFER_TIME:Number                = 8;
    // start volume when initializing player
    const DEFAULT_VOLUME:Number                = 0.6;
    // update delay in milliseconds.
    const DISPLAY_TIMER_UPDATE_DELAY:int    = 10;
    // smoothing for video. may slow down old computers
    const SMOOTHING:Boolean                    = true;
    // ############# VARIABLES
    // flag for knowing if user hovers over description label
    var bolDescriptionHover:Boolean = false;
    // flag for knowing in which direction the description label is currently moving
    var bolDescriptionHoverForward:Boolean = true;
    // flag for knowing if flv has been loaded
    var bolLoaded:Boolean                    = false;
    // flag for volume scrubbing
    var bolVolumeScrub:Boolean                = false;
    // flag for progress scrubbing
    var bolProgressScrub:Boolean            = false;
    // holds the number of the active video
    var intActiveVid:int;
    // holds the last used volume, but never 0
    var intLastVolume:Number                = DEFAULT_VOLUME;
    // net connection object for net stream
    var ncConnection:NetConnection;
    // net stream object
    var nsStream:NetStream;
    // object holds all meta data
    var objInfo:Object;
    // shared object holding the player settings (currently only the volume)
    var shoVideoPlayerSettings:SharedObject = SharedObject.getLocal("playerSettings");
    // url to flv file
    var strSource:String                    = root.loaderInfo.parameters.playlist == null ? "playlist.xml" : root.loaderInfo.parameters.playlist;
    // timer for updating player (progress, volume...)
    var tmrDisplay:Timer;
    // loads the xml file
    var urlLoader:URLLoader;
    // holds the request for the loader
    var urlRequest:URLRequest;
    // playlist xml
    var xmlPlaylist:XML;
    // ############# STAGE SETTINGS
    stage.scaleMode    = StageScaleMode.NO_SCALE;
    stage.align        = StageAlign.TOP_LEFT;
    // ############# FUNCTIONS
    // sets up the player
    function initVideoPlayer():void {
        // hide video controls on initialisation
        mcVideoControls.visible = false;
        // hide buttons
        mcVideoControls.btnUnmute.visible            = false;
        mcVideoControls.btnPause.visible            = false;
        mcVideoControls.btnFullscreenOff.visible    = false;
        // set the progress/preload fill width to 1
        mcVideoControls.mcProgressFill.mcFillRed.width    = 1;
        mcVideoControls.mcProgressFill.mcFillGrey.width    = 1;
        // set time and duration label
        mcVideoControls.lblTimeDuration.htmlText        = "<font color='#ffffff'>00:00</font> / 00:00";
        // add global event listener when mouse is released
        stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
        // add fullscreen listener
        stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullscreen);
        // add event listeners to all buttons
        mcVideoControls.btnPause.addEventListener(MouseEvent.CLICK, pauseClicked);
        mcVideoControls.btnPlay.addEventListener(MouseEvent.CLICK, playClicked);
        mcVideoControls.btnStop.addEventListener(MouseEvent.CLICK, stopClicked);
        mcVideoControls.btnNext.addEventListener(MouseEvent.CLICK, playNext);
        mcVideoControls.btnPrevious.addEventListener(MouseEvent.CLICK, playPrevious);
        mcVideoControls.btnMute.addEventListener(MouseEvent.CLICK, muteClicked);
        mcVideoControls.btnUnmute.addEventListener(MouseEvent.CLICK, unmuteClicked);
        mcVideoControls.btnFullscreenOn.addEventListener(MouseEvent.CLICK, fullscreenOnClicked);
        mcVideoControls.btnFullscreenOff.addEventListener(MouseEvent.CLICK, fullscreenOffClicked);
        mcVideoControls.btnVolumeBar.addEventListener(MouseEvent.MOUSE_DOWN, volumeScrubberClicked);
        mcVideoControls.mcVolumeScrubber.btnVolumeScrubber.addEventListener(MouseEvent.MOUSE_DOWN , volumeScrubberClicked);
        mcVideoControls.btnProgressBar.addEventListener(MouseEvent.MOUSE_DOWN, progressScrubberClicked);
        mcVideoControls.mcProgressScrubber.btnProgressScrubber.addEventListener(MouseEvent.MOUSE_ DOWN, progressScrubberClicked);
        mcVideoControls.mcVideoDescription.btnDescription.addEventListener(MouseEvent.MOUSE_OVER, startDescriptionScroll);
        mcVideoControls.mcVideoDescription.btnDescription.addEventListener(MouseEvent.MOUSE_OUT, stopDescriptionScroll);
        // create timer for updating all visual parts of player and add
        // event listener
        tmrDisplay = new Timer(DISPLAY_TIMER_UPDATE_DELAY);
        tmrDisplay.addEventListener(TimerEvent.TIMER, updateDisplay);
        // create a new net connection, add event listener and connect
        // to null because we don't have a media server
        ncConnection = new NetConnection();
        ncConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
        ncConnection.connect(null);
        // create a new netstream with the net connection, add event
        // listener, set client to this for handling meta data and
        // set the buffer time to the value from the constant
        nsStream = new NetStream(ncConnection);
        nsStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
        nsStream.client = this;
        nsStream.bufferTime = BUFFER_TIME;
        // attach net stream to video object on the stage
        vidDisplay.attachNetStream(nsStream);
        // set the smoothing value from the constant
        vidDisplay.smoothing = SMOOTHING;
        // set default volume and get volume from shared object if available
        var tmpVolume:Number = DEFAULT_VOLUME;
        if(shoVideoPlayerSettings.data.playerVolume != undefined) {
            tmpVolume = shoVideoPlayerSettings.data.playerVolume;
            intLastVolume = tmpVolume;
        // update volume bar and set volume
        mcVideoControls.mcVolumeScrubber.x = (53 * tmpVolume) + 318;
        mcVideoControls.mcVolumeFill.mcFillRed.width = mcVideoControls.mcVolumeScrubber.x - 371 + 53;
        setVolume(tmpVolume);
        // create new request for loading the playlist xml, add an event listener
        // and load it
        urlRequest = new URLRequest(strSource);
        urlLoader = new URLLoader();
        urlLoader.addEventListener(Event.COMPLETE, playlistLoaded);
        urlLoader.load(urlRequest);
    function playClicked(e:MouseEvent):void {
        // check's, if the flv has already begun
        // to download. if so, resume playback, else
        // load the file
        if(!bolLoaded) {
            nsStream.play(strSource);
            bolLoaded = true;
        else{
            nsStream.resume();
        vidDisplay.visible = true;
        // switch play/pause visibility
        mcVideoControls.btnPause.visible    = true;
        mcVideoControls.btnPlay.visible        = false;
    function pauseClicked(e:MouseEvent):void {
        // pause video
        nsStream.pause();
        // switch play/pause visibility
        mcVideoControls.btnPause.visible    = false;
        mcVideoControls.btnPlay.visible        = true;
    function stopClicked(e:MouseEvent):void {
        // calls stop function
        stopVideoPlayer();
    function muteClicked(e:MouseEvent):void {
        // set volume to 0
        setVolume(0);
        // update scrubber and fill position/width
        mcVideoControls.mcVolumeScrubber.x                = 318;
        mcVideoControls.mcVolumeFill.mcFillRed.width    = 1;
    function unmuteClicked(e:MouseEvent):void {
        // set volume to last used value or DEFAULT_VOLUME if last volume is zero
        var tmpVolume:Number = intLastVolume == 0 ? DEFAULT_VOLUME : intLastVolume
        setVolume(tmpVolume);
        // update scrubber and fill position/width
        mcVideoControls.mcVolumeScrubber.x = (53 * tmpVolume) + 318;
        mcVideoControls.mcVolumeFill.mcFillRed.width = mcVideoControls.mcVolumeScrubber.x - 371 + 53;
    function volumeScrubberClicked(e:MouseEvent):void {
        // set volume scrub flag to true
        bolVolumeScrub = true;
        // start drag
        mcVideoControls.mcVolumeScrubber.startDrag(true, new Rectangle(318, 19, 53, 0)); // NOW TRUE
    function progressScrubberClicked(e:MouseEvent):void {
        // set progress scrub flag to true
        bolProgressScrub = true;
        // start drag
        mcVideoControls.mcProgressScrubber.startDrag(true, new Rectangle(0, 2, 432, 0)); // NOW TRUE
    function mouseReleased(e:MouseEvent):void {
        // set progress/volume scrub to false
        bolVolumeScrub        = false;
        bolProgressScrub    = false;
        // stop all dragging actions
        mcVideoControls.mcProgressScrubber.stopDrag();
        mcVideoControls.mcVolumeScrubber.stopDrag();
        // update progress/volume fill
        mcVideoControls.mcProgressFill.mcFillRed.width    = mcVideoControls.mcProgressScrubber.x + 5;
        mcVideoControls.mcVolumeFill.mcFillRed.width    = mcVideoControls.mcVolumeScrubber.x - 371 + 53;
        // save the volume if it's greater than zero
        if((mcVideoControls.mcVolumeScrubber.x - 318) / 53 > 0)
            intLastVolume = (mcVideoControls.mcVolumeScrubber.x - 318) / 53;
    function updateDisplay(e:TimerEvent):void {
        // checks, if user is scrubbing. if so, seek in the video
        // if not, just update the position of the scrubber according
        // to the current time
        if(bolProgressScrub)
            nsStream.seek(Math.round(mcVideoControls.mcProgressScrubber.x * objInfo.duration / 432))
        else
            mcVideoControls.mcProgressScrubber.x = nsStream.time * 432 / objInfo.duration;
        // set time and duration label
        mcVideoControls.lblTimeDuration.htmlText        = "<font color='#ffffff'>" + formatTime(nsStream.time) + "</font> / " + formatTime(objInfo.duration);
        // update the width from the progress bar. the grey one displays
        // the loading progress
        mcVideoControls.mcProgressFill.mcFillRed.width    = mcVideoControls.mcProgressScrubber.x + 5;
        mcVideoControls.mcProgressFill.mcFillGrey.width    = nsStream.bytesLoaded * 438 / nsStream.bytesTotal;
        // update volume and the red fill width when user is scrubbing
        if(bolVolumeScrub) {
            setVolume((mcVideoControls.mcVolumeScrubber.x - 318) / 53);
            mcVideoControls.mcVolumeFill.mcFillRed.width = mcVideoControls.mcVolumeScrubber.x - 371 + 53;
        // chech if user is currently hovering over description label
        if(bolDescriptionHover) {
            // check in which direction we're currently moving
            if(bolDescriptionHoverForward) {
                // move to the left and check if we've shown everthing
                mcVideoControls.mcVideoDescription.lblDescription.x -= 0.1;
                if(mcVideoControls.mcVideoDescription.lblDescription.textWidth - 133 <= Math.abs(mcVideoControls.mcVideoDescription.lblDescription.x))
                    bolDescriptionHoverForward = false;
            } else {
                // move to the right and check if we're back to normal
                mcVideoControls.mcVideoDescription.lblDescription.x += 0.1;
                if(mcVideoControls.mcVideoDescription.lblDescription.x >= 0)
                    bolDescriptionHoverForward = true;
        } else {
            // reset label position and direction variable
            mcVideoControls.mcVideoDescription.lblDescription.x = 0;
            bolDescriptionHoverForward = true;
    function onMetaData(info:Object):void {
        // stores meta data in a object
        objInfo = info;
        // now we can start the timer because
        // we have all the neccesary data
        if(!tmrDisplay.running)
            tmrDisplay.start();
    function netStatusHandler(event:NetStatusEvent):void {
        // handles net status events
        switch (event.info.code) {
            // trace a messeage when the stream is not found
            case "NetStream.Play.StreamNotFound":
                trace("Stream not found: " + strSource);
            break;
            // when the video reaches its end, we check if there are
            // more video left or stop the player
            case "NetStream.Play.Stop":
                if(intActiveVid + 1 < xmlPlaylist..vid.length())
                    playNext();
                else
                    stopVideoPlayer();
            break;
    function stopVideoPlayer():void {
        // pause netstream, set time position to zero
        nsStream.pause();
        nsStream.seek(0);
        // in order to clear the display, we need to
        // set the visibility to false since the clear
        // function has a bug
        vidDisplay.visible                    = false;
        // switch play/pause button visibility
        mcVideoControls.btnPause.visible    = false;
        mcVideoControls.btnPlay.visible        = true;
    function setVolume(intVolume:Number = 0):void {
        // create soundtransform object with the volume from
        // the parameter
        var sndTransform        = new SoundTransform(intVolume);
        // assign object to netstream sound transform object
        nsStream.soundTransform    = sndTransform;
        // hides/shows mute and unmute button according to the
        // volume
        if(intVolume > 0) {
            mcVideoControls.btnMute.visible        = true;
            mcVideoControls.btnUnmute.visible    = false;
        } else {
            mcVideoControls.btnMute.visible        = false;
            mcVideoControls.btnUnmute.visible    = true;
        // store the volume in the flash cookie
        shoVideoPlayerSettings.data.playerVolume = intVolume;
        shoVideoPlayerSettings.flush();
    function formatTime(t:int):String {
        // returns the minutes and seconds with leading zeros
        // for example: 70 returns 01:10
        var s:int = Math.round(t);
        var m:int = 0;
        if (s > 0) {
            while (s > 59) {
                m++; s -= 60;
            return String((m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s);
        } else {
            return "00:00";
    function fullscreenOnClicked(e:MouseEvent):void {
        // go to fullscreen mode
        stage.displayState = StageDisplayState.FULL_SCREEN;
    function fullscreenOffClicked(e:MouseEvent):void {
        // go to back to normal mode
        stage.displayState = StageDisplayState.NORMAL;
    function onFullscreen(e:FullScreenEvent):void {
        // check if we're entering or leaving fullscreen mode
        if (e.fullScreen) {
            // switch fullscreen buttons
            mcVideoControls.btnFullscreenOn.visible = false;
            mcVideoControls.btnFullscreenOff.visible = true;
            // bottom center align controls
            mcVideoControls.x = (Capabilities.screenResolutionX - 440) / 2;
            mcVideoControls.y = (Capabilities.screenResolutionY - 33);
            // size up video display
            vidDisplay.height     = (Capabilities.screenResolutionY - 33);
            vidDisplay.width     = vidDisplay.height * 4 / 3;
            vidDisplay.x        = (Capabilities.screenResolutionX - vidDisplay.width) / 2;
        } else {
            // switch fullscreen buttons
            mcVideoControls.btnFullscreenOn.visible = true;
            mcVideoControls.btnFullscreenOff.visible = false;
            // reset controls position
            mcVideoControls.x = 0;
            mcVideoControls.y = 330;
            // reset video display
            vidDisplay.y = 0;
            vidDisplay.x = 0;
            vidDisplay.width = 440;
            vidDisplay.height = 241;
    function playlistLoaded(e:Event):void {
        // create new xml with loaded data from loader
        xmlPlaylist = new XML(urlLoader.data);
        // set source of the first video but don't play it
        playVid(0, true)
        // show controls
        mcVideoControls.visible = true;
    function playVid(intVid:int = 0, bolPlay = true):void {
        if(bolPlay) {
            // stop timer
            tmrDisplay.stop();
            // play requested video
            nsStream.play(String(xmlPlaylist..vid[intVid].@src));
            // switch button visibility
            mcVideoControls.btnPause.visible    = true;
            mcVideoControls.btnPlay.visible        = false;
        } else {
            strSource = xmlPlaylist..vid[intVid].@src;
        // show video display
        vidDisplay.visible                    = true;
        // reset description label position and assign new description
        mcVideoControls.mcVideoDescription.lblDescription.x = 0;
        mcVideoControls.mcVideoDescription.lblDescription.htmlText = (intVid + 1) + ". <font color='#ffffff'>" + String(xmlPlaylist..vid[intVid].@desc) + "</font>";
        // update active video number
        intActiveVid = intVid;
    function playNext(e:MouseEvent = null):void {
        // check if there are video left to play and play them
        if(intActiveVid + 1 < xmlPlaylist..vid.length())
            playVid(intActiveVid + 1);
    function playPrevious(e:MouseEvent = null):void {
        // check if we're not and the beginning of the playlist and go back
        if(intActiveVid - 1 >= 0)
            playVid(intActiveVid - 1);
    function startDescriptionScroll(e:MouseEvent):void {
        // check if description label is too long and we need to enable scrolling
        if(mcVideoControls.mcVideoDescription.lblDescription.textWidth > 138)
            bolDescriptionHover = true;
    function stopDescriptionScroll(e:MouseEvent):void {
        // disable scrolling
        bolDescriptionHover = false;
    // ############# INIT PLAYER
    initVideoPlayer();

    No,im not using flvplayback component (i think).
    Heres the video player that i'm using:
    http://www.thetechlabs.com/tutorials/xml/expanding-the-as3-videoplayer/

  • Advancing Gaming Giants-MSI! Me @ 2015 MSI Gaming Computex Press Conference~

    Working in an exhibition design company, I had the chance to witness the MSI 2015 Gaming Computex Press Conference. Though I play on-line game occasionally, I kinda like the Gaming products of MSI. One of my classmates gave me a MSI Gaming mouse with LED indicators, it’s gorgeous and handy!
    By curiosity, I Googled MSI before the conference. Found out that MSI focused on Gaming Notebooks and high level mobo and graphics for decades, now it is sort of an international gaming leading brand. Its gaming products are definitely dream gears for professional eSport gamers. Seems this company is really something.
    After I got the job done, boss allowed me to watch this conference. Stepped into the hall, I saw the giant size dragon mascot. And there was a photo sticker machine and a claw vending machine; everyone couldn’t refuse to stop steps to the entertainments.
    In the conference hall, there were demo sections of MSI gaming series products. Variety of high level notebook, mobo, graphics, AIO, desktop, and etc. are all here for the participants to try out. More and more participants came and got to know the latest products of MSI.
    The seats were taken very soon by the presses, vendors, and employees. I located myself at an inconspicuous corner to observe the event. In a while, the lights dimmed, and the conference started officially.
    The main stage was designed in red, black and white colors, the 3 elements of MSI Gaming, and decorated with the MSI Gaming Dragon shield. Several pretty models went up to the stage one after the other to show the latest products to the crowd.
    One more highlight of the conference was MSI senior managers and professional speakers to present the new products and new technologies. After that, several important IT companies introduced their cooperation with MSI. By this way, MSI products look really taking comprehensive advantages.
    Everyone was focus on listening to the introductions. I was also very touched, and admired MSI branding much more.
    At the end of the conference, MSI announced hot news. The MSI BeatIT gaming tournament which MSI held for 5 continuously years is renamed to MSI MGA (Masters Gaming Arena) global gaming tournament. In cooperation with world leading gaming company, ESL. The regional qualifiers start in June, and the global final will be held in August in Seattle, USA. Holly…! This is really a big enterprise; hold the global event out of the ordinary.
    The whole conference showed the determination and effort of MSI on Gaming products and the industry. Really impressive.
    At last, here’s one picture of the MSI products and the long leg models to thank you for reading this article.

    MSI gaming SLI Bridges...release when?

  • Differences between XI 3.0 and XI 7.1

    Hi Guys,
    Can some one tell the main and major diffrerences between XI 3.0 and XI 7.1 ?
    or 
    Send me some information where I can look for the same.
    thanks
    Murali

    Hi Muralidhar Karnati  ,
    SAP NWPI v7.1 is designed to cover all integration needs for SAP or non SAP customers.
    The new functionality provided by NWPI v7.1:
    A new Enterprise Services Repository which can be used both at design time and run time. The repository is "high volume ready" and supports UDDI v3.0. The repository implements governance processes and offer a central visibility of the services and their artifacts. The repository is of course loaded with SAP’s enterprise services classification and enterprise services definitions.
    Full support for the latest web services standards including WS-Policy, WS-TX and support for WS-ReliableMessaging (WS-RM).
    Support for incoming message validation using XML Schema
    Support for Events which are a key element of the product. It introduces the notion of Global Events available across all processes to be reacted upon.
    Message bulking for asynchronous invocations has been introduced which helps throughput by a factor of 3 to 4.
    Support for principal propagation which is a pre-requisite for building composite applications.
    NWPI v7.1 is built on a JEE 5 foundation which helps memory consumption. However, it appears that NWPI does not support WS-BPEL (other than as an import format), BPEL4PEOPLE, SCA or SDO just yet.
    Folders are introduced with the development tools in NW PI 7.1. Learn the pros and cons of using folders in PI 7.1 to organize projects and interfaces. XI 3.0 is the XI protocol valid for both SAP NetWeaver ´04 and SAP NetWeaver 7.0.
    SAP® Exchange Infrastructure 3.0: Demo Examples
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d46b9b90-0201-0010-ef92-9964c1bc98e1
    Implementing a Distributed Two-Phase-Commit Scenario with Web Services and SAP NetWeaver PI 7.1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ffdb4d-e869-2a10-7688-891d7eea1b12
    Preview of Web Services Reliable Messaging in SAP NetWeaver Process Integration 7.1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/304335f7-f33c-2a10-ae80-9c9ffdc86415
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

Maybe you are looking for

  • 7.0.1 No Longer Sees My Ipod

    I installed 7.0.1 and now my 1st Gen Ipod is no longer recognized by Itunes. Windows still deals with it properly. I already went through the steps of restarting the service and uninstalling and all that. It was recognized without a problem in 7.0, b

  • Episode shows up in Podcast app but is "not downloadable"

    I am aware that iTunes is having some problems but I can't tell if this is associated with those since I had this same problem once back in November and it was never resolved. I podcast on Tumblr, but I use feedburner to create enclosures on rich med

  • Certain keys on my keyboard no longer work as intended

    All of a sudden my keyboard isnt working as it used to.  Certain keys dont work.  I attempted to trouble shoot, but I also had trouble with the steps listed.  I didnt have the places that it said to go to in my system preferences.  I dont have univer

  • Pulling in Resource initials to Project Online

    Hello! We have Office 365 with ADFS and have synced users using a group to the resource pool in Project Online. It seems like for some reason, it is only syncing the first initial of the user's first name into the Resource Initials section The synced

  • Wait time. Who waits who?

    I saw a query in OEM Top SQL that take 31.75 Activity%, 31.03 CPU% and 30.45 Wait%. I understand the CPU%, and guess the Activity% is of the server activity. But what is exactly the Wait%. Is it the percentage of the total server processes wait for t