Posted by wuuf in SWF Studio V3 on Jan 11 2008, 09:48 am

Can anyone give me some advice on creating a work around for using quicktime movies.

I need to be able to...

a) launch a .mov file
b) set x,y coordinates
c) play, pause, stop
d) listen for onComplete event
e) quit

...essentially the commands used for WMVideo.

Since quicktime is not supported by the ssCore is there any kind of guide or tutorial on how to do this using activeX or by some other method.

Thanks...


Posted by baoputzi in SWF Studio V3 on Jan 11 2008, 09:50 am


QUOTE: from wuuf;42574
Can anyone give me some advice on creating a work around for using quicktime movies.

I need to be able to...

a) launch a .mov file
b) set x,y coordinates
c) play, pause, stop
d) listen for onComplete event
e) quit

...essentially the commands used for WMVideo.

Since quicktime is not supported by the ssCore is there any kind of guide or tutorial on how to do this using activeX or by some other method.

Thanks...


I would propose using flv instead within a swf. right now I have not yet bring to work the wmv stuff in terms of positioning the same would be very interesting for me if someone can.


Posted by wuuf in SWF Studio V3 on Jan 11 2008, 09:55 am

unfortunately that is not possible within the scope of my project

my app must be able to deal with .mov files on the fly


Posted by mbd in SWF Studio V3 on Jan 11 2008, 04:35 pm

I have QuickTime installed on my PC and SWF Studio recognizes that there's an ActiveX control for QuickTime. From SWF Studio click the arrow next to the Help button and then click "ActiveX Info...". That will open an application that displays all of the installed ActiveX modules. Check for QuickTime, probably listed as QuickTime.QuickTime. You'll need that name to use it in your application.

Check out the example in the help docs:
Open a PDF File at a Specific Page

Or the ActiveX example from the examples section.

Those should get you started in displaying an ActiveX object on your application. From there you'll need to know the methods you can use with the control. To get that bring up the ActiveX Info application again and double-click on the QuickTime object. That will display information SWF Studio can get from the ActiveX control. It's possible there are other methods/properties/events, but you'll have to check the QuickTime ActiveX documentation for that - probably available on the Apple site.

You should be able to play a movie no problem, although I didn't see any events listed, so you might not be able to get an event when the video stops from the ActiveX control.


Posted by wuuf in SWF Studio V3 on Jan 11 2008, 05:12 pm

thanks very much...

i was able to open up the quicktime methods, however i can not find a load file method

do you know what the correct method is to open a .mov file?


Posted by mbd in SWF Studio V3 on Jan 11 2008, 09:40 pm

I haven't tried this, but from the docs that ActiveX Info spits out, it looks as though SetURL is the one you want. You will probably need to specify a full path - a relative path probably won't work. And don't use file monikers, like startdir://. Those file monikers are specific to SWF Studio methods. The ActiveX control will not know what to do with that. Instead use ssGlobals.ssStartDir, which is a variable that contains a string that is the path to the start directory. For example:

var r:Object = ssCore.MyQuickTime.SetURL({url:ssGlobals.ssStartDir+'\\file.mov'});


Check the return object to make sure the command succeeds or fails.

Notice that I used the same name for the method that ActiveX Info spits out, as well as the same name for the parameter: url.


Posted by wuuf in SWF Studio V3 on Jan 14 2008, 03:03 pm

thanks for the help...

however i still can't get this to work, can anyone see if i have done anything screwy with the code

(ignore the "PHP Code" label, it's actionscript didn't know how to set this to post correctly)

ssCore.init();
ssDefaults.synchronousCommands = true;

ssCore.ActiveX.isRegistered({progId:"QuickTime.QuickTime"},{callback:onComplete});

function onComplete(return_obj, callback_obj, error_obj) {
   if (return_obj.success) {
      ssDebug.trace("success...isRegistered");
      setObj();
    } else {
      ssDebug.trace("error...isRegistered");
   }
}

function setObj () {
   ssCore.ActiveX.createObject({object:"Qtime", progId:"QuickTime.QuickTime"},{callback:onComplete});
   
   function onComplete(return_obj, callback_obj, error_obj) {
      if (return_obj.success) {
         ssDebug.trace("success...setObj");
         popMOV();
      } else {
         ssDebug.trace("error...setObj");
      }
   }

   function popMOV () {
      //ssCore.Qtime.SetURL({url:ssGlobals.ssStartDir+"\\myMovie.mov"},{callback:onComplete});
      ssCore.Qtime.SetURL({url:"c:\\myMovie.mov"},{callback:onComplete});
      
      function onComplete(return_obj, callback_obj, error_obj) {
         if (return_obj.success) {
            ssDebug.trace("success...popMOV");
            ssCore.Qtime.SetPlay();
         } else {
            ssDebug.trace("error...popMOV");
         }
      }
   }
}


Posted by baoputzi in SWF Studio V3 on Apr 08 2008, 04:08 pm

This is howI tried to open a Quicktime File. Unfortunately the Quicktime object is not created. The error does not come up when I ask for the registration of the ActiveX Control - it comes up when I ask for the success of the object creation. The rc.error_obj says "Failed to create ActiveX object."
The QuickTime.QuickTime control is recognized and shown from SWF Studio Pro 3.5/314

var r = ssCore.ActiveX.isRegistered({progId:"QuickTime.QuickTime"});

if (r.success)
{
if (r.result != "TRUE")
{
ssCore.App.showMsgBox({prompt:"A required QuickTime control is not registered", icon:"critical"});
break;
}
}
else
{
ssCore.App.showMsgBox({prompt:"Unexpected error", icon:"critical"});
}


var rc = ssCore.ActiveX.createObject({object:"MyQuickTime", progId:"QuickTime.QuickTime"});

if (rc.success)
{
ssDebug.trace("QuicktimeObject created");
}
else
{
ssDebug.trace("QuickTime Object creation failed"+rc.Error.description);
}


Posted by baoputzi in SWF Studio V3 on Apr 10 2008, 04:43 am

the only way I found to open Quick Time is with ssCore.Browser...