Tracing Captivate 4 variables in Flash CS4 using AS3

Hello. I've googled this 9 ways to Sunday and can't find an answer. I'm hoping one of you can help.
I have a very simple Captivate 4 quiz with one question. I embed the Captivate SWF file in a Flash file, which plays fine. However I am struggling with tracing one of the Captivate variables in the Flash file using AS3.
All I want is for Flash to read the Captivate variables so I can continue developing my quiz in Flash (building additional functionality Captivate does not provide).
The variable I'm attempting to trace is cpInfoAuthor.
I've attempted:
trace(root.cpInfoAuthor);
trace(root.movie.cpInfoAuthor);
var cpAuthor = MovieClip(root).cpInfoAuthor;
All of the above examples error out: TypeError: Error #1009: Cannot access a property or method of a null object reference.
Captivate preferences are set to publish in AS3.
Anyone with an explanation?
Be splendid, Jodie.

Hi Jodie,
I'm not exactly 100% proficient in AS3 but to me it looks like your statements are wrong.
Since you are loading your Captivate SWF into a Flash SWF then (root) actually refers to your Flash SWF. I guess that you are loading your Captivate SWF into a movieclip on your Flash stage and that movieclip has an instance name,
You would therefore need to grab the variables like var cpAuthor = yourLoaderMovieClip.cpInfoAuthor;
See if that doesn't do the trick for you.
/Michael
Visit my Captivate blog with tips & tricks, tutorials and Widgets.

