Skip to main content
Participant
February 25, 2009
Question

Variables from Adobe Captivate to flash

  • February 25, 2009
  • 5 replies
  • 1503 views
Hi,
can anybody explain me, how to acces variables in captivate from flash?

I can't export my CP file to Flash CS3, there is an alert message

The following elements in your project have not been converted. They are not supported by this importer.
Question slide
508 compliance

A swf animation slide has been imported. The following files must be made available at publish time:
DefaultPreloader.swf

Please make sure you publish the project to "D:\MyQuizzes\".
Saving the project to this directory will ensure that test project will work with the swf animation slide.

Thanks for answer...
This topic has been closed for replies.

5 replies

Inspiring
March 10, 2009
I don't know if this will help - but I have written two seperate articles
(that use the same component) for:

- Building Certificates in Flash for Captivate/Presenter (though this is
really - inserting a Flash file INTO Captivate/Presenter)
- Building a Flash shell for launching Captivate/Presenter files

You can review the articles and everything you need (downloads, examples,
etc) at: http://www.connectusers.com/tutorials

Regards,

Andrew


Participant
March 12, 2009
Hi tikiri,
You can access variables directly using the movie instance. Please check the code below, where we are printing the varCount variable.


on(release){
_root.play();

_root.createEmptyMovieClip("movie", 999);
_root.movie._x=146;
_root.movie._y=12;
loadMovie("test/test.swf", _root.movie);
}

trace (_root.movie.varCount);


This code is specific for AS2 captivate swfs. You can try accessing any of captivate system variables also in this way:
_root.movie.rdcmndNextSlide = 1; // jumps to next slide
_root.movie.cpCmndMute = 1; // mute the audio
trace(_root.movie.cpInfoCurrentDate); // print the current date
_root.movie.rdInfoCurrentSlide = _root.movie.cpInfoLastVisitedSlide // jumps to last visited slide

Please go through the list of available variables in captivate documentation. All the variables starting from "rdcmnd" are legacy variables and exist in captivate 3 projects as well. Ones starting with "cp" are new and are not available prior to captivate 4. Accessing method remains the same for both cp3 and cp4 generated swfs.

For accessing variables in AS3 captivate movies:-


var movieLdr:Loader = new Loader();
var movieURL:String = "CA3_Demo.swf"
var movieURLReq:URLRequest = new URLRequest(movieURL);
var cpMovie;

movieLdr.addEventListener(Event.COMPLETE,loadComplete);
function loadComplete(ae:Event)
{
cpMovie = movieLdr.content;

//Pause the movie
cpMovie.rdcmndPause = 1;
//Resume the movie
cpMovie.rdcmndResume = 1;
//Jump to next slide
cpMovie.rdcmndNextSlide = 1;
also try,
// print current date
trace(cpMovie.movie.cpInfoCurrentDate);
}
addChild(movieLdr);
movieLdr.load(movieURLReq);




tikiri20Author
Participant
February 25, 2009
For faster comunication - my ICQ number is 213 513 753, thank you
tikiri20Author
Participant
February 25, 2009
In Captivate I have user-variable called varCount.
In flash I load Captivate this way:

on(release){
_root.play();

_root.createEmptyMovieClip("movie", 999);
_root.movie._x=146;
_root.movie._y=12;
loadMovie("test/test.swf", _root.movie);

}


test.swf is that Captivate video.
Inspiring
February 25, 2009
Which variables to you need to access and how do you want to access them?

Do you have a shell (loader) in Flash which loads your Captivate movie and need to access the variables from the Flash shell or do you have a Flash animation inserted into your Captivate project and need to access the Captivate variables from that inserted Flash animation?

tikiri20Author
Participant
February 25, 2009
.