I got a drag and drop video demo working just now.  It just a proof of 
concept that we can use qooxdoo.

I'm using the qx.bom.Flash object.

I have an event that adds a Flash object with a video player that plays 
a video...

when the event happens again I need a way to be able to either tell the 
current Flash object to change its URI, or destroy it and add a new 
one... The only method with the Flash object is create (a static method)



How can I change the URI or delete this object?

here is the event handling code
----------------------------------------------------------------------------------

video is global... I hoped setting it to null would destroy it

  canvas.addListener("drop", function(e)
        {
                video = null;
                //console.log("source: " + 
e.getRelatedTarget().getSource());
                if(e.getRelatedTarget().getSource() == 'cam1.png') {
                        canvas.setBackgroundColor("blue");
                        movie = 
qx.bom.Flash.create("foz/player.swf?file=demo.flv&autostart=true");
                        qx.bom.element.Style.set(movie, "width", "640px");
                        qx.bom.element.Style.set(movie, "height", "480px");
                        qx.bom.element.Style.set(movie, "position", 
"absolute");
                        qx.bom.element.Style.set(movie, "top", "20px");
                        qx.bom.element.Style.set(movie, "left", "168px");
                        document.body.appendChild(movie);
                }
                if(e.getRelatedTarget().getSource() == 'cam2.png'){
                        canvas.setBackgroundColor("red");
                        movie = 
qx.bom.Flash.create("foz/player.swf?file=flash.flv&autostart=true");
                        qx.bom.element.Style.set(movie, "width", "640px");
                        qx.bom.element.Style.set(movie, "height", "480px");
                        qx.bom.element.Style.set(movie, "position", 
"absolute");
                        qx.bom.element.Style.set(movie, "top", "20px");
                        qx.bom.element.Style.set(movie, "left", "168px");
                        document.body.appendChild(movie);
                }

                var action = e.getCurrentAction();
                var type = e.getCurrentType();
                var result;

        });


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to