Captivate 5.5 variables in AS3

Hi, i seem to be having a problem accessing the captivate 5.5 variables in AS3.
I saw guides that tells people to do something like
var myRoot:MovieClip = MovieClip(root);
var mainmov:MovieClip = MovieClip(myRoot.parent.root);
mainmov.rdcmndPause = 1;
but i cant get it to work.

Hello,
What do you mean by 'playback': from the screenshot I deduct it is Previewing. Did you try to view in Web browser of after publishing already?
Could you check the quality of the slides in the Properties, General region?
Lilybiri

Similar Messages

  • Creating variables in AS3 that Captivate can read.

    I have a Flash project written in AS3 and I am colaborating with someone that is writing a Captivate training program.  The Flash program is a little game and I need to store a couple integers readable by Captivate.   I would like to just create the variables in AS3 and have them readable by the Captivate code (that I am not writting).
    If that's not possible I suppose I need to actually locate and update the varibles in Captivate (we decided on some variable names).
    user_pass  (integer, 0 means user is still trying and 1 means user passed)
    user_attempts ( I will store how many attempts the user made at the game)
    Thanks very much for any help.  I think she is pretty strong in her Captivate coding abilities, and I am only moderate in my Flash/AS3 abilities.
    Edit: I wanted to mention that the flash game was embedded into a slide in Captivate.

    In AS3 you can use the bracket notation...
    var trainOfUfo = "...hi earthling...";
    var handleBlade = this["train"+"Of" + "Ufo"];
    AS2 supports the eval() function, but it was done away with in AS3

  • Captivate 4 Variables and AS3

    Hello,
    I need to pause a Captivate 4 movie externally with AS3. The
    reason for this is because I have a drag and drop interaction,
    therefore I need to pause the movie so the interaction can take
    place. This worked perfectly with AS2, but due to issues were
    having with flash player 10 and Captivate, we have to use AS3
    throughout.
    In AS2, all I had to do was put
    this._parent._parent._parent.rdcmndPause = 1;
    That was it. Bring that into the Captivate file and bang it
    paused like a gem.
    How do I do that with AS3? Any help would be greatly
    appreciated
    Thanks
    Doug
    Update:
    I used the attached code to correct the issue, in case anyone
    runs into an issue where the need to pause the CP SWF externally...
    I know the whole purpose of Captivate is to eliminate the need of
    external Flash resources, and even though Captivate is a great
    program, it cannot process a drag and drop interaction without
    using Flash.

    > I need to pause a Captivate 4 movie externally with AS3.
    The reason for
    > this
    > is because I have a drag and drop interaction, therefore
    I need to pause
    > the
    > movie so the interaction can take place. This worked
    perfectly with AS2,
    > but
    > due to issues were having with flash player 10 and
    Captivate, we have to
    > use
    > AS3 throughout.
    >
    > In AS2, all I had to do was put
    >
    > this._parent._parent._parent.rdcmndPause = 1;
    >
    > That was it. Bring that into the Captivate file and bang
    it paused like a
    > gem.
    >
    > How do I do that with AS3? Any help would be greatly
    appreciated
    >
    I'd expect the same to work. Are you saying it does not?
    Steve
    http://twitter.com/Stevehoward999
    Adobe Community Expert: eLearning, Mobile and Devices

  • Accessing Captivate 5.5 variables from embedded SWFs

    Hi,
    as we all know the interface for accessing Captivate variables from embedded SWFs tends to change between Captivate versions. Shortly after it's release we upgraded to version 5.5, and I'm not succeeding in accessing the Captivate variables in my Flash/AS3 code the same way it was done in version 5.
    How should I access the Captivate 5.5 variables (rdinfoCurrentSlide et al) from my SWFs?

    Hi,
    You can use system variable : cpInfoCurrentSlide to show the slide number.
    So you can use text captions to display the value of the variable, the format for displaying the value stored in the variable is $$<system variable>$$. So for slide number use : $$cpInfoCurrentSlide$$, type this in the text caption and then check it in the preview.
    Thanks

  • Can you submit a User Variable instead of the Captivate Quiz Score variable to an LMS?

    I am attempting to create two quizzes in a course that has branching.  I know that Captivate only allows for one quiz if you are using Question type slides, but I am using a simulation to check the knowledge of a process.  I want to report one of the simulation completions depending on which branch the user goes to (different branches for different products).  How or is it even possible to submit user variables in place of the Captivate Quiz Score variable, the time in the course variable, and the Pass or Fail status to an LMS?

    Sadly, I am using Captivate 5.5.  I was thinking it should be possible to use Javascript to be able to take a specific variable and submit it to the LMS in place of Captivate's Quiz variables.  I just don't know Javascript well enough to know how to do that.

  • Global variable in as3.0

    I am doing something with flash cs3,I need to use global
    variable in it ,but there is not global variable in as3.0,can
    anyone help me ,thanks forever!

    There is no global in AS3. But you can make values globally
    accessible by
    using static fields in classes. e.g.
    // MyClass.as
    package
    public class MyClass
    public static var globals = new Object();
    MyClass.globals["hello"] = "world"
    trace(MyClass.globals.hello);
    // and if you want to simulate something a little
    // closer to the AS2 _global object you can drop
    // this into a top level in your class path
    // global.as
    package
    public const global:Object = new Object();
    global["hello"] = "world";
    trace(global.world)

  • Are there a dynamic way for evaluting variables in as3?

    Hi..!
    eval() is a usefull method or function in javascript.. Because we may define our variables via dynamic way..! There are following code is for understanding that how can define dynamic defining variables in javascript.. And Are there a dynamic way for evaluting variables in as3 like following javascript code?
    <script language="javascript1.2" type="text/javascript">
    var trainOfUfo = "...hi earthling...";
    var handleBlade = eval("train"+"Of" + "Ufo");
    alert(handleBlade);  //-- it appears in dialog box text field area "...hi earthling..."---
    </script>
    Gürkan Şahin
    Code Developer
    Turkey

    In AS3 you can use the bracket notation...
    var trainOfUfo = "...hi earthling...";
    var handleBlade = this["train"+"Of" + "Ufo"];
    AS2 supports the eval() function, but it was done away with in AS3

  • Captivate 7 handling Variables

    Asking for some much needed Help!
    I have defined 3 Variables to store 1 of 3 selections per slide in this fashion below:
    (V_Hambergers,      V_Fish,      V_Chicken).
    They are connected to the following:
    Slide1
    Hambergers and Fries
    Fish and Chips
    Chicken and Fries
    Slide2
    Hambergers and Rice
    Fish and Rice
    Chicken and Rice
    etc..
    These bullet points represent the possible choices, the User can select to define their favourite food.  These choices will be different per slide as per example above.  The end result will be defined via the most popular food choices, displayed on a result slide. 

    Thz for the lesson Lilybiri,
    I had to step back from this coding for a few days, it can be so confusing.  I found there is an error in the Variables Expression, when I choose one choice, it wound total two choices all at once from one slide.
    I take it, there needs to be some kind of a coded check, for the choice made, that only allows for one choice per slide?  
    below are a few queries:
         I
         defined 4 variables: v_choice (will be
         associated to radiobuttons widget),
         v_ham, v_fish and v_chicken
         (counters)
         On
         each slide I inserted the radiobuttons
         widget, with the 3 choices and all linked to the same variable
         v_choice (is reused)
         I
         used a shape button on the master slide,
         to pause the slide and to trigger this conditional
         advanced action with 3 decisions:
              [Ham
              decision]       IF v_choice is equal to
              Hamburger  <does
              this refer to the Variable (v_ham) ?
                                                                                    Expression
              v_ham = v_ham +
              1
              [Fish
              decision]         IF v_choice is equal to
              Fish <does
              this refer to the Variable (v_fish)
                                                   Expression
              v_fish = v_fish
              + 1
              [Chicken
              decision]  IF v_choice is equal to
              Chicken <does
              this refer to the Variable (v_chicken)
                                                   Expression v_chicken
              = v_chicken + 1
         Display
         a text container on the result slide with the three counter
         variables.
         TextCaption
         = $$v_ham$$
                                          $$v_fish$$
                                          $$v_chicken$$ 
    Date: Mon, 29 Jul 2013 09:18:45 -0700
    From: [email protected]
    To: [email protected]
    Subject: Captivate 7 handling Variables
        Re: Captivate 7 handling Variables
        created by Lilybiri in Advanced Adobe Captivate Users - View the full discussion
    I created a quick example to be able to explain:
    I defined 4 variables: v_choice (will be associated to radiobuttons widget), v_ham, v_fish and v_chicken (counters)On each slide I inserted the radiobuttons widget, with the 3 choices and all linked to the same variable v_choice (is reused)I used a shape button on the master slide, to pause the slide and to trigger this conditional advanced action with 3 decisions:[Ham decision]   IF v_choice is equal to Hamburger
                                    Expression v_ham = v_ham + 1[Fish decision]   IF v_choice is equal to Fish
                                    Expression v_fish = v_fish + 1[Chicken decision]   IF v_choice is equal to Chicken
                                    Expression v_chicken = v_chicken + 1Display a text container on the result slide with the three counter variables. Lilybiri
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5547879#5547879
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5547879#5547879
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5547879#5547879. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Advanced Adobe Captivate Users by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • What is the correct way to determine the width and height of a captivate movie at runtime in AS3?

    I have an entire layout framework built and one of the controls is a GUIControlWrapper with every conceivable option for wrapping and aligning (uniform scale, stretch, stretchwidthonly_aligntop/middle/bottom, stretchheightonly_alignleft/center/right, etc.) non-framework controls (i.e. controls that are display objects, but do not inherit from my layout framework's base GUIControl display class).
    Generally this wrapper obtains the object size by calling wrapped_control.getRect( wrapped_control ), to obtain the object's rectangle in its own coordinate system (i.e. its unscaled or original size), and it clips this rectangle to the origin by setting the left and top properties to zero.
    The problem I'm encountering only affects captivate movies.  When I used my framework's uniform scale option, there ends up being a gap at the bottom exactly the size of the captivate movie's playbar (which is visible), which indicates to me that the captivate movie's getRect and height properties are overreporting the height.
    If I use the captivate movie's "cpMovieWidth" and "cpMovieHeight" properties instead, then the uniform scale results in perfect alignment.  The captivate movies "contentHeight" variable is 38px smaller than "cpMovieHeight", and the playbar height is 40, which is about that 38px difference.
    So my question is, why do captivate movies' getRect and height methods report the wrong height for the movie, such that if you actually scaled the clip based on that height to fit the stage size, there is a gap about the size of the playbar?

    I'm sure it's because the movie controls are a seperate swf. CP supplies you with the variable that works as you've found.

  • Passing variables from AS3 to PHP

    Hi there
    I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
    I've stuck with this for two days.. Here's what I have done. Please help!!!
    header.fla [Actionscript in the timeline]
    stop();
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.net.*;
    var url:String = "http://localhost/0000/try.php";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    var variables:URLVariables = new URLVariables();
    send_btn.addEventListener(MouseEvent.CLICK, sendForm);
    function sendForm(evt:MouseEvent):void
        // add the variables to our URLVariables
        variables.asd = "value";
        // send data via post
        req.method = URLRequestMethod.POST;
        req.data = variables;
        loader.dataFormat = URLLoaderDataFormat.TEXT;
        // add listener
        loader.addEventListener(Event.COMPLETE, onLoaded);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        //send data
        loader.load(req);
    function onLoaded(evt:Event):void
        var result_data:String = String(loader.data);
        if (result_data)
            trace(result_data);
        else if (!result_data)
            trace("error");
    function ioErrorHandler(event:IOErrorEvent):void
        trace("ioErrorHandler: " + event);
    try.php
    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="563" height="280">
      <param name="movie" value="header.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="../Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="header.swf" width="563" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <?php
    if($_POST['asd'])
    echo "value of var1 is <b>".$_POST['asd']."</b>";
    else
    echo "bad luck";
    ?>
    </body>
    BIG THANKS!!

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Adobe Captivate 8 system variable "cpQuizInfoAnswerChoice" is empty for random multiple-choice questions.

    Does anyone run into this problem when capturing the user answer for a random question slide? Adobe Captivate 8 system variable "cpQuizInfoAnswerChoice" is empty for random multiple-choice questions.

    Hi Shriyansh.
    The reason I am interested in capturing the user answers in Submit All situation is that I know after I published the test using SCORM 2004, all the user responses were captured in "cmi.suspend_data" because my test can resume the test to the last exit question in the middle. However, when I looked at the suspend data value, I have a hard time to understand the pattern and pick out the meaningful user question responses data. I really need help from you to understand how the suspend data value was constructed and how to parse this data. Another area I thought it's easy to get the user question responses data is the interaction records, but I always got only one question (the last randomly sampled question) interaction record. See the following generated XML SCORM 2004 4th edition data. Could you help me figure out how to interpret the following suspend data to get the users responses to each test question?  And why I only got one question interaction record? Thanks again for your help, Zhuoran.
    <ArrayOfKeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.success_status</Key>
      <Value>failed</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.completion_status</Key>
      <Value>completed</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.exit</Key>
      <Value>suspend</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.mode</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.suspend_data</Key>
      <Value>M1A%24nP1A%24nP1FPool1B1FPool2A1FPool3A1FPool4B1FPool5B1FPool6B1FPool7A1FPool8B1FP ool9A1GPool10A1A%24nP000BB0100C11KCA%7E%24nU*9aAlO%7E%24nU*3eOlO1000B00AEAH0%3B1%3B2%3B3BA B0B0BBB0B0BCB0B1BDB1B0DB%7E%24nU*-EBlO%7E%24nU*YoOlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B1BC B0B0BDB1B0EC%7E%24nU*flBlO%7E%24nU*IyOlO1010B00KEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B0BDB1B1FD %7E%24nU*nWMlO%7E%24nU*kRPlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B1BCB0B0BDB1B0GE%7E%24nU*kRP lO%7E%24nU*arPlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B1BDB1B0HF%7E%24nU*arPlO%7E%24nU*c HQlO1000B00AEAH0%3B1%3B2%3B3BAB0B1BBB0B0BCB0B0BDB1B0IG%7E%24nU*cHQlO%7E%24nU*kfQlO1010B00K EAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B0BDB1B1JH%7E%24nU*kfQlO%7E%24nU*74QlO1010B00KEAH0%3B1%3B2 %3B3BAB0B0BBB0B0BCB0B0BDB1B1KI%7E%24nU*74QlO%7E%24nU*IYRlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BB B0B1BCB0B0BDB1B0LJ%7E%24nU*IYRlO%7E%24nU*aHSlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B1BD B1B00PNvar_ToggleTOCBAPvar_ToggleAudioBAEv_S1BAEv_S2BAEv_S3BAEv_S4BASv_completionStatusBAP v_successStatusBAKv_locationBAFv_scoADls3NreturnMessageBAHv_scoreBAOv_scorePercentBAPv_cur rentChoiceBAPv_stringChoicesBA</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.entry</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.location</Key>
      <Value>Posttest%20Results</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.launch_data</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.learner_name</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions._count</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.id</Key>
      <Value>LSQ19C</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.type</Key>
      <Value>choice</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.learner_response</Key>
      <Value>The_vehicle_is_under_warranty_for_the_life_of_the_lease</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.result</Key>
      <Value>incorrect</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.correct_responses.0.pattern</Key>
      <Value>Genuine_Subaru_Accessories_can_be_residualized_as_a_part_of_the_lease</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.description</Key>
      <Value>What is one feature of a Subaru Motors Finance lease?</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.weighting</Key>
      <Value>10</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.latency</Key>
      <Value>PT3S</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.objectives.0.id</Key>
      <Value>Quiz_2014924125021</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.timestamp</Key>
      <Value>2014-11-20T13:02:01.0-06</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.raw</Key>
      <Value>30</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.max</Key>
      <Value>100</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.min</Key>
      <Value>0</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.scaled</Key>
      <Value>0.3</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.session_time</Key>
      <Value>PT31.99S</Value>
      </KeyValueOfstringstring>
    </ArrayOfKeyValueOfstringstring>

  • Access Captivate variable in as3

    I used the following code on a frame within an swf that was imported to a CP4 slide. This worked fine in as2. I'm wondering how to write the same code in as3.
    _parent._parent._parent.rdcmndNextSlide = 1;
    Thanks

    Hi,
    For one, AS3 uses "parent" and not "_parent". Also, I believe that there are now 4 clips between the slide and your swf. So try with parent.parent.parent.rdcmndNextSlide and if not working try parent.parent.parent.parent.rdcmndNextSlide.
    If all fails, let me know and I will give you the exact function to call. It's just that I'm away from Captivate and Flash at the moment.
    Whyves
    www.flash-factor.com

  • Controlling External Captivate 5 swf using flash AS3

    Hi,
    I have created a basic Flash AS3 interface in which I am trying to control the navigation (next slide / previous slide) of an external captivate 5 swf which I have added using a loader, but i cant work out the solution.
    My code is currently as follows:
    import flash.net.URLRequest;
    var Xpos: Number = 96
    var Ypos: Number = 94
    var my_loader:Loader = new Loader();
    my_loader.load(new URLRequest("content.swf"));
    my_loader.x = Xpos;
    my_loader.y = Ypos;
    addChild(my_loader);
    stop();
    nextBut.addEventListener(MouseEvent.MOUSE_UP,gotonextframe);
    function gotonextframe(event:MouseEvent){
    MovieClip(my_loader.content).rdcmndNextSlide();
    Any help would be much appreciated,
    thanks
    Dez

    Thats perfect, thanks for the reply, much appreciated!
    I guess you have tried:
    rdcmndRewindAndStop
    Set to 1 to rewind and stop the project.

  • Processing a PHP variable in AS3

    I have looked in every book that I have on AS3 and cannot
    come up with a solution to this, I hope that someone can help me.
    I am receiveing a data string from a PHP --- mySQL connection
    on my web server. The string is arriving in flash as I can trace it
    and see the variables. If I do a trace on event.target.data I see
    the following.
    &numResult1=4&numResult2=14&numResult3=37&numResult4=70&numResult5=5&numResult6=3&doneLoad ing=true
    This is exactly what I should be seeing based on my PHP code.
    I am trying to assign the numResult numbers to a dynamic text
    box, for instance numResult1 = 4, I would like to assign that 4 to
    a dynamic text field on the Flash Stage. I have not figured out a
    way to get the variable out of the string.
    I keep getting undefined or a variety or other errors with
    the different methods I try.
    I have tried numerous ways using the URLVariables class but I
    have had no luck. Use to be very simple in AS2, I could assign the
    variable right to the dynamic text field in the properties panel,
    not anymore.
    Does anyone know how I can do this. People are doing it all
    the time, it can't be that hard, is it?????
    Just a good example as to how to break the variables out
    would be really helpful. I have tried the FlashGods site and could
    not figure there examples out, in fact the two I tried did not work
    at all.
    I would appreciate any help.... Thank you.
    Mike

    I have been trying to work this through for over a week, here
    is the ActionScript Code;
    AS
    function getData(event:Event):void {
    var myURLLoader:URLLoader = new URLLoader();
    var myURLRequest:URLRequest = new URLRequest("polls2.php");
    // Actually goes to a web site.
    myURLLoader.dataFormat=URLLoaderDataFormat.TEXT;
    myURLLoader.load(myURLRequest);
    myURLLoader.addEventListener(Event.COMPLETE,
    completeHandler);
    function completeHandler(event:Event):void {
    trace(myURLLoader.data);
    var myURLVariables:URLVariables = new
    URLVariables(myURLLoader.data);
    gotoAndStop(2);
    Here is what I get with the Trace Statement:
    &numResult1=6&numResult2=6&numResult3=5&numResult4=9&numResult5=7&numResult6=1&doneLoading =true
    Here is what I get when I try to set the URL variables.
    Error: Error #2101: The String passed to
    URLVariables.decode() must be a URL-encoded query string containing
    name/value pairs.
    at Error$/throwError()
    at flash.net::URLVariables/decode()
    at flash.net::URLVariables()
    at MethodInfo-2()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    Now it sure looks to me that the string being passed is
    name/value pairs.
    I have tried every way that I can think of to capture this
    data. I must be missing something simple.
    Any ideas would be greatly appreciated.
    Thanks for your help.
    Mike

  • Pass Variables into AS3 through Query String?

    Man! I've been searching ferociously and can't seem to find a solution that works for me. I am trying to pass variables via query string on a PHP page to Flash, and then have the swf add movie clips to the stage depending on the information it receives.
    Here is what the PHP outputs:
    swfobject.embedSWF("flash/detailScore.swf?a=0-0&b=0-0&c=30-54&d=30-20&e=42-18", ...
    And here is my AS3 code:
    function loaderInfoSh(e:Event):void{
    var myQueryStrings=this.loaderInfo.parameters;
    a = myQueryStrings.a;
    b = myQueryStrings.b;
      c = myQueryStrings.c;
    d = myQueryStrings.d;
    e = myQueryStrings.e;
    addTheResults(a,1);
    addTheResults(b,2);
    addTheResults(c,3);
    addTheResults(d,4);
    addTheResults(e,5);
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderInfoSh);
    The addTheResults function takes the coordinates, adds a MC instance to the stage and positions it accordingly.
    var colorMCArray:Array = new Array();
    function addTheResults(val,colnum:Number){
    if(val == null){val = "52-46";} // so I can test it locally
    var daColor:String;
    switch (colnum){
    case 1:
    daColor = "f3951c";
    break;
    case 2:
    daColor = "74b47d";
    break;
    case 3:
    daColor = "436494";
    break;
    case 4:
    daColor = "9b74ac";
    break;
    case 5:
    daColor = "b43d44";
    break;
    var dash:int = val.indexOf("-");
    var lateral = val.slice(0,dash);
    var vertical = val.slice(dash+1);
    lateral --;
    vertical --;
    // adding the MC instance
    var comm:tileB = new tileB();
    comm.name = "comm"+colnum;
    addChild(comm);
    colorMCArray[colnum] = comm;
    //Change the color
    var colorTransform:ColorTransform = colorMCArray[colnum].transform.colorTransform;
    var thiscolor = "0x"+daColor;
    colorTransform.color = thiscolor;
    colorMCArray[colnum].transform.colorTransform = colorTransform;
    colorMCArray[colnum].x = 5;
    colorMCArray[colnum].y = 536;
    colorMCArray[colnum].x += (lateral * 9);
    colorMCArray[colnum].y += (vertical * 9)*-1;
    colorMCArray[colnum].addEventListener(MouseEvent.MOUSE_OVER, btnro);
    colorMCArray[colnum].addEventListener(MouseEvent.MOUSE_OUT, btnrout);
    I don't know what I'm doing wrong here.

    Was this the "e" in the code below you were pertaining to as the culprit? "e" is not a keyword. It's just the shortcut for the word "event" for the variable name of type Event which is the Event object that triggered the call of function loaderInfoSh. In your code you assigned e = myQueryString.e which should have given you a type mismatch error.
    function loaderInfoSh(e:Event):void{
    var myQueryStrings=this.loaderInfo.parameters;
    a = myQueryStrings.a;
    b = myQueryStrings.b;
      c = myQueryStrings.c;
    d = myQueryStrings.d;
    e = myQueryStrings.e;
    addTheResults(a,1);
    addTheResults(b,2);
    addTheResults(c,3);
    addTheResults(d,4);
    addTheResults(e,5);
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderInfoSh);

Maybe you are looking for

  • Pass parameter to pl/sql block

    Hi, I am getting following error when trying to create staging table from shell script by passing parameter. SQL*Loader-941: Error during describe of table T1_1DAY_STG ORA-04043: object T1_1DAY_STG does not existThis is PL/SQL block being called insi

  • Bug in sdoapi 1.0 GeometryAdapter?

    Hallo, I want to run an example for a GeometryAdapter (SampleSDOtoWKT.java) with the Java sdoapi V1.0 but it always gives me an exception 'InvalidGeometryException' on line 84 of the sample code geom1 = sdoAdapter.importGeometry(dbObject); This examp

  • Can you make a field expand based on characters in a PLD

    Is there a way to have the City on a PLD expand based upon the characters so the State field is not so far away? On the checks when you have the address area, it has a huge gap between the two fields. We do not use the address field as the block area

  • Dealing with Popup messages in webdynpro in ECC 6.0

    THe backend R/3 has lots of custom popup box ( in user exits ) requesting the user to make a decision. This popup alerts ends up in dumping java error while executing transactions in Portal webdynpro transactions ( create expense report ) Any idea ho

  • Exporting Windows compatible footage.

    I am converting from years of video editing on Pinnale 12 on a Windows XP machine, to Final Cut Pro X, but I still have a lot to learn.  So that I can create DVD menus on Pinnacle, I need to export my rendered videos from FCP to my Windows machine.