Passage of variables in Captivate to Flash widget

Hello

I'm developing a widget progress bar simple in Flash to add a Captivate course that I build.  I think that what I want to do is very simple, but I seem to be missing something.

Quick description:

  • I created a variable in Captivate 5.5 called intProgress , which should be a percentage of the student throughout the course. I set this manually via a tip Action entering the slide.
  • I also created a widget in Flash 5.5 progress bar.  It consists of nothing other than a manual progress bar in Flash component.
  • I want to feed this intProgress of Captivate my Flash widget value and accordingly update the progress bar.

Here is my function (PDB is my progress bar)-

function courseProgress (intPercentage)

{

aPb.setProgress (intPercentage, 100)

}

And here's how I'm trying to pass the variable:

courseProgress (MovieClip .intProgress (root));

It does not resemble the variable is coming in front of Captivate to the widget.  How to do this?

Please let me know what I am doing wrong or what I'm missing here.

Thanks for any help anyone can provide!

Daniel



I think that your problem is that you have this code in the cpSetValue() function which is called only once at the beginning of the film. If the variable cannot be read at the beginning of the film and is not updated for each slide.

Try to add this code to your cpSetValue() function:

addEventListener (Event.ENTER_FRAME, updateProgress);

And to put this function outside of it:

function updateProgress(e:Event):void

{

myText.text = "label:" + m_VariableHandle.cpInfoCurrentSlideLabel;

     myText.text = "prog:" + m_VariableHandle.intProgress;

}

Now the code above is not very effective. Basically it updates the text box with the variable for each frame of the movie. However, if it works, I'll go into details on how you can get it to update only when you enter into a slide.

Tags: Adobe Captivate