Similar Messages

  • How to use MS Access database in Flash CS4 using AS3

    Hello everyone,
         I need help for how use the MS Access database in FlashCS4 and I want to save and retrive the data from the database and display in the Flash window.
    Thanks with,
    Viswa.

    http://www.northcode.com/blog.php/2011/05/06/Using-ADO-Data-Sources-in-Flash-Projectors

  • Customizing DataGrid component in Flash CS3 using AS3

    Can anyone please explain how to customize the DataGrid
    component in Flash CS3 using AS3???
    How do you remove/change the grid lines for the rows and
    colums?
    How do you remove/change the border?
    My day has been lost searching for this answer. Flash
    Documentation is worthless and Google finds nothing with regards to
    AS3. ASDGRH.
    Thanks in advance,
    TedWeb

    I hope you've found a resolution to this by now, but I just noticed the discussion title when posting a captioning issue.
    In a nutshell, create a listener on your FLVPlayback module with a VideoEvent.SKIN_LOADED event. You'll also need to set the showCaptions in your FLVPlaybackCaptioning object to true. Apparently, if the captions are set to false when the player object loads the skin, the captions aren't recognized and your captions toggle will require an extra click to activate the captions.
    Here's the link to another discussion on the same topic with all of the details:
    http://kb2.adobe.com/cps/402/kb402452.html
    Also, have you had any issues with the caption button in the FLVPlayback skin not showing up? That's my current issue. Here's the discussion for it:
    http://forums.adobe.com/thread/796423?tstart=0

  • How to find totalFrames of Captivate 4 .swf in Flash CS4

    I have a series of Captivate4 AS3 .swf files that I am loading into an interface created in Flash CS4.  The files are loading and playing correctly, but I need to find a way to detect when an imported .swf gets to the end of it's timeline so that I can load the next one.
    Here's my code:
    var myLoader:Loader = new Loader();
    var movieURL:String = "resources/testTestTest.swf";
    var req:URLRequest = new URLRequest(movieURL);
    var currentMovie;
    var endShow:Boolean = false;
    myLoader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(evt:Event)
        currentMovie = myLoader.content;
        currentMovie.rdcmndPause = 0; //fails to pause imported .swf
        trace(currentMovie.cpInfoCurrentDate); //fails to trace out
    addChild(myLoader);
    myLoader.load(req);
    Please, help!!

    I forgot to add "contentLoaderInfo" to the myLoader eventListener.  Here's my working code:
    Captivate- output to AS3, make sure Flash player is same as destination
    AS3 code from flash UI:
    //initial variables
    var myLoader:Loader = new Loader();
    var movieURL:String = "fileName.swf";
    var req:URLRequest = new URLRequest(movieURL);
    var currentMovie:*; //data type movie; use wildcard- data type unavailable at compile time
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(evt:Event):void
        currentMovie = MovieClip(myLoader.content);//data type imported .swf
        trace("frame count = " + currentMovie.rdinfoFrameCount); //rdinfoFrameCount is a Captivate var
        //trace("current frame = " + currentMovie.rdinfocurrFrame); //rdinfoFrameCount is a Captivate var
    addChild(myLoader);
    myLoader.load(req);
    //set up timer to check to see if current frame == total frames
    var endTimer:Timer = new Timer(1000);//runs every sec.
    endTimer.addEventListener(TimerEvent.TIMER, onTimer);
    endTimer.start();
    function onTimer(evt:TimerEvent):void
        //trace("current frame = " + currentMovie.rdinfocurrFrame);
        if((currentMovie.rdinfocurrFrame + 10) >= currentMovie.rdinfoFrameCount) //had to add 10 to current frame
         //write your function here
        endTimer.stop();

  • Can Captivate pass variables to Flash?

    I have a Captivate 4 quiz embedded in a .FLA (AS2).  Can this quiz pass user-defined and/or system variables to the .FLA?  If so, can someone give me an example code of how this would work?  Let's say I have a user-defined variable in Captivate, varTest with initial value of 0.  On the last slide of the quiz I assign varTest a value of 1.  How do I pass this variable to Flash and how will Flash listen for this value change?  I'm looking for something similar to the following code, but I can't seem to get all of it:
    //code that loads movie here; I have this piece working fine.
    //code that listens for varTest1 value in Captivate
    myListener = function():Void
         var myFlashVar = this.mc_Container.varTest //I load my captivate SWF into mc_Container
         if(myFlashVar == 1)
              trace("myFlash Var = 1")
    some listener code here...
    Thanks.

    samprakash,
    You are going into difficult territory.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=464&threadid=1325387
    There is no solution other than a custom solution, likely
    involving many days and hours of work. If you must do this, you can
    begin by analyzing the swf files for variables while in-use (loop
    through the Captivate swf mc object).

  • Captivate 4 export to Flash CS4

    Hi,
    I am encountering a few problems with Adobe Captivate 4:
    - In the previously version it was possible to export a project into different smaller swf files. Is this also possible in Captivate 4?
    - I am trying to export my project to Flash CS4 but I get the following error:
         The following elements in your project have not been converted. They are not supported by this importer.
         508 Compilance
    After that I won't be able to see the mousemovents and hint boxes.
    - I am not able to play the swf file in internet explorer on windows XP machines. In the previous version it was possible to safe the skin as bitmap, that worked in windows XP. Is this also possible in Captivate 4?
    Can somebody help me with one of these problems?

    Hello, I'm not able to answer all of your question, but will give it a try:
    What do you mean by 'exporting to several small swf's'? I do not know this functionality, have been using CP since version 1. Perhaps you are talking about the splitting up when having FMR recordings: every FMR would end up in a different SWF in CP3. This has been removed in CP4, but if you want really to have the files separated, you can activate 'Externalize resources, part FMR SWF' in the Project, Preferences, Publish settings. You can also externalise skin, widgets  and animations.
    508 Compliance has something with accessibility options. Here I'm not sure at all, why there are problems with exporting to Flash CS4.
    Problem with playing CP-movies can be due to Flash Security Settings or to the Flash Player installed compared with the Publish settings (for which Player?).
    I believe that BMP has been abandoned for playbars because of lower quality. You have to use a playbar, could use the TOC (instead or in combination with the playbar) or have your buttons on the slides (some of the widgets perhaps).
    Perhaps someone else could complete this answer,
    Lilybiri

  • How to load ai file in flash CS4 using code(Like loading swf or images )

    Hi,
    I have to load AI file in flash CS4 and provide the interaction with user.
    Can any body help?
    Thanks

    Hi.
    No you cannot  import Eps, wmf, emf,  ai, cdr files in swf dynamically using Action Script 3.

  • Flash CS4, Using ActionScript in Buttons to go to cue points in a FLV

    Hi.
    I'm pretty much a Flash novice, so i don't think this question is particularly hard, it's just something that's vexing me for a few days. I know it's possible based on all the literature I've  read, but I can't seem to get it done properly.
    Basically, I have a video file that I rendered in FLV with 5 navigation points called 1, 2, 3, 4, 5.
    What I want to do is use buttons to navigate to the five cue point in the flash movie. I think that this is possible using ActionScipt 2, but I don't know what to code in the script function.
    Any help would be very, very appreciated.
    Thanks,
    Javier

    Hi,
    The following AS2 code may help you
    stop();
    var listenerObject:Object = new Object();
    listenerObject.ready = function(eventObject:Object):Void {
    <your flv playback instance name>.addEventListener("ready", listenerObject);
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    <your button instance name>.onRelease = function () {
    playback.seekToNavCuePoint("<your cue point name>");
    <your flv playback instance name>.addEventListener("cuePoint", listenerObject);
    \\replace all the placeholder things including the < >
    Also just take a look at the description at http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003003.html for more details
    Thanks!
    ps: pls mark this post as answered if this is of help to you

  • Global Variables in Flash CS4 (AS3) ?

    Hi,
    I  have another problem with my new project and I am looking to get answers for these two question:
    1.) Is there a way to define a global variable which can be accessed inside and movie clip or button? (where do you define it? is it changeable? can you pass it in by reference?)
    2.) If i have my main stage with some actionscript and a movie clip which has also some action script, IN WHICH ORDER does it execute?
    Thank you in advance for any help and tips!

    Thank you this is what i needed I got it to work now!
    But I do still have one last question on this topic.
    This is the Code:
    //this is in a file Actionscript File called glo.as
    package{
         public class glo{
              public static var widthOfSlider:Number = 5;
    // This code is in scene 1 > my_mc
    import glo;
    trace(glo.widthOfSlider);
    //This code is in scene 1 > my_mc > myNext_mc
    import glo;
    var numOfCovers = 6;
    var temp = glo.widthOfSlider;
    trace(glo.widthOfSlider);
    this.addEventListener(Event.ENTER_FRAME, centerB);
    function centerB(event:Event):void{
         for(var i = 0; i < numOfCovers ; i++ ){
              this["cover_btn_"+String(i)].y = 0;
              this["cover_btn_"+String(i)].x = temp;
              temp += this["cover_btn_"+String(i)].width + 5;
         glo.widthOfSlider = temp;
         trace(glo.widthOfSlider);
         this.removeEventListener(Event.ENTER_FRAME, centerB);
    When I run this I get the following output:
    5
    5
    5
    725.45
    725.45
    The first "5" is from the trace(glo.widthOfSlider); in scene 1 > my_mc
    The next two "5"'s are from the trace(glo.widthOfSlider); in scene 1 > my_mc > myNext_mc
    Is there a way so that I can first execute the code in scene 1 > my_mc > myNext_mc before the code in scene 1 > my_mc ?
    I am trying to get 725.45 through the trace(glo.widthOfSlider); in scene 1 > my_mc

  • Unable to export from Captivate 4 to Flash CS4

    Hello everyone!
    I am attempting to export a captivate project over to flash CS4.  However when it goes from captivate over to flash the result is basically a slide show. It does not show any of the animations that are present in Captivate. I also keep recieving an error message.
    I have searched for how to solve this problem for quite a while now and so far have come up with nothing.
    This is the error message that flash gives me:
    The following elements in your project have not been converted. They are not supported by this importer.
    508 Compliance
    A swf animation slide has been imported. The following files must be made available at publish time:
    Project01_slide_22_0.swf
    DefaultPreloader.swf
    Please make sure you publish the project to “C:\Documents and Settings\jmillard\Desktop.” Saving the project to this directory will ensure that test project will work with the swf animation slides.
    Unfortunately I am on a tight schedule to get this project done and the Captivate 4 and Flash CS4 I am using are both 30 day trials, so I am in quite a hurry.
    If you could please help me I'd greately appreciate it! 

    When you click on <Send Book to Blurb> a dialog should come up that asks for your ID and password for your Blurb account. I don't know if Blurb ships to Norway - you probably can find out at the Blurb website. But I don't think that this is the problem here since you also cannot export a PDF or JPGs.
    I don't know of any specifics why this is not possible for you but it's worth trying to replace the Preference File.
    This file can go "funny" and is then responsible for all kinds of strange behavior of Lr. The remedy is replacing the Preference File. 
    BTW: Re-installing Lr or updating / upgrading Lr does not replace the Preference File since it is designed to "survive" upgrades.
    See here for where to find the Preference file for your OS: http://helpx.adobe.com/lightroom/kb/preference-file-locations-lightroo m-4.html
    See here for how to go about Replacing the Preference File: http://lightroomers.com/replacing-the-lightroom-preference-file/745/

  • Is there any way at all of accessing captivate variables from flash?

    Hi,
    I would be grateful for any help on this one.  I have been working in flash and I wanted to know whether there is any way at all of calling/accessing captivate 4 variables from flash (I'm working in flash Cs4 Actionscript 3.0 and I'm trialling Captivate 4, but I just want to know whether there is any way/method of communicating between a flash file and a captivate 4 file, and if so, can this be done with an embedded captivate 4 file/swf).  Surely there must be a way of communicating between the two - they are both Adobe products!
    Thanks for any help, pointers, advice, tips in advance.

    Hi Louon,
    Don't know if this would help you.
    http://blogs.adobe.com/captivate/2009/09/captivate_variables_-_how_to_a.html
    We have many experts here who could give more precise answers.
    Cheers.
    Miguel

  • Problems importing into flash CS4

    Hello everyone!
    I am attempting to export a captivate project over to flash CS4.  However when it goes from captivate over to flash the result is basically a slide show. It does not show any of the animations that are present in Captivate. I also keep recieving an error message.
    I have searched for how to solve this problem for quite a while now and so far have come up with nothing.
    This is the error message that flash gives me:
    The following elements in your project have not been converted. They are not supported by this importer.
    508 Compliance
    A swf animation slide has been imported. The following files must be made available at publish time:
    Project01_slide_22_0.swf
    DefaultPreloader.swf
    Please make sure you publish the project to “C:\Documents and Settings\jmillard\Desktop.” Saving the project to this directory will ensure that test project will work with the swf animation slides.
    Unfortunately I am on a tight schedule to get this project done and the Captivate 4 and Flash CS4 I am using are both 30 day trials, so I am in quite a hurry.
    If you could please help me I'd greately appreciate it!

    Check the settings:
    Edit/Preferences.../PSD File importer...
    And then load the *.psd file without the background.
    And certainly there is no change in flash...

  • Error while loading a swf created in flash cs4, inside a flex application

    Hi there,
    I have created a rotating logo in flash cs4 using motion presets, named logoRotar.swf. I have used this inside my flex application:
    <mx:SWFLoader width="33.33%" height="100%" source="assets/logoRotar.swf">
    When I execute the flex application, I get this runtime error message:
    VerifyError: Error #1014: Class flash.geom::Matrix3D could not be found.
        at global$init()
        at fl.motion::AnimatorFactory3D/getNewAnimator()
        at fl.motion::AnimatorFactoryBase/addTargetInfo()
        at logoRotar_fla::MainTimeline()
    I also tried adding import flash.geom.*; statement in my flex application, I still get the same message.
    Flash player 10,0,22,87 is running in my browser.
    Please help me out....
    Cheers!
    Deepak

    Get Flex 3.3 and use -target-player=10
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • You can't open the application Adobe Flash CS4.app because it may be damaged or incomplete.

    Can someone help me with that one ? When I am trying to run Flash after install I get this error message:
    You can't open the application Adobe Flash CS4.app because it may be damaged or incomplete.
    Mac OS 10.6.5
      Model Name:    Mac Pro
      Model Identifier:    MacPro3,1
      Processor Name:    Quad-Core Intel Xeon
      Processor Speed:    2.8 GHz
      Number Of Processors:    2
      Total Number Of Cores:    8
      L2 Cache (per processor):    12 MB
      Memory:    4 GB
      Bus Speed:    1.6 GHz
    I tried to uninstall and reinstall, same error. I couldn't launch under Leopard (10.5.x) either.
    Thanks
    Eric

    Here’s some updates.
    I can not uninstall Flash (CS4) using "Adobe Creative Suite 4 Design Premium". It looks like Flash is not installed.
    If I try to install it using the disk, it looks like Flash is not installed at all. So I go thrue the installation process, and follow the instructions, until it’s complete.
    But if I go in my App folder, and look in the Adobe Flash CS4 folder the Flash.app icon has a circle with a bar in it. This is when I get the message.

  • Video Formats in Flash CS4

    I recently upgraded to CS4.
    Previously in CS3 I was Importing Quicktime .mov files using the Import Video command. In the dialog that would appear, I would choose progressive download and ON2 VP6 and Flash CS3 would then initiate a progress bar with the ultimate result being the creation of a new FLV file made from the .mov. This always worked fine in the past.
    Now with CS4, it was my understanding that I could import Quicktime movies that use the H.264 standard without having to create an FLV... is that true? The reason I ask is because I just created (3) 2 minute videos in Final Cut Pro Studio and exported them to Apple Compressor 3 which further saved them as .mov H.264 files for web downloading. These files play perfect from the hard drive using Quicktime Player. So, I opened Flash CS4, used the Import Video menu item as before, progressive download, etc. and now instead of creating a new FLV file I just saw a progress bar saying something about reading Metadata and then the video icon appeared on stage in Flash. After publishing the SWF, the movie played fine from the hard drive. Since I did not see a new movie file created by Flash after importing or publishing, I was assuming that it was just pulling the video data from the original .mov file I imported? The problem I ran into was when I uploaded all the files (including the original .mov file) I only got a video control bar showing with a progress bar running, but the video never appeared. Did I do something wrong?
    As a workaround, I tried dragging the .mov into the new Adobe Media Encoder CS4 and created am F4V (a new file on my desktop). The filesize was smaller than the original .mov, but when I imported the F4V into Flash and published that to the web it played fine (a bit lower quality though).
    Also, when I dragged the .mov file to the Media Encoder it stated that it was an FLV file not a .mov H.264 file.
    What am I missing or doing wrong? How is the best way to get a Quicktime H.264 file imported into and published from Flash CS4 for the highest quality?
    Thanks for any help!

    Yes you can do that.Theres a couple ways.
    1.
    You will want to load the flv - in whatever fashion - into a movie clip, then blur the movie clip with filters. But this can have serious damaging effects on runtime performance.
    2.
    If you have the source files, and the video will never need to be sharp. You can go into your video editing software (After Effects, for instance), extend width and height of the composition, blur your video there, and render out with alpha channel.

Maybe you are looking for