Listening for a FMS messge with AS3

I need to get messages from Flash Media Server. I've had a
hard time finding any good books or even info on how to setup a
NetConnection to listen for a Flash Media Server message and to
convert the binary data to info I can use. Can someone please point
me in the right direction???
Thanks!

Relax. I was providing a reference to the other thread for context since they seem to be the same discussion, and it wastes time for people to be answering questions to two different threads on the (more or less) same subject without knowing the whole story.
Trying to detect "something" coming into the ethernet port is too vague of a question. Any computer connected to a network will always have something coming into the ethernet port. I doubt very much whether you want to be analyzing every single packet that comes in to determine that you've had a file uploaded. Unless the other computer can send you a message I would suggest simply monitoring the directory to look for changes in the list of files like I suggested. In Windows there's an API function that you can hook into that will provide notification of a file system change. There may be something like that for a Mac, but I ain't got a Mac so I can't say what that is.

Similar Messages

  • A way for vb6 to comunicate with as3?

    Hi,
    Im trying to find away of getting flash to play happy with vb6.
    This was easy enough when using as2. But when using as2, for a vb developer to change a variable in flash they would use somthing like _root.vartochange = "blar blar".
    However in as3 there is no such thing as "_root". Ive research this alot and caunt find anyway for vb to comunicate with flash. Would turning the flash into an air app make things any easier does any one know? This is a standalone flash app Im developing and not for web.
    Has anyone a solution to this?
    Thanks
      Aidan

    I hadn't seen a reply to this message and I'm running into the same problem with JAZN, i.e. JAZN-LDAP is authenticating all users with a blank password.
    Is the only solution to turn off anonymous binds?
    Thanks

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

  • Building ios Newsstand App with AS3 for iPad?

    Hi,
    How do I build an IOS newsstand App with AS3 for iPad? I will not need any updates for this app. It will be just a pdf magazine inside, same contents forever.
    I cant find any tutorials/introduction on how to build this.
    I get the idea on how to create normal ios App, but creating Newsstand App really confussed me.
    Hope I can get a good start here
    Help is appreciated!

    Sorry I've been busy.
    Have a look at this newsstand app tutorial that's in 2 parts. This is for native iOS however the packaging is the most important.
    http://www.viggiosoft.com/blog/blog/2011/10/17/ios-newsstand-tutorial/
    http://www.viggiosoft.com/blog/blog/2011/10/29/at-newsstand-and-subscriptions/
    The in-app subscription is something you're going to have to tackle. Are you selling this magazine on a subscription basis? If you are selling it, things can get tricky or possible. I'm not fluent on the latest in-app purchase integration or if there is any planned integration. A look on the ANE download page (http://www.adobe.com/devnet/air/native-extensions-for-air.html) doesn't show any ANE support for it. You could google around for an ANE that supports in-app subscriptions of course.
    Hope that helps.
    Please be sure to read the entire 2 articles listed above. I realize they do not strictly have to do with Adobe but they do outline the process of getting an app on newsstand and it's just up to us as developers to translate tutorials like that into our world.

  • Mouse motion listener for JTable with JScrollpane

    Hi All,
    I have added mouse motion listener for JTable which is added in JScrollPane. But if i move the mouse, over the vertical/horizontal scroll bars, mouse motion listener doesn't works.
    So it it required to add mousemotionlistener for JTable, JScrollPane, JScrollBar and etc.
    Thanks in advance.
    Regards,
    Tamizhan

    I am having one popup window which shows address information. This window contains JTable with JScrollPane and JButton components to show the details. While showing this information window, if the mouse cursor is over popupwindow, it should show the window otherwise it should hide the window after 30 seconds.
    To achieve this, i have added mouse listener to JPanel, JTable, JButton and JScrollPane. so if the cursor is in any one of the component, it will not hide the window.
    but for this i need to add listener to all the components in the JPanel. For JScrollPane i have to add horizontal, vertical and all the top corner buttons of Scroll bar.
    Is this the only way to do this?

  • Help with AS3 for CP5.5

    Hi,
    It seems that nobody can help me with my question http://forums.adobe.com/message/4900688#4900688  regarding some AS3 coding for Captivate course, therefore I would like to ask if anyone can help me in this forum section.
    How can I achive this:
    I am trying to open Captivate published SWF and to navigate to a specific slide, slide number 5 for example.
    Now, I created blank swf in flash containing this code:
    var myRoot:MovieClip = MovieClip(root);
    var mainmov:MovieClip = MovieClip(myRoot.parent.root);
    var external:Loader = new Loader()
    external.load(new URLRequest("../introduction.swf"))
    addChild(external)
    I have inserted this swf into a blank Captivate slide, and it loads fine. It plays from the beginning. Now I need this external Captivate  swf to play from slide number 5, since this is crucial (it will trigger some advanced actions inside course and some menu buttons will become available since they are not available when this course SWF is opened through its htm wrapper, so I  skip LMS communication when I open just SWF file, this is in short what I am trying to achieve ).
    AS3 for standard SWF created with  Flash will use something like this to navigate to a certain frame or scene of that external file:
    this.addEventListener(Event.ADDED_TO_STAGE,  startExternal);
    function startExternal(e:Event):void
        this.externalfileinstance.gotoAndPlay('5');
    Does anyone have any idea how to do something like this with Captivate SWF file? How to "tell" to CP SWF file to jump to a certain slide or at least a frame number? I hope that perhaps someone here knows something about this.
    Thanks!

    you should be able to use frame numbers.  i don't know which frame number you want to navigate to but you should be able to determine that using trial and error.
    also, you'll need to ensure that frame is loaded before applying your gotoAndPlay. ie, use a loop (eg, enterframe) to repeatedly check your framesLoaded property.

  • Listen for events from an embedded Swf

    Hi there,
    I have spend so long searching for an answer on the web but can not find any that works, please help!
    I'm not even sure if this is possible but if anyone can guide me in the right direction I would most appreciate it!
    Basically what I would like to do is to load a swf in to my flex application - contrary to my post title it doesnt even have to be embedded - when the loaded swf finishes playing it's animation I want for it to dispatch an event and for flex to listen for that event and trigger a function when the event is captured.
    The animation is made in Flash CS3. I have not used any classes, rather on the last frame I set up an action to dispatch an event like this:
    dispatchEvent(new Event("finishedPlaying"));
    In my Flex Application I load my swf using swfLoader and I add an event listener to it like so:
    mySwfLoader.addEventListener("finishedPlaying", test);
    and my function is like this:
    private function test():void
         trace("it worked!");
    This is not working at all and I'm sure I am missing something but I cant seem to find any straightforward answer on the internet!
    Is it at all possible for a swf made in flash to communicate with flex??
    Since they are both written in AS3, I figured it would be easy but alas!
    If anyone can help me I would most appreciate it, thank you in advance!!
    By the way I have also tried:
    mySwfLoader.content.addEventListener("finishedPlaying", test);
    but no luck....

    You have to wait for the swf to complete loading before adding the event listener.
    When are you adding the event listener?
    mySwfLoader.addEventListener("finishedPlaying", test);
    Have a look at the SWFLoader complete event:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html#event:complete

  • Remove stage listener for multiple movieclips

    I would like to completely remove personalized stage listeners, for each movieclip as soon as they are placed where they need to be, but the listeners remain every single time a new clip is dragged.
    Thank you for any help!
    function clickToDrag(targetClip:MovieClip):Function {
              return function(e:MouseEvent):void {
                        startingPosition[targetClip.name] = new Point(targetClip.x, targetClip.y);
                        targetClip.startDrag(false, new Rectangle(0,0,800,600));
                        setChildIndex(targetClip,numChildren - 1);
                        trace('clickToDrag function invoked\ntargetClip: ' + targetClip.name + '\startingPosition: ' + startingPosition[targetClip.name] + '\n\n');
                        stage.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    /*          releaseToDrop
              @function          stopDrag for current clip, if dropped off stage, returns to recorded beginning location
              @param                     targetClip:MovieClip
              @param                     startPosition:int
              @returns          event:void
    function releaseToDrop(targetClip:MovieClip):Function {
              return function(e:MouseEvent):void {
                        targetClip.stopDrag();
                        trace('releaseToDrop function invoked\ntargetClip: ' + targetClip.name + '\n\n');
                        stage.removeEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
                        stage.addEventListener(Event.MOUSE_LEAVE, mouseGone);
                        function mouseGone () {
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });
                                  //toggle comments to ease or not ease back to startingPosition
                                  //targetClip.x = startingPosition[targetClip.name].x;
                                  //targetClip.y = startingPosition[targetClip.name].y;
                                  stage.removeEventListener(Event.MOUSE_LEAVE, mouseGone);
                                  trace('releaseToDrop function invoked\ntargetClip dragged out of bounds: ' + targetClip.name + '\n\n');
    /*          checkTarget
              @function          checks if current clip is dragged to drag1target(dock), updates boat weight and waterline, remove listeners
              @param                     targetClip:MovieClip
              @param                     lbsAmount:int
              @param                     targetLocation:MovieClip
              @returns          event:void
    function checkTarget(targetClip:MovieClip,lbsAmount:int,targetLocation:MovieClip):Function {
              return function(e:MouseEvent):void {
                        if (targetClip.hitTestObject(drag1target)) {
                                  targetClip.x = targetClip.x;
                                  targetClip.y = targetClip.y;
                                  drop.play();
                                  TweenLite.to(targetClip, .5, { alpha: 0, onComplete:fadein });
                                  function fadein() { TweenLite.to(targetLocation, .5, { alpha: 1 }); }
                                  noMC.waterlineMC.y = noMC.waterlineMC.y - 3;
                                  lbs -= lbsAmount;
                                  lbsTxt.htmlText = lbs + "<font size='16'>lbs</font>";
                                  targetClip.buttonMode = false;
                                  targetClip.mouseEnabled = false;
                                  targetClip.removeEventListener(MouseEvent.MOUSE_UP, checkTarget);
                                  targetClip.removeEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
                                  /* TODO: Issue with stage listener for every clip, opportunity to handle programmatically? */
                                  /* check to see if eventListenter is still present */
                                  if(targetClip.hasEventListener(MouseEvent.MOUSE_DOWN)) {
                                            trace(targetClip.name + ' still has MOUSE_DOWN event listener');
                                  if(targetClip.hasEventListener(MouseEvent.MOUSE_UP)) {
                                            trace(targetClip.name + ' still has MOUSE_UP event listener');
                        } else if (borderMC.hitTestPoint(targetClip.x, targetClip.y, true)){
                                  /*targetClip.y = startingPosition[targetClip.name].y;
                                  targetClip.x = startingPosition[targetClip.name].x;                              */
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });
                        } else {
                                  /*targetClip.y = startingPosition[targetClip.name].y;
                                  targetClip.x = startingPosition[targetClip.name].x;          */
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });

    i will try to show you a way that might help you to understand how the event-model in as3 is meant to work.
    look at this code:
    //with a MovieClip "DragClip" in the Library exoported for ActionScript
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    for (var i:int = 0; i<10;i++){
        var mc:DragClip = new DragClip();
        addChild(mc);
        mc.mouseChildren = false;
        mc.addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
        mc.addEventListener(MouseEvent.MOUSE_UP, dragStop);
        addChild(mc);
    function dragStart(e:MouseEvent):void {
        e.currentTarget.startDrag();
        trace("dragging started");
    function dragStop(e:MouseEvent):void {
        e.currentTarget.stopDrag();
        trace("dragging stopped");
        e.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
        e.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, dragStop);
    //it places hundred Movieclips on the stage
    //makes them draggable
    //but after they are dragged once
    //they stay in place

  • Listener for frame label in movie clip

    I'd like to create an 'addListener' that will trigger an
    action when a certain movie clip reaches a frame label in that
    clip. Is this doable? (I've never used 'addListener' or listener
    events).
    Thanks for any help.

    with as3, yes. with as2, no.

  • How can mc_instance listen for MouseEvent?

    hello;
    my_mc_instance.addEventListener( MouseEvent.MOUSE_DOWN ,
    a_function ) ;
    I do not understand why my_mc_instance even knows what a
    mouseevent is; for instance, I have to know what a "knock on the
    door" is before I can listen for it;
    movieclips DO NOT inherit from: Mouse or MouseEvent or even
    Event;
    movieclips inherit from:
    MovieClip --> Sprite --> DisplayObjectContainer -->
    InteractiveObject --> DisplayObject --> EventDispatcher
    --> Object
    so how do they even know what a MouseEvent is?
    it would seem to me that trying to add a mouseevent listener
    to my_mc_instance would never fire since movieclips do not inherit
    any mouse-related stuff;
    furthermore, according to MovieClip.as, MovieClip class
    already has methods that are apparently firing for the mouseevents:
    ActionScript Code:
    function onMouseDown():Void;
    function onMouseMove():Void;
    function onMouseUp():Void;
    function onPress():Void;
    function onRelease():Void;
    function onReleaseOutside():Void;
    function onRollOut():Void;
    function onRollOver():Void; ...
    which makes me wonder why it is even necessary to add
    mouse-related listeners to an mc;
    any thoughts?
    thanks
    dsdsdsdsd

    Hey,
    The reason movie clips dispatch mouse events is because movie
    clips inherit from InteractiveObject. All InteractiveObjects
    dispatch mouse events, so naturally, movie clips dispatch mouse
    events.
    For an object to be able to dispatch events, it doesn't have
    to inherit from the specific event class (MouseEvent class), just
    another class that dispatches those events (InteractiveObject).
    The script you included contains methods from AS2. You can't
    use them in AS3, so the only way to trigger anything with the mouse
    is to add event listeners.

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • How to configure multiple listeners to listen for the same instance.

    Hello everyone,
    I am running oracle database 11g and I want information regarding how to configure multiple listeners to listen for the same database instance. Actually I know how to configure more than one listener but the main thing that I am confused about is when we create listener.ora file, do we have to statically register the database instance with both the listeners or the instance will register itself with both the listeners.
    According to my knowledge the instance will register with the listener specified by LOCAL_LISTENER parameter and we cannot have more than one value for this parameter.
    Please only give detailed answers with example as I am tired of simple answers with details that I already know.

    Hello,
    Yes, it can make sense to have several listener for one Oracle instance. For instance you may have one listener for the applications another listener for DBA administration tasks as well as one listener dedicated to dataguard broker. It is not possible to have several listeners listening on the same IP and Port.
    By default the database try to automatically register to a listener on port 1521. To instruct the instance to register to a specifc list of listeners you can add in the init.ora the local_listener parameter with an alias definition:
    i.e
    local_listener=MY_SET_OFF_LISTENERS
    in your tnsname.ora add an entry called:
    MY_SET_OFF_LISTENERS_LOCAL= (ADDRESS_LIST=
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1530))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1531))
    (ADRESS=(PROTOCOL=TCP)(HOST=myhostname)(PORT=1532))
    In this sample your instance will register to three listeners listening on respectively port 1530, 1531 and 1532
    If you want your clients can be balanced over the 3 listeners

  • Huge performance differences between a map listener for a key and filter

    Hi all,
    I wanted to test different kind of map listener available in Coherence 3.3.1 as I would like to use it as an event bus. The result was that I found huge performance differences between them. In my use case, I have data which are time stamped so the full key of the data is the key which identifies its type and the time stamp. Unfortunately, when I had my map listener to the cache, I only know the type id but not the time stamp, thus I cannot add a listener for a key but for a filter which will test the value of the type id. When I launch my test, I got terrible performance results then I tried a listener for a key which gave me much better results but in my case I cannot use it.
    Here are my results with a Dual Core of 2.13 GHz
    1) Map Listener for a Filter
    a) No Index
    Create (data always added, the key is composed by the type id and the time stamp)
    Cache.put
    Test 1: Total 42094 millis, Avg 1052, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 2: Total 43860 millis, Avg 1096, Total Tries 40, Cache Size 80000
    Update (data added then updated, the key is only composed by the type id)
    Cache.put
    Test 3: Total 56390 millis, Avg 1409, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 4: Total 51734 millis, Avg 1293, Total Tries 40, Cache Size 2000
    b) With Index
    Cache.put
    Test 5: Total 39594 millis, Avg 989, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 6: Total 43313 millis, Avg 1082, Total Tries 40, Cache Size 80000
    Update
    Cache.put
    Test 7: Total 55390 millis, Avg 1384, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 8: Total 51328 millis, Avg 1283, Total Tries 40, Cache Size 2000
    2) Map Listener for a Key
    Update
    Cache.put
    Test 9: Total 3937 millis, Avg 98, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 10: Total 1078 millis, Avg 26, Total Tries 40, Cache Size 2000
    Please help me to find what is wrong with my code because for now it is unusable.
    Best Regards,
    Nicolas
    Here is my code
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.extractor.ReflectionExtractor;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.MapEventFilter;
    public class TestFilter {
          * To run a specific test, just launch the program with one parameter which
          * is the test index
         public static void main(String[] args) {
              if (args.length != 1) {
                   System.out.println("Usage : java TestFilter 1-10|all");
                   System.exit(1);
              final String arg = args[0];
              if (arg.endsWith("all")) {
                   for (int i = 1; i <= 10; i++) {
                        test(i);
              } else {
                   final int testIndex = Integer.parseInt(args[0]);
                   if (testIndex < 1 || testIndex > 10) {
                        System.out.println("Usage : java TestFilter 1-10|all");
                        System.exit(1);               
                   test(testIndex);               
         @SuppressWarnings("unchecked")
         private static void test(int testIndex) {
              final NamedCache cache = CacheFactory.getCache("test-cache");
              final int totalObjects = 2000;
              final int totalTries = 40;
              if (testIndex >= 5 && testIndex <= 8) {
                   // Add index
                   cache.addIndex(new ReflectionExtractor("getKey"), false, null);               
              // Add listeners
              for (int i = 0; i < totalObjects; i++) {
                   final MapListener listener = new SimpleMapListener();
                   if (testIndex < 9) {
                        // Listen to data with a given filter
                        final Filter filter = new EqualsFilter("getKey", i);
                        cache.addMapListener(listener, new MapEventFilter(filter), false);                    
                   } else {
                        // Listen to data with a given key
                        cache.addMapListener(listener, new TestObjectSimple(i), false);                    
              // Load data
              long time = System.currentTimeMillis();
              for (int iTry = 0; iTry < totalTries; iTry++) {
                   final long currentTime = System.currentTimeMillis();
                   final Map<Object, Object> buffer = new HashMap<Object, Object>(totalObjects);
                   for (int i = 0; i < totalObjects; i++) {               
                        final Object obj;
                        if (testIndex == 1 || testIndex == 2 || testIndex == 5 || testIndex == 6) {
                             // Create data with key with time stamp
                             obj = new TestObjectComplete(i, currentTime);
                        } else {
                             // Create data with key without time stamp
                             obj = new TestObjectSimple(i);
                        if ((testIndex & 1) == 1) {
                             // Load data directly into the cache
                             cache.put(obj, obj);                         
                        } else {
                             // Load data into a buffer first
                             buffer.put(obj, obj);                         
                   if (!buffer.isEmpty()) {
                        cache.putAll(buffer);                    
              time = System.currentTimeMillis() - time;
              System.out.println("Test " + testIndex + ": Total " + time + " millis, Avg " + (time / totalTries) + ", Total Tries " + totalTries + ", Cache Size " + cache.size());
              cache.destroy();
         public static class SimpleMapListener implements MapListener {
              public void entryDeleted(MapEvent evt) {}
              public void entryInserted(MapEvent evt) {}
              public void entryUpdated(MapEvent evt) {}
         public static class TestObjectComplete implements ExternalizableLite {
              private static final long serialVersionUID = -400722070328560360L;
              private int key;
              private long time;
              public TestObjectComplete() {}          
              public TestObjectComplete(int key, long time) {
                   this.key = key;
                   this.time = time;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
                   this.time = in.readLong();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
                   out.writeLong(time);
         public static class TestObjectSimple implements ExternalizableLite {
              private static final long serialVersionUID = 6154040491849669837L;
              private int key;
              public TestObjectSimple() {}          
              public TestObjectSimple(int key) {
                   this.key = key;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
              public int hashCode() {
                   return key;
              public boolean equals(Object o) {
                   return o instanceof TestObjectSimple && key == ((TestObjectSimple) o).key;
    }Here is my coherence config file
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>test-cache</cache-name>
                   <scheme-name>default-distributed</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>          
              <distributed-scheme>
                   <scheme-name>default-distributed</scheme-name>
                   <backing-map-scheme>
                        <class-scheme>
                             <scheme-ref>default-backing-map</scheme-ref>
                        </class-scheme>
                   </backing-map-scheme>
              </distributed-scheme>
              <class-scheme>
                   <scheme-name>default-backing-map</scheme-name>
                   <class-name>com.tangosol.util.SafeHashMap</class-name>
              </class-scheme>
         </caching-schemes>
    </cache-config>Message was edited by:
    user620763

    Hi Robert,
    Indeed, only the Filter.evaluate(Object obj)
    method is invoked, but the object passed to it is a
    MapEvent.<< In fact, I do not need to implement EntryFilter to
    get a MapEvent, I could get the same result (in my
    last message) by writting
    cache.addMapListener(listener, filter,
    true)instead of
    cache.addMapListener(listener, new
    MapEventFilter(filter) filter, true)
    I believe, when the MapEventFilter delegates to your filter it always passes a value object to your filter (old or new), meaning a value will be deserialized.
    If you instead used your own filter, you could avoid deserializing the value which usually is much larger, and go to only the key object. This would of course only be noticeable if you indeed used a much heavier cached value class.
    The hashCode() and equals() does not matter on
    the filter class<< I'm not so sure since I noticed that these methods
    were implemented in the EqualsFilter class, that they
    are called at runtime and that the performance
    results are better when you add them
    That interests me... In what circumstances did you see them invoked? On the storage node before sending an event, or upon registering a filtered listener?
    If the second, then I guess the listeners are stored in a hash-based map of collections keyed by a filter, and indeed that might be relevant as in that case it will cause less passes on the filter for multiple listeners with an equalling filter.
    DataOutput.writeInt(int) writes 4 bytes.
    ExternalizableHelper.writeInt(DataOutput, int) writes
    1-5 bytes (or 1-6?), with numbers with small absolute
    values consuming less bytes.Similar differences exist
    for the long type as well, but your stamp attribute
    probably will be a large number...<< I tried it but in my use case, I got the same
    results. I guess that it must be interesting, if I
    serialiaze/deserialiaze many more objects.
    Also, if Coherence serializes an
    ExternalizableLite object, it writes out its
    class-name (except if it is a Coherence XmlBean). If
    you define your key as an XmlBean, and add your class
    into the classname cache configuration in
    ExternalizableHelper.xml, then instead of the
    classname, only an int will be written. This way you
    can spare a large percentage of bandwidth consumed by
    transferring your key instance as it has only a small
    number of attributes. For the value object, it might
    or might not be so relevant, considering that it will
    probably contain many more attributes. However, in
    case of a lite event, the value is not transferred at
    all.<< I tried it too and in my use case, I noticed that
    we get objects nearly twice lighter than an
    ExternalizableLite object but it's slower to get
    them. But it is very intersting to keep in mind, if
    we would like to reduce the network traffic.
    Yes, these are minor differences at the moment.
    As for the performance of XMLBean, it is a hack, but you might try overriding the readExternal/writeExternal method with your own usual ExternalizableLite implementation stuff. That way you get the advantages of the xmlbean classname cache, and avoid its reflection-based operation, at the cost of having to extend XMLBean.
    Also, sooner or later the TCMP protocol and the distributed cache storages will also support using PortableObject as a transmission format, which enables using your own classname resolution and allow you to omit the classname from your objects. Unfortunately, I don't know when it will be implemented.
    >
    But finally, I guess that I found the best solution
    for my specific use case which is to use a map
    listener for a key which has no time stamp, but since
    the time stamp is never null, I had just to check
    properly the time stamp in the equals method.
    I would still recommend to use a separate key class, use a custom filter which accesses only the key and not the value, and if possible register a lite listener instead of a heavy one. Try it with a much heavier cached value class where the differences are more pronounced.
    Best regards,
    Robert

  • What is wrong with as3

    this is not a question about 'how i do X'. is rather a 'discussion' (flame or whatever, but to defend or argue about aspects, not people) about 'what is wrong with as3' and what aspects whould be taken into consideration for updates. right now i am using as3, and since i paid for this license, i choose this tool over some alternatives and i am using it to do stuff for other people who pay me to do it, i think it can be helpful for all of us if some actions are started in the right direction. i have already posted about 'all people in adobe are dumbasses that do not know how to make a scripting tool and are messing up my work', but i was pissed at the time (i still am pissed) but i believe this is not the right aproach. instead, if this goes to the right people in adobe, we all may get something in the future, like better and easier todo apps and web presentations.
    pre: not only about the as3 specification, but COMPLY with the specification that you set. for example, some time ago there were problems with matrix transforms. this was corrected later with a patch. but this means it is not even doing what is is supposed to do
    1. scriptable masks and movement, sprites and child sprites: there is a sprite with a mask, the mask is a shape drawn via script, something like
    somemask=new shape();
    somemask.graphics.beginfill();
    (...etc)
    somesprite.mask=somemask;
    just like that. now add some child sprites to 'somesprite', and make 'somesprite' move, scale and rotate. there you will have something like a kaleidoscope, but not what you expected to do with your script. as the child sprites move in the parent mask, you will see that the child sprites appear or dissapear kind of randomly, and if the child sprites are textfields, it may be that the text is rendered outside the mask, or partially rendered outside the mask (as in only part of the text), rendered with the wrongf rotation or in the wrong place. some child sprites are clipped correctly, some dissapear totally when only a part should dissapear (clipped) etc.
    way around: have not tried it yet, but i have the impression that bitmaps have different criteria for clipping, so i am thinking of trying this: appli an empty filter (a filter with params so it does not have any effect on the sprite or in the textfield) so the sprite is rendered as bitmap before doing anything else with it. as i said, i have not done it yet, but it may be a way around this problem, to avoid all this inconsistency with clipping
    1-b. inconsistency between hierarchy and coordinates, specially masks: you apply a mask to a sprite, yet the sprite has a set of coordinates (so 'x' in the sprite means an x relative to its container), yet the mask applied to the very same sprite, as another reference as reference for coordinates (like the stage)
    2. painting via script: in any other languaje, in any other situation, something like:
    beginFill(params);
    (...stuff 1)
    endFill();
    beginFill(params);
    (...stuff 2)
    endFill();
    (...etc)
    means: render region of block 1, then render region of block 2 etc, and no matter what, it should be consistent, since there is noplace for ambiguity. if you read it, you may think what that means, even if you dont run it you may have an idea of the picture you want to draw, but not with as3. as3 somehow manages to screw something that simple, and mixes all the blocks, and somehow uses the boundaries of one block as boundaries for other block. is like all blocks are dumped into whatever, and then uses all lines defined into it as boundaries for a unique block. it changes all boundaries and generates inconsistency between what is shown and redraw regions of the resulting picture, like lines that go to the end of the screen and then dont go away in the next frames, even tough the beginfill endfill block should prevent it
    3. event flow: i dont know what was the policy behind as3 event flow design. it is in no way similar or an extension to previous event flow, neither with any event flow in any other plattform. i dont know how most people start with as3; in my case, i unpacked, installed and when i tried to do something with what i already knew i could not, so i started reading the as3 docs, and since is like 800 pages long, i just read the basics and the rest i would 'wing it'. in the part of the event flow, there was something about bubbling and stuff, it was not clear at all and when i tried to do what is was said in the documentation (like preventing events to 'bubble', as is called in the documentation), i could not see any effect but i could see it was a mess. flash is not the only thing out there to work with pictures or to work with mouse events, but is the only one that deals with things like 'target' and 'currentTarget'. my first experience on needing this was when i was dealing with my own event handlers (so the only thing that had control over mouse was the stage, and i would admin everything via script). there were events generated everywhere, the stage got events that were not genrated directly over the stage, but got there not with stage coordinates but the coordinates relative to the sprite that generated the event. so if i hover the mopuse over the stage, and the stage has some things on it how does it work? i get multiple event calls, like it was hovering multiple times over the stage in a single frame, but in each call with different coordinates? and what if i set all child sprites as mouseenabled=false or compare like 'if (event.target != event.currenttarget)', what if i move the mouse over a child, does it prevent the move mouse event at all? or does it filter only the event call with only stage coordinates? in my case, every time i move over another clip (with mouseenabled = true), the stage gets it as 'mouse up', even tough there was never a mouse release, what the hell? do even the people at adobe know how to handle events with their own tool when they require it? why does an event 'bubble' when i have not specifically tell it to do it? mi thought is that this event flow was very poorly conceived, and tough the intention may have been that there were different cases and it shopuld cover all cases, they actually introduced new problems that were not present in traditional ways to handle it, and it is neither the easier way to handle things, and this way, a very simple problem turns into a very ugly thing because it must handle things that were not neccesary to handle, or were implicit in other situations.
    4. legacy: since as3, all interaction is different, and if you want to do things in the new plattform, using the new features, what you already knew just goes to the garbage can. when a new tool arrives, it should be an extension to previous tools (which is a reason to update instead of just buying a new tool from a different vendor). if everything i had or knew just means nothing from now on, then i can not say 'i know flash script', and my previous knowledge gives me no advantage when aproaching the new version. as3 is a new aproach that requires doc reading and stuff, even if you knew something about previous as specifications or other oo languajes. if you decide to change things from now on, like the things mentioned in this post, instead of just throwing away everything the users alerady knew about the tool, do like in java releases, they mark some things as 'deprecated', they keep working as they should, give a warning, but also a message saying this feature is deprecated, we suggest you use this library instead.
    5. lack of previous functionality: if you 'update' something, it meand all previos functionality is still there (probably improved, but not with bugs if it was working fine), plus something else. now it seems backwards, there are some things that could be done in previous versions but not in this one, like 'duplicatemovieclip'
    6. inconsistency with scripting/programming paradigms: (ok, fancy work, but fits perfectly here): as3 proposed ways to handle things, but the people who designed it got 'too creative', and they did something that is not consistent neither with previous versions of as or with other languajes. the documentations is full of things like 'it looks like x languaje or languaje family, but instead of using XXX word, you must use YYY'. great, what is this? namespaces 'work like', but 'differently' for example from java, .net, .c. its got the idea that a namespace means a grouped functionality but there are rules about where should be placed the file (ok, java has this also, .net takes care of it automatically if all files are registered in the project), but what you got is a mess that 'if you know other languajes you got the general idea, but nonetheless, even if you knew this or previosu versions of as, you still have to read whatever we decided arbitrarily just to be different'. namespaces, event handling, vars definition which is not like previous scripting neither like fully typed languajes.. is just a mess.
    7. lack of scripting and graphics integration: unlike flash and adobe tools that just got on the graphics side leaving all the scripting integratuion apart, most tools from other vendors integrate very well interacton with what is on the screen. the script editor: very poor. autocompletion? a drop down list that does not heklp at all, appears in the wrong places, and when you need it to go, it does not go (so if i want to move away from the uncalled drop down list, i have to click somewhere else, making developement slowewr instead of helping, so the drop down list does not capture all events when i dont want to). in other ides you double click somewhere and it will go to the part of code relevant to that event or whatever. for example microsoft tools, ok i am antimicrosoft, and one of the reasons was that when windows 95 got to market proposing itself as the ONLY pc os you could use if you wanted to keep useing the apps you already had, it was a lousy product full of flaws but you had to keep using it because you had no choice. what is so different from what is happening with flash just now? yet the ide of c# is awesome, works very well and seems reliable.
    adobe people: not all user are designers that just make pretty pictures. if it is not intended for scripting then why is it there. and if there are corrections to be done, they should patch all versions, not only the last one. previous version users also paid for their versions.

    Well, there is no point in arguing.
    I personally believe AS3 does exactly what it promises to do within limits (read: reasonable limits) of ECMA type of language. And sometimes it doesn’t do what we expect it to for it cannot possibly emulate everyone’s thinking process. The task, I guess, is to learn to think in terms of AS3 – not to try to make AS3 think like us. No language covers all the grounds. And no, it is not Java - with no negative or positive connotation. It is what it is. Period. I just hope that AS5 will be more Java like.
    You are right about the fact that it is not necessary to know all the aspects of language in order to perform the majority of tasks. But it is paramount to have a clear idea about such fundamental concepts as display list model and events. For instance, depth swap has no meaning in terms of AS3 because display list object stacking is controlled automatically and there is no need for all these jumping through hoops one has to perform in order to control depth in AS2. There no more gaps in depths and one always know where to find things.
    Similarly, there is no point in having duplicateMovieClip method. More conventional OOP ways of object instantiation accomplishes just that and much more. Just because OOP object instantiation needs to be learned doesn’t mean past hacks have place in modern times. duplicateMovieClip is a horse carriage standing next to SUV. What one should choose to travel?
    Events are implemented to the tee in the context of ECMA specifications. I consider Events model as very solid, it works great (exactly as expected) and never failed me. True, it takes time to get used to it. But what doesn’t?
    By the way, speaking about events, contrary to believe in Adobe’s inconsideration to their following. Events are implemented with weakly reference set to false although it would be better to have it set to true. I think this is because there are smart and considerate people out there who knew how difficult it would be for programming novices to deal with lost listeners.
    I think AS3 is million times better than AS2. And one of the reasons it came out this way is that Adobe made a very brave and wise decision to break totally loose from AS2’s inherent crap. They have created a totally new and very solid language. If they had tried to make it backward compatible – it would be a huge screw up, similar to how our friends at Microsoft are prostituting VB and VBA – extremely irritating approach IMHO.
    Also, Flash legacy issues shouldn’t be overlooked. Flash did not start as a platform for programmers. Entire timeline concept in many ways is not compatible with the best OOP practices and advancements. I think for anyone who is used to writing classes the very fact of coding on timeline sounds awkward. It feels like a hack (and AS2 IS a pile of hacks) – the same things can be nicely packaged into classes and scale indefinitely. As such I wouldn’t expect Adobe to waste time on hacking timeline concept issues by making smarter editor. They have made a new one – FlexBuilder – instead. Serious programmers realize very soon that Flash IDE is not for developing industrial strength applications anyway. So, why bother with channeling great minds into polishing path to the dead end?
    I would like to state that all this is coming form a person who knew Flash when there was no AS at all. And I applaud every new generation of this wonderful tool.
    I believe Adobe does a great job making transition from timeline paradigm to total OOP venue as smooth as possible. And no, they don’t leave their devoted followers behind contrary to many claims. They are working on making developing Flash applications as easy as possible for people of all walks. Welcome Catalyst!
    Of course there is not enough information about AS3 capabilities and features. But, on the other hand, I don’t know any area of human kind activities that does.

  • JDBC for JDK1.1 connection with Oracle 8.0.5

    I have a client running Oracle 8.0.5 on an NT machine. I have downloaded the 8.0.5 OCI8 and thin JDBC from Oracle web site.
    Using the JdbcChecker.java sample code, I am unable to make a connection to the Oracle DB. I tested JDK1.1.8 with the new jdbc and also with the jdbc that originally came with Oracle (orant\jdbc\lib) but to no avail. I tested JDK1.2.2 with the 8.1.5 jdbc, also no luck. I compiled and ran the code each time, using
    DriverManager.getConnection("jdbc:oracle:thin:@" + database, username, password);
    where database is a.b.c.d:port_no:sid
    The error that came out for jdk1.1.8 was:
    (after printing out 'connecting...')
    java.sql.SQLException: Refused: ROR=(CODE=12505) (EMFI=4)))) ....
    Is there a daemon or something that is not running? I am new to Oracle but not to jdbc. My client has used Oracle a lot but not doing any java programming with it.
    What am I missing here?
    Thanks.

    Could you verify that the listener for the database is configured properly and that it is running?

Maybe you are looking for