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.

Tags: Adobe Animate

Similar Questions

  • Passage of Variables in TestStand through LabView

    I have an error, I am developing a crush on the recall of database Options. I say TestStand what database to write. I am in him passing a variable and I get an error. Here is a description of the error.

    Here is the statement I use:

    DatabaseOptions recall that I use a statement that change the data of databases is stored.

    I have a VI that passes a string that represents the location of my data file, I want to use. I stored it as a variable in database called StationGlobals (it's currently a string but I tried the executable file and the way too with the same error).

    Parameters.DatabaseOptions.ConnectionString = StationGlobals.Database

    StationGlobals.Database has the value

    "\"Provider=Microsoft.Jet.OLEDB.4.0; Persist Security Info = False; Data Source = C:\\Users\\Public\\Documents\\\National Instruments\\\TestStand 4.2.1\\Components\\Models\\\TestStand Results.mdb;. » »

    There must be a problem with variables, because when I copy and paste what StationGlobals.Database in and use the following statement it works perfectly fine.

    Parameters.DatabaseOptions.ConnectionString = '\"Provider=Microsoft.Jet.OLEDB.4.0; Persist Security Info = False; Data Source = C:\\Users\\Public\\Documents\\\National Instruments\\\TestStand 4.2.1\\Components\\Models\\\TestStand Results.mdb;. » »

    Here is the error I get:

    Details:

    An error occurred calling "LogResults" in "ITSDBLog" of "ZNIUGOL TestStand database logging"

    An error occurred initializing a connection to a data binding.

    Connection string: "Provider = Microsoft.Jet.OLEDB.4.0; Persist Security Info = False; Data Source = C:\Users\Public\Documents\\National Instruments\\TestStand 4.2.1\Components\Models\\TestStand Results.mdb. »

    Description: [Microsoft] [ODBC Driver Manager] data too long name source

    Number:-2147467259

    NativeError: 0

    SQLState: IM010

    Reported by: Microsoft OLE DB provider for ODBC drivers

    Source: TSDBLog

    Error code:

    -2147467259; User-defined error code.

    Possible system error: unspecified error

    Geographical area:

    Step 'Results of the log to the database' sequence "Log to database" in "Database.seq".

    Please help I can not find a solution to this issue.

    Thanks a lot for any help

    Once more, the channels of Expression, stumbled to another programmer!

    Parameters.DatabaseOptions.ConnectionString is not a string but an Expression string and your assignment of an StationGlobals.Database (just a string) causes this error.

    Here's what I did to solve your problem:

    1.) StationGlobals (start and remove the leading "------"------"' chain of database") must contain NO beginning or end quote

    StationGlobals.Database = Provider is Microsoft.Jet.OLEDB.4.0;. Persist Security Info = False; Data Source = C:\\Users\\Public\\Documents\\National Instruments\\TestStand 4.2.1\\Components\\Models\\TestStand Results.mdb.

    2.) rappel Database Options use the following expression to define the Data Source

    Parameters.DatabaseOptions.ConnectionString = "StationGlobals.Database".

    There are other alternatives as stated in this link.

    http://zone.NI.com/DevZone/CDA/tut/p/ID/4793

    Good luck

    PH

  • Passage of variables to javascript in flex mxml mobile

    Hi all

    I'm developing a flex app where I load a file (located in my assets in srcfolder) javascript using phase in Web mode. I am able to display the page but I'm not able to understand how to pass variables to the mxml file that contains the web scene view towards the javascript file and vice versa.

    var file:File = File.applicationDirectory.resolvePath("assets/demo.html");
    
                    webView.stage = this.stage;
                    webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight);
                    webView.loadURL("file://" + file.nativePath);
    

    That's how I'm the loading html file... I need change in a variable inside the demo.html file when running... e i. I need to move from a selected item in a list contained in the main.mxml file and a value inside demo.html avriable...

    Help, please!

    http://Voisen.org/blog/2010/10/making-the-most-of-stagewebview/

  • ODI scenario failure during the passage of variables as parameters in the scenarios of the child

    I have defined a script in such a way that the variables in this scenario will pull data from other tables of configuration and pass those values as parameters to another this scenario in the first scenario of parent. I tested in DEV and DEV, test environments that are shared with the same topology with repositories different works. It has worked well. But when I moved the code to the QA environment, then I get the following error message. While attemption to run the scenario with the following command,

    Execution code:

    OdiStartScen '-SCEN_NAME = XXXXX ""-SCEN_VERSION =-1 ""-LOG_LEVEL = 5 ""-PROJECT_NAME. "" "" PASS = # PROJECT NAME. V_PASS""-PROJECT_NAME.» DB_URL = #PROJECT_NAME. V_DB_URL""-PROJECT_NAME.» DB_SCHEMA = #PROJECT_NAME. V_DB_SCHEMA""-PROJECT_NAME.» DB_LINK = # PROJECT NAME. V_DB_LINK""-PROJECT_NAME.» DB_USER = # PROJECT NAME. V_DB_USER ".

    Error message:

    oracle.odi.oditools.OdiToolInvalidParameterException: error when setting the parameters on the tool

    at com.sunopsis.dwg.function.SnpsFunctionBase.getCoreOdiTool(SnpsFunctionBase.java:618)

    at com.sunopsis.dwg.function.SnpsFunctionBase.getSunopsisApi(SnpsFunctionBase.java:494)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1431)

    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:44)

    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)

    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1889)

    to oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$ 2.doAction(StartScenRequestProcessor.java:580)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:513)

    to oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$ StartScenTask.doExecute (StartScenRequestProcessor.java:1066)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.lang.Exception: disagreement quote...!

    at com.sunopsis.core.SnpsObject.extractParametersLine(SnpsObject.java:174)

    at com.sunopsis.dwg.function.SnpsFunctionBase.getCoreOdiTool(SnpsFunctionBase.java:580)

    ... 18 more

    The variable values for this new environment a probably double-quotes ("") or a special character which is to 'break' the command line. Use this trick ODI to understand all the variables values used in this step and use the values of the test in a procedure separate with just values, not variables:

    http://devepm.com/2014/02/28/execution-variables-trick-for-old-versions-of-ODI/

    It will be useful.

  • passage of variables in rtf

    Hi all, I have parent child sets of data in a data model. While displaying the result. I want to pass the ID of the parent to the child set while there will be the largest in void / lines. Here NAME, ID is part of the parent fields and TYPE, DR is part of the fields of the child and they have all two common IDS. I have problems to display the levels of the child. I tried to create the variable and pass the ID of the group to the child and it does not work. <? xdoxslt:set_variable($_XDOCTX,'ID',ID)? > and in the Group <?-foreach: / / R [_ID=.//node () [local-name () = ID]? > ]

    If I can show the data model is maybe things will be clear. Are there documents where I can change the value using the variable for the group.

    NAME                                       ID                            TYPE

    Dr. John barns SMA ORDR001 PA001 CR

    RV001 CR

    .                                                                                  STA TR

    LOMBARD TRUMAN ADM ORDR004 INCT CR

    AR PA001

    SI001 BR

    Thanks, Sushil

    I sent you a model modified by your email. Take a peek inside.

    Thank you

    Bipuser

  • 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.

  • Passage of variable MC to MC

    How do we set a variable in a Flash just loaded by the "master film clip?"

    Had problems of Authorware to complete. Finally had time to try works very well. warm thanks to those ho responded.

  • Passage of variables of form to another web page?

    I have a screen to select the simple parameter that calls another web page. When I ask the variable of the form in the page of detail (request.form ("app_sts")), the values are always empty. I looked at this for hours and can't get it to pass data. Can anyone help? Thanks in advance. Steve

    The code for setting program and retail prgram is attached:

    You have your method of the form to POST. If you want to pass variables, you need to change the GET method.

    See you soon

    Chuck

  • &amp; lt; cfcase &amp; gt; and the passage of Variable

    Hi all
    This is my first real use of < cfswitch > and < cfcase > and I don't know if I can pass a variable using these. In code that I joined, I put the steps where I think that everything is supposed to happen, but in step 2, this is the error I get:

    Error occurred while processing request
    Invalid argument

    The error occurred in C:\CFusionMX7\wwwroot\dev\admin\welcome.cfm: line 230

    228:
    229: < CFCASE VALUE = "makeEdit" >
    230: < cfinclude template = "includes/category.cfm? page = makeEdit" >
    231:
    232: < / CFCASE >

    Any help would be appreciated.

    OK, I moved the code applicable to the home page and everything works fine.

    Thank you
    Daren

  • URL popup and passage JS variables or?

    Hello...

    The following JS script opens a new window and that window is a model called "viewer.cfm". The pictures are shown in this model (viewer.cfm)... for example: HPIM0877. JPG, HPIM1009. JPG

    I need to pass variables from all the pages that have the following link (below) to "viewer.cfm".

    I have maybe 40 images to deal with, but I'm stuck on a universal #variable # to display the images and their transmission.

    I did not understand any code on the model of receiver "viewer.cfm" as I am a bit stuck.

    Thank you...

    EXAMPLE OF

    < cfoutput > < A HREF = "javascript:void (0)" "
    onclick = "Window.Open ('viewer.cfm? #HPIM0877.)" JPG # ', 'Welcome',' width = 580, height = 440, menubar = no, status = no') ">"
    course < /A > < / cfoutput >

    I have it

    Thank you for those who have given me feedback.

  • Passage of variable data in XSLT

    Hai all, I'm trying to pass the variable content in a XSLT. I try the steps in the link below. I'm not able to pass the parameter values in the XSLT file. I'm not in the last step.

    Did someone tried this example

    http://blogs.Oracle.com/rammenon/2007/05/passing_bpel_variable_contents.html


    or

    Y at - it another way to pass variable data in XSLT. Kindly help.
    Thank you

    If you are wrong haing the practical example of this site is also here

    http://blogs.Oracle.com/ramkumarMenon/gems/TestXSLParams.zip

    see you soon
    James

  • passage of variable with function in AS3

    It is a feature on the first frame of a .fla update from an old AS2 AS3 file:

    function initialize() {}

    MovieClip (root).stage_target_mc.max_messages = 600;

    }

    When the function is called, it should set "max_messages' to 600 in AS3, right?

    Thank you

    Only if the function is called.  If this is going to be a defined value that applies at any time, so you don't need this line in function, and if it's on the main timeline, you do not need the root reference.

  • Using variables in the command 'get-stat"powercli

    Hello

    I try to collect data via powershell and vsphere powercli I would like to pass several stat ID, both using variable that contains my ID stat list.

    (1) when I do this...

    Get-stat - entity (get-vmhost $host_id) - mem.active.average, sys.resourcecpuusage.average real-time stat - maxsamples 1

    ... It works very well

    (2) when I do this...

    $list = "mem.active.average".

    Get-stat - entity (get-vmhost $host_id) - stat $list - realtime - maxsamples 1

    ... It works fine, I can pass variables and so ID stat, one at a time.

    (3) when I do this...

    $list = 'mem.active.average, sys.resourcecpuusage.average '.

    Get-stat - entity (get-vmhost $host_id) - stat $list - realtime - maxsamples 1

    ... It does not work. PowerCLI returns... There is no entity the metric counter 'mem.active.average, sys.resourcecpuusage.average'...

    I do not understand where the problem is during the passage of variables, an idea?

    This should be

    $list = "mem.active.average","sys.resourcecpuusage.average"
    get-stat -entity(get-vmhost $host_id) -stat $list -realtime -maxsamples 1
    

    Must be an array of strings.

  • navigateToUrl issue and variable

    I'm having a problem passage of variable in a local html file using an installed Air application. It works up to a point. I have a web page with a SWF which passes an array of string to the Air application which is already installed on the desktop computer. I know that the string arrray went because I can analyse in the aplication of the Air. I met a problem when I try to run a local html file with the array of strings as variables in the URLrequest. The launch.html is located in the same directory where the Application is installed. I have no problem, launch the file, it is not just to pass the variables with it. No clue as to why it does not save me from disaster.

    Here is the code:

    import flash.events.Event;
    to import flash.external.ExternalInterface;
    import flash.net.URLRequest;
    import flash.desktop.NativeApplication;
    import flash.events.InvokeEvent;
    import flash.utils. *;
    import flash.events.BrowserInvokeEvent;
    import flash.filesystem.File;
    import flash.errors.IOError;
    import flash.net.URLLoader;
    to import flash.net.URLVariables;
    import flash.net.URLLoaderDataFormat;
    import flash.net.URLRequestMethod;
    import flash.events.IOErrorEvent;
    import flash.net.navigateToURL;
    import flash.net.sendToURL;

    var: array of arguments;
    var dateString:String;
    var indexString:String;
    var videoTime:String;
    var videoIndex:String;
    var urlContent:String;
    var urlRequester:URLRequest;
    var variables: URLVariables;


    NativeApplication.nativeApplication.addEventListener (BrowserInvokeEvent.BROWSER_INVOKE, onBrowserInvokeEvent);

    var currentDir:File;
    function onBrowserInvokeEvent(invocation:BrowserInvokeEvent):void
    {
    arguments = invocation.arguments;
    videoTime = invocation.arguments [0] m:System.NET.SocketAddress.ToString ();
    videoIndex = invocation.arguments [1] m:System.NET.SocketAddress.ToString ();
    dateString = "dateString ="+ videoTime. ";
    indexString = "indexString =" + videoIndex;

    urlContent = "launch.html"+ "? ' + dateString + '&' + indexString;
    repCourant = invocation.currentDirectory;

    urlContent = "launch.html;
    urlRequester = new URLRequest (urlContent);
    variables = new URLVariables();
    variables.dateString = videoTime;
    variables.indexString = videoIndex;
    variable = urlRequester.data;
    Arguments.Text = variable. ToString(); / / outputs dateString = date & indexString = 1
    urlRequester.method = URLRequestMethod.GET;

    var htmlLoader:URLLoader = new URLLoader (urlRequester);
    htmlLoader.dataFormat = pouvez;
    htmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    htmlLoader.addEventListener (Event.COMPLETE, URLLoaded);
    try {}
    htmlLoader.load (urlRequester);
    Arguments.Text = "Loaded";
    navigateToURL (urlRequester);
    }
    catch (error: Error) {}

    Arguments.Text = "Unable to load URL";
    }
    navigateToURL (urlRequester);

    }

    Reading the variable Javascript looks like this:

    < script type = "text/javascript" >

    var dateString;
    Window.OnLoad = Function)
    {
    var myQueryString = window.location.search;
    remove the '?' sign if exists
    myQueryString = myQueryString.substr (1, myQueryString.length - 1);
    dateString = myQueryString;
    }
    function show_alert()
    {
    alert (dateString); currently returns nothing
    }
    < /script >

    < / head >
    < body bgcolor = "#ffffff" style = "margin: 0px" >
    < input type = "button" onclick = "show_alert ()" value = "Display the alert message" / > "

    ......................

    Thanks in advance

    DoctorNic

    I've tested this in the AIR, both in the Flash Builder debugger and actual AIR application installed. Works very well. Try this as your document class:

    package {
        import flash.display.Sprite;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.net.URLVariables;
        import flash.net.navigateToURL;
    
        public class Test extends Sprite {
            public function Test():void {
                init();
            }
    
            private function init():void {
                var button:Sprite = new Sprite();
                with(button.graphics){
                    beginFill(0);
                    drawRect(0, 0, 120, 40);
                }
                with(button){
                    x = 10;
                    y = 10;
                }
                addChild(button);
                button.addEventListener(MouseEvent.CLICK, click);
            }
    
            private function click(e:MouseEvent):void {
                launchHTML();
            }
    
            private function launchHTML():void {
                var urlReq:URLRequest = new URLRequest("assets/test.html");
                var urlVars:URLVariables = new URLVariables();
                urlVars.var1 = "Var 1";
                urlVars.var2 = "Var 2";
                urlReq.data = urlVars;
                navigateToURL(urlReq);
            }
        }
    }
    
  • Hiding items using JavaScript external

    Hello!  Hopefully an easy question here.

    I have buttons in 9 Captivate, I need to hide/show using an external JavaScript that comes from an imported HTML5 animation.

    Currently, I am doing it this way (though without success):

    The next button is named "next_button_2" because it is on slide #2.

    Inside the index_scorm.html, I added a function:

    function disableNext()

    {

    var slideNumber = window.cpApIInterface.getCurrentSlideIndex (); to get the number of the current slide

    nextButton var = $("#next_button_" + slideNumber);

    then I tried using code such as nextButton.style.visibility = "hidden"; or nextButton.hide (); etc, but nothing seems to take.  I don't know that I am not pointing to the element correctly.

    };

    Inside the imported animation of HTML, I have the following code:

    Window.OnLoad = function disableButton()

    {

    parent.disableNext ();

    };

    I know that the functions are talking to each other that I have experienced with passage of variables, I know that the variable slideNumber is allocated a number of law.

    How do I point to the right object to hide/unhide it?

    Thank you!

    Window.parent.CP.Hide ("next_button_" + slideNumber)

Maybe you are looking for