Similar Questions

  • Check the values of variables in Captivate with Flash AS2 animation

    I created a couple of simple buttons Pause/Resume Flash AS2 to manipulate playback from Captivate using the following script:

    on (release) {}
    _parent._parent.rdcmndResume = 1;
    }

    on (release) {}
    _parent._parent.rdcmndPause = 1;
    }

    The buttons work as expected if their ' display for: "values are set to"Rest of project"."  The buttons seem to have no effect on the reading of Captivate so "show:" is set to anything else.

    The problem is that I was hoping to only display buttons when I want the user to suspend or resume the chronology of Captivate.  However, for some reason that I don't understand, they do not work when their ' display for: "value"point in time ".

    No idea why the buttons to behave the way they do or ideas on how to make them do what I wish they would do?

    Hi Luc Pra.

    When ' show:' is selected as the rest of the project / duration of the animation, swf loader will be placed on the chronology of the Captivate SWF.

    When ' show:' is selected as the precise moment / slide rest, swf loader will be placed inside the slide (slide is placed on the Captivate swf timeline).

    So try it when ' show:' is specific time / rest of slide:

    on (release) {}
    _parent._parent._parent.rdcmndResume = 1;
    }

    on (release) {}
    _parent._parent._parent.rdcmndPause = 1;

    }

    I hope this helps.

    Delighted Kishore.

  • Values of read/write of Captivate in a Widget

    Hello

    I have read the forums that talk about the reading and writing of the variable of Captivate your Flash widget and find a complete list of these variables. I tried several ways to 'find' and use these variables, following different examples I found, but so far none have worked. My main interest is by registering a score instead of correct/incorrect just for a Flash of LMS Captivate/Connect interaction and attempted to write the score to the variable cpQuizInfoPointsscored . I used a variety along the lines of:

    _root.cpQuizInfoPointsscored = result;

    But with different paths (find examples on the web), including _root., varHand., _parent, etc..

    I also tried using the cpSetValue function

    cpSetValue ("cpQuizInfoPointsscored", score);

    According to me, Miss me really a kind of crucial contextual information about to use these variables. Any help is very appreciated.

    (I use the code of the basic model for widgets of quiz, btw).

    So I think I'm finally as understand this, if there is an easier way to get a partial score on interaction in the LMS, it'll do for now!

    -Kurtis

    The LMS UMConnect is based on the standard? If it is based on all the standards that is supported by captivate so if you try to write to LMS of the widget so it is great chance of your course is screwed up because of the conflict between the values submitted by you (your widget) and captivate SWF. If its based on any other standard then probably you can give it a go, but be careful, you will have all the things on your part are clean code. that is all the data required by the LMS must come from your widget, which I think is the case.

    As I know there is no way to write to LMS for a widget without screwing up the course.

    P.S. If find you a solution please post in this thread.

  • Pass the data XML Captivate through a Widget

    Hi all

    I use widgetfactory API to create my setup.

    I have a flash file Widget that reads the XML data and passes the variables in Captivate.

    However, I can not set the text box with the variable that I analyzed the XML data.  Any suggestions are appreciated!

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    package

    {

    widgetfactory Import. StaticWidget;

    Import widgetfactory.events.WidgetEvent;

    com.adobe.captivate.events import. *;

    com.adobe.captivate.widgets import. *;

    import flash.events. *;

    import flash.display. *;

    flash.net import. *;

    public class load_lang extends StaticWidget

    {

    override protected function enterRuntime (): void

    {

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_00 = "This works very well.";

    var myXML:XML;

    var myLoader:URLLoader = new URLLoader();

    myLoader.load (new URLRequest ("languages.xml"));

    myLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void {}

    myXML = new XML (e.target.data);

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_01 = myXML.slide [0] .textbox [1]; It does NOT work

    }

    }

    }

    }

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    Hi osbornsm,

    Try the above suggestion of Jim, but if this does not work then what probably is the widget is trying to load the languages.xml but can't find it. You will need to make sure that it is placed in the output directory of the Captivate file published to operate. Even in this case, you will not be able to make it work when previewing the movie.

    Probably a better way to go about this would be the XML file into your SWF widget. In this way the widget won't need to load. This is how you would integrate it:

    package

    {

    public class load_lang extends StaticWidget

    {

    [Embed ("path-to-file/languages.xml", mimeType = "application/octet-stream")]

    private var BinaryData: Class;

    override protected function enterRuntime (): void

    {

    var byteArray:ByteArray = new BinaryData();

    var myXML:XML = new XML (byteArray.readUTFBytes (byteArray.length));

    Continue to the processXML() code

    }

    }

    }

  • Import of variables in Captivate LMS

    I want to recover the data from the LMS (Moodle) my Captivate class - capture the name of LMS students specifically, and display it in Captivate. I read a previous debate on that, but it ended without a definitive answer, that seemed.

    Looks like that first the SCORM data in the variable must first be passed to a Flash embedded via javascript file and then sent to Captivate of Flash. A suggestion of the post hinted that this could be done without javascript step.

    Anyone successful with this? And with SCORM 1.2 or 2004? I would be very happy to advice if someone has done this...

    Variable SCORM (student's name)-> Javascript-> embedded Flash file-> Captivate displayed in...

    Thanks in advance to anyone who can help!

    Why sure... it works with Flash AS3, CP5.5 and Moodle as the LMS...

    First, I created a small 10 x 10 px, flash file an image to import into Captivate (want to just ACE code to run, its hidden in a black neighborhood of my background in slide 1...)

    In the framework, and then entered this code:

    Get the name of the student of LMS, SCORM

    to import flash.external.ExternalInterface;

    try {}

    Assigns a string name of the LMS student

    var UserName:String is String (ExternalInterface.call("saveglobalscore",score) ('g_objAPI.LMSGetValue', 'cmi.core.student_name'));.

    To separate the first and last name...

    var LastName:String = UserName.slice (0, UserName.indexOf(","));

    var FirstName:String = UserName.slice (Number (UserName.indexOf(",") + 2), UserName.length);

    } catch(err:Error) {}

    trace ("and not in an LMS at the moment");

    }

    Send name to Captivate

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov. Name = name;

    Then, this flash file on slide 1 of my lesson of Captivate, where I display the first name value I get from Flash. You know, ' welcome, $$FIrstName$ $! Then when I start my lesson in Moodle name appears...

    A nice quirk, it didn't worked at first - it seems that Moodle would begin the lesson of Captivate and the ACE in the Flash file to run at the same time, it would not disconnect the first name. So I put the animation Flash delay.5 seconds in the timeline, so the lesson of Captivate would begin, a short break, then the code YOU run and I got the name. And also, the area of text in Captivate with variable display of $$ $$FirstName must appear after the Flash code received the name of LMS, then I put delay 1 sec on the timeline.

    It was there, I added nothing to the external .js file. Maybe this will help someone! Thanks again for pointing me in the right direction...

  • Preload a captivate recording Flash AS2 publication

    Hello

    I have a video recording done in adobe captivate 4 and disabled the preloader on preferences to publish. The reason why I disabled it is because other people can not see the preloader for loading of the captivate movie but the preloader displays when I view it online usign my computer (you have an idea on how I can fix this?). As an alternative/workaround that I have created a class of movieclip loader and load external captivate movie in flash. The preloader that I created works. However, the captivate movie plays both even if the movieclip loader does not reach 100%. How can I prevent the captivate movie to play while the preloader is not 100%? I also have an error on flash while simulating flash download. The error that says:

    Branching::script:;
    Deepak offshoot: scripteval: [object Object];

    When I get this error, it is time that the captivate movie plays. Here is my code in flash, is it in AS2.

    linking var: MovieClip = _root;
    level2 var = linking.attachMovie ("captivateHolder", "captivateHolder", this.getNextHighestDepth ());

    var loader: MovieClipLoader = new MovieClipLoader();
    loader.loadClip ("captivate/prequalified_contractors.swf", level2.captivateMovie);

    Preload var: Object = new Object();
    loader.addListener (preload);

    preload.onLoadStart = {function (target)}
    trace ("began to load");
    }

    preload.onLoadProgress = function (target, loadedBytes, totalBytes) {}
    Level2.captivatePreloader.text = Math.floor ((loadedBytes/totalBytes) * 100) + "%";
    Level2.captivateMovie.rdcmndNextSlide = 0;
    }

    preload.onLoadComplete = {function (target)}

    Level2.captivatePreloader.text = "";
    Level2.captivateMovie.rdcmndNextSlide = 1;
    }

    I tried to limit the captivate movie to play by putting rdcmndNextSlide = 0;

    My question is, how do I limit the captivate movie to play while the event is still on the onLoadProgress and make him play once the preloader 100%.

    This is the first time I used adobe captivate 4.

    Thank you.

    Kind regards

    Harry

    You can pause the Captivate project when you start by preloading it using the Captivate system variables. Then when your file has been loaded to 100% you could once again using a different system variable.

    You can see a list of the different variables of the system here: http://www.cpguru.com/2009/04/28/system-variables-in-captivate-4-%e2%80%93-a-complete-list /

    The relevant variables to you would be:

    rdcmndPause = 1; (to pause the project)

    rdcmndResume = 1; (for playback)

    Of course, you have the instancename (where you load your Captivate movie in) in front of the variable name.

    myLoaderContainer.rdcmndPause = 1;

    / Michael

  • Bookmark for Captivate 5.5 Widget

    As I said in the title, I'm looking for a bookmark for Captivate 5.5 widget.

    I found a widget to this site and it seems that the widget is for Captivate 5.0 and 4.0

    http://www.cpguru.com/Adobe-Captivate-5-bookmark-Widget/

    If I'm wrong, please tell me. Is there any widget to Captivate 5.5 bookmark?

    Also, I really enjoy to read Captivate widget related articles now of days.

    Factory widget, Cpgear and Jim... Thank you very much.

    Saami

    Thank you very much for the reply, Ed.

  • How to integrate a flash widget in Flex app?

    Hi all

    This url shows a Daylife flash widget, I'd like to incorporate into my Flex application.

    Is there anyway that this can be done?

    http://widgets.Clearspring.com/o/4739d66f0a9e4824/4b0fe2d350a297dc/475f5c3e608377ee/572e7c 2

    Thank you

    If this post answers your question or assistance, please mark it as such.

    You can use SWLoader to this:

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=controls_15.html

    http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/controls/SWFLoader.html

  • Integration of Captivate with Flash

    Hello

    I save several movies with Captivate 3 and publish as Flash (SWF) files. I load this film into a Flash application using the class public AS3 Loader (see attached code). Also I create custom playback controls in this Flash animation. I test this regular flash movies loading technique and it works very well. But loading films Captivate, I can't control the movie because I had a Null object reference error, the worst is that I can't unload the first film when trying to load a second.

    As output is getting a lot of "onLoad = null m_movie.

    Where is the documentation for the integration of Captivate with Flash?

    Hey! Never mind. I just read Pipwerks blog post on the subject and his legacy Captivate class loader.
    Check it out

    http://pipwerks.com/journal/2008/04/03/new-legacycaptivateloader-class/

  • Problem passing variable from PHP to Flash

    I'm moving a single variable from PHP to Flash. However, I can't quite make it work.

    In a PHP file named data.php, I use:
    "$query = SELECT SUM (Debt) As Total OF THE debtclock;
    $result = mysql_query ($query);
    $debt = mysql_result ($result, "Total");
    Print "debttotal = $debt";

    In Flash 8 Actionscript, I use:
    loadVariables("data.php","0");

    If I understand correctly, this should make the variable available in Flash debttotal.

    Can someone tell me where I'm wrong?

    Try this:
    loadVariables ("data.php", _level0);
    The 2nd parameter specifies the target that receives variables, '0' is not a valid value for this. With _level0, variables will be found in the root timeline, so you can access it with _root.debttotal (from _level0) or _level0.debttotal (on a different level than _level0).

    Welcome,
    blemmo

  • Captivate 2 Flash 8

    When I try to export an Adobe Captivate 2 project to Flash 8 I get the following error message after clicking "Import" in Flash: "impossible to import the Captivate project. The following error occurred: The Captivate project file appears corrupt or incompatible version. Please contact Macromedia Technical Support. »

    I'm doing something wrong?

    Hi bbrinkman,

    Navigate to the c:\documents and settings\Settings\Application data\Macromedia\Flash8\importers folder.

    Remove rdmfistub.dll from there.
    copy RDMFISTUB8.dll to the captivate installation folder (c:\program files\adobe\adobecaptivate2) to the folder above. (Incase its not already there).

    Close captivate and Flash. Try again.

    It seems a common problem here, and I should write an article for this. :)

    Thank you

  • Pass the URL query string variable to Captivate?

    I created a Flash button for my total Captivate, it uses PHP to update a CSV file with the user name and the id of course.

    The user name is from a URL string. If it was just a Flash file, I could pass the page HTML using FlashVar values. My flash button is not exposed until the last slide in the room of Captivate. How can I get this value so that my Flash button can pass it?

    If the value passed to the FlashVar to the Captivate swf, is a local variable that can be called from the Flash button? I know I did not adequately explain this right, but maybe someone can decipher this enough to get the gist.

    Hello

    Just write a javascript in html function that returns the user name.

    Call this function in your flash movie using the external interface call

    Hope this helps

    Delighted Kishore.

  • Passage of Variables

    Very well... simple, but not for me it's a matter of AS2.

    I have a Flash document and herein, I have an empty clip that I use a placeholder load another Flash animation. When I insert the second swf document in the main swf document, I have buttons that generate values from 1 to 9 (depending on which button the user clicks)... the variable is defined as pageNumber.

    I then return to the main timeline in the film using "_root.gotoAndPlay". According to the value of the variable, the timeline has a specific function.

    Here's my problem... the variable pageNumber sets properly; However, when I run the _root command to return to the main timeline, the value always resets to 1.

    Why resets the value to 1?

    Thanks for the reply... actually the problem was more with the passage of the variable; However, I did some research and solved the problem... maybe I should have dug a little more before this forum.

    In any case... Thanks again.

  • Captivate timeline, Flash Menu integration

    Hi people,

    I like Captivate, but I have a problem that I can't find the answer to (I googled everywhere)

    Here's what I'm trying to do. I have a Menu.FLA file which has graphical buttons to 9 different Captivate SWF files (call them Demo0.swf through Demo8.swf).

    I want this file to open a demo SWF file, and when the demo is completed, RETURN to the Menu.

    I played with Captivate of Jesse player and that's a start... it adds a drop down feature, but I don't want to give up my menu button interface. In addition, I don't see where and how to insert an option ReturnToMenu... Jesse code only to stop or move on to the next lesson.

    Now, I wrote my own code that accesses the timeline, but it seems that Captivate 'lies' the. FLA file and does not give the exact values of _currentframe and _totalframe. I'm playing with decompiling the SWF, etc., so I can put in Flash, but I would really like to be able to access the SWF generated Captivate files.

    Another option would be to wait for some events/variable JavaScript at the end of my Captivate SWF that the. FLA file will vote on.

    Finally, the option 'on the end of the film"doesn't seem to work as it should. If she called Menu.swf, that would be fine, BUT if I specify a SWF file, it TAKES the. HTML file! What is happening with this? If I have the Flash Player, or I'm running into one. EXE, it should JUST start the movie. Is there a routine JavaScript that I can use? Or what is the difference between narrow film and film Stop? They both seem to stop. If she really could close the demo movie, I could run in a window different layer/target and would face the original menu.

    I'd be happy with a solution based on any of the above... change CaptivatePlayer, checking the chronology (accurately), obtaining a variable (i.e. finished = true;), or by using the option 'on the end of the film.

    Thank you!!!

    [email protected]

    Well, I solved my problem... search by many USENET archives. The problem is related to the way Captivate uses its own script. I had to access internal variables (rdinfoCurrentFrame, rdinfoFrameCount) to make it work. Here is my code, which could be cleaned up a lot... but it works! It was the best solution that I didn't need to mess with the source files of Captivate.

    this.createEmptyMovieClip("swfDemo_mc",1);
    this.swfDemo_mc.clips_array = "MyDemo.swf";
    this.swfDemo_mc.nextClipIndex = 0;
    this.swfDemo_mc.readyToLoadNext = true;
    this.swfDemo_mc.createEmptyMovieClip("demo_mc",1);

    {this.swfDemo_mc.onEnterFrame = function ()}
    {if (this.clips_array. (Length>This.nextClipIndex)}
    {if (this.readyToLoadNext)}
    trace ("loading:" + this.clips_array);
    This.demo_mc.loadMovie (this.clips_array);
    this.nextClipIndex ++;
    this.readyToLoadNext = false;
    } else {}
    trace (this.demo_mc.rdinfoFrameCount + ":" + this.demo_mc.rdinfoCurrentFrame);
    if(this.demo_mc.rdinfoFrameCount==This.demo_mc.rdinfoCurrentFrame &&)
    This.demo_mc.rdinfoFrameCount! = 0) {}
    trace ("finished Demo");
    trace ("delete loop")
    delete this.onEnterFrame;
    gotoAndStop ("WebMenu");
    This ._visible = false;
    this.readyToLoadNext = true;
    }
    }
    } else {}
    trace ("delete loop")
    delete this.onEnterFrame;
    }
    }
    Stop();

  • Calling an external javascript variable in captivate

    I need captivate to reference an external JavaScript variable to check if its value is 1 or 0. If the value is '1' I need to display a button, if the '0' button is hidden.

    The reason why I need external is I want the customer to be able to change the value of the variable without having to republish files.

    I know not if I add a JavaScript file and folder to "program Adobe Captivate 9 x64\HTML\assets", it will be always published whenever captivate publishes, the question is how Captivate to refer to the variable in the JavaScript file?

    I use the latest version of Captivate 9.0.2 publish HTML5

    Thank you

    Gary

    Thanks for your suggestions of Peter!

    I managed to make it work last night using a different method.

    First set the variable 'SP_Assess_Included' in Captivate with a default value of 0.

    Then, I went in the folder "C:\Program Files\Adobe\Adobe Captivate 9 x64\HTML" and changed "index.html".

    Then I added the following line in the

Maybe you are looking for

  • Pavilion 23-b220er E6Q02EA: upgrade processor for HP Pavilion 23-b220er 23 "E6Q02EA

    I have PC HP Pavilion 23-b220er 23 "E6Q02EA with Intel Core i3-3240 Can I improve Intel Core i5 or i7 Interl Core process?

  • How to become a good user/punter in Labview & test bench

    Hi all Nice day!!! I recently started to use OR Test & Lab View. I want to know life scope of reviews and NO bench test & Lab, by learning from this what are companies we can only enter/work. How to become a gambler in these. Please do the needful. K

  • Additional results - vs Value reference Bug

    I just wanted to find it there. When you try to open a session of additional results of a step, you can specify if you want to connect the value [In] or the [Out] all the variables passed by reference. If you have a variable that is passed by value,

  • Linear potentiometer

    Hello Can I use an analog input channel to measure the variable resistor. If this is not the case, what is the other way around? Please explain, Thank you Sweety Agarwal

  • Cisco of the spectrum of expertise

    We use the Cisco Spectrum Expert software and hardware to deploy a wireless solution.  We do surveys across the United States and I would be able to create a good quality report for each site.  Y at - it on where we can create a comprehensive report