Although the title sounds promising, I don’t have time right now to really offer a solution yet. I’m just alerting anyone who hasn’t tried to incorporate Captivate 3.0 swf’s into their Flash/Flex/AS3 projects:
Captivate 3.0, although giving you the capability to publish to Flash Player v9, compiles to ActionScript 2.0 specs. Hence, when the player opens this swf, it is now older version of the Adobe Virtual Machine (AVM1) that sandboxes the Captivate swf.
Now, if you try to make a call to that swf from a Flex app, or an ActionScript 3.0 compiled Flash swf, it won’t work. Direct communication between AVM1 and AVM2 is not possible.
I have confirmed from a very good source that development is already underway on including the capability to compile to ActionScript 3.0 specs out of the next version of Captivate, version 4.0.
Until then, there are a few workaround methods and if you google them you’ll find them (though none specific to Captivate, I don’t believe). I will add to this post once I get the time to do so with a code example.
This is a bit of a problem if, like me, you’re developing in Flex and/or AS3 exclusively. I don’t blame Adobe at all for this though. It’s just the nature of the transition.
Incidentally, I will soon be writing a separate blog entry on my move to developing exclusively in Flex. I truly believe it is the best choice for elearning developers as it seems to me that Flash, for the future, is really all about the banner ad/animation designer, no matter what Adobe is currently saying.
4 Comments
Does the same problem exist for incorporating SWF files with AS3 into Captivate 3.0? I have some animations and interactions that were written in Flash AS3, that work fine when published in a SWF file and run with FlashPlayer 9, but they don’t work at all when I import them into Captivate 3.0. In Captivate, they seem to run when they apear in the in the Insert -> Animation dialog box., but then once they are placed in Captivate, the don’t show up at all when I Preview -> Project (F4). What was on the stage shows up, but none of the AS3 code works.
Won’t work. There is no direct communication between AVM1 sandboxed swf files, and AVM2 sandboxed swf files. Captivate publishes to AS2, which only runs in the Adobe Virtual Machine 1. So, your AS3 code won’t work in Captivate.
We’re using Flex to develop our “Course Player” (i.e., navigation front-end).
We solved this problem by creating a “proxy swf” that uses AS2 and localConnect to communicate between the captivate swf and our AS3 swf. The proxy is basically a go-between swf that exposes the Captivate API variables to the AS3 navigation swf.
If you need any help,
We came across this when trying to incorporate this into our custom “course player” that is built in Flex. To overcome the AVM1vsAVM2 limitations, we built a proxy swf to talk between the two. Basically, the course player which is written in AS3 talks to the proxy swf. The proxy swf then talks to the captivate swf through the API variables.