Pass variables in symbols to function

I'd appreciate some quick help on how to pass a variable I set in a symbol to a function in the compositionReady code. 
Right now for each button in a menu I have the code: 
case 'item1':
sym.getComposition().getStage().clearStage();  //this is a function in compositionReady
sym.getComposition().getStage().getSymbol("object_details").$("item1").show();
sym.getComposition().getStage().getSymbol("object_details").getSymbol("item1").play(0);
break;
here is the code in compositionReady:
sym.clearStage = function() {
sym.getComposition().getStage().$("grid").hide();
sym.getComposition().getStage().$("othermaps").hide();
Is there a way to pass the value 'item1' to the function so that I'm not writing the same code over and over? 
Thus:
case 'item1':
sym.getComposition().getStage().clearStage("item1");
break;
and in compositionReady:
sym.clearStage = function(itemValue) {
sym.getComposition().getStage().$("grid").hide();
sym.getComposition().getStage().$("othermaps").hide();
sym.getComposition().getStage().getSymbol("object_details").$(itemValue).show();
sym.getComposition().getStage().getSymbol("object_details").getSymbol(itemValue).play(0);
I know my syntax is totally wrong.  Please help me to see this.  Thank you. 

this way you can make your codes much shorter :
case 'item1':
x.clearStage("item1");
break;
//and in compositionReady:
Stage = sym.getComposition().getStage()
x = {
clearStage:function(z){
Stage.$("grid").hide();
Stage.$("othermaps").hide();
Stage.getSymbol("object_details").$(z).show();
Stage.getSymbol("object_details").getSymbol(z).play(0);
regards
Zaxist

Similar Messages

  • How can I pass variable to eventdriven startElement() function?

    I am new to java and SAX. Could anybody tell me how to pass variable to eventdriven startElement function? I tried the following code but didn't work.
    public class ReadXmlSax extends DefaultHandler
    String elementName;
    String requestName;
    Vector v = new Vector();
    public Enumeration getAttribute(String sFileName, String sTagName, String sAttrName)
         Enumeration e;
         elementName=sTagName;
    requestName=sAttrName;
    File f = new File(sFileName);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new ReadXmlSax();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse(f, handler);
    } catch (Throwable t) {
    t.printStackTrace();
    e = v.elements();
    return(e);
    //===========================================================
    // SAX DocumentHandler methods
    //===========================================================
    public void startDocument()
    throws SAXException
    public void endDocument()
    throws SAXException
    public void startElement(String namespaceURI,
    String sName, // simple name
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
              //System.out.println(elementName);
              if (qName.equals(elementName))
                   String serverName = attrs.getValue("",requestName);
                   v.addElement(serverName);
    }

    I attached the main call the ReadXmlSax class. I added the
    "system.out.println(elementName);" in the function getAttribute and startElement as well. I got printing out "name" for elementName from function getAttribute but got others printing out "null" for elementName from function startElement. Any suggestions? thanks
    import java.io.*;
    import java.util.*;
    import ReadXmlSax;
    public class ReadElement
         public static void main(String argv[])
              ReadXmlSax r = new ReadXmlSax();
              Enumeration e = r.getAttribute("dre.xml","server","name");
              try{
                   while (e.hasMoreElements()) {
                   System.out.println((String)e.nextElement());}
              }catch(Throwable t){
                   t.printStackTrace();
    <strong>test</strong>

  • Oracle 10g trigger to pass variable to xmltype.existsnode() function

    Hi all,
    Could anyone please help me on this? It is kind of urgent.
    I created a trigger below, it compiled successfully, but when I tried to insert a xml document into oracle 10g db, I got error message says:
    550- Error Response
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "CONTENTDB.VALIDATE_LINK", line 11
    ORA-04088: error during execution of trigger 'CONTENTDB.VALIDATE_LINK'
    550 End Error Response
    My trigger is:
    CREATE OR REPLACE TRIGGER VALIDATE_LINK
    BEFORE insert on TABLE_LINK
    FOR each row
    DECLARE
    v_key VARCHAR2(1000);
    v_count NUMBER(5);
    xmldata XMLType;
    begin
    xmldata := :new.sys_nc_rowinfo$;
    IF xmldata.existsnode('/link/key') = 1 THEN
    v_key := xmldata.extract('/link/@key').getStringVal();
    select count(*) into v_count from table_link WHERE (existsNode(object_value,'/link[key=v_key]') = 1 )
    and (existsNode(object_value,'/link/publishingElements[TestingFlag="true"]') = 1);
    if (v_count >= 1) then
    raise_application_error (-20001, 'TestingFlag can only have one true value.');
    end if;
    end if;
    end;
    I have questions regarding above trigger:
    1) it seems extract() doesn't work in statement below: v_key := xmldata.extract('/link/@key').getStringVal();
    2) can I pass a variable v_key into xmltype.existsnode() function? if yes, what is the right format to do so?
    Thanks a lot.
    Honson

    Hi Mark,
    Thanks for your comments, I have added checking for xmltype object is not null logic. and my initial problem was fixed, the only last problem I am having now is xmltype.extract().
    CREATE OR REPLACE TRIGGER VALIDATE_LINK
    BEFORE insert on table_LINK
    FOR each row
    DECLARE
    v_key VARCHAR2(4000);
    v_count NUMBER(5);
    xmldata XMLType;
    v_tmp VARCHAR2(4000);
    begin
    xmldata := :new.sys_nc_rowinfo$;
    if (xmldata is not null) then
    IF xmldata.existsnode('/link/key') = 1 THEN
    v_key := xmldata.extract('/link/key').getStringVal();
    v_tmp := '/link[key=' || v_key || ']';
    select count(*) into v_count from cibc_link WHERE (existsNode(object_value,v_tmp) = 1 )
    and (existsNode(object_value,'/link/publishingElements[TestingFlag="true"]') = 1);
    if (v_count >= 1) then
    raise_application_error (-20001, 'TestingFlag can only have one true value.');
    end if;
    end if;
    end if;
    end;
    I am expecting this statement:
    v_key := xmldata.extract('/link/key').getStringVal();
    return v_key := content.link.viewPrintableVISACreditCard
    but now it always returns like this:
    v_key := <key>content.link.viewPrintableVISACreditCard</key>
    I don't want the xml tag <key></key> returned by extract().getStringVal() function.
    Could you or anyone please help?
    Thanks.
    Honson

  • How? Flex pass variables or call function in SWF

    Dear All:
    I am new in Flex.
    But I stuck with a problem for weeks.
    I wish to communication between Flex and Flash(swf).
    I tried to pass variable from Flex to Swf. (Call function in Swf also pass variables)
    I did some tourital on google by using SWFLoader, which works fine.
    BUT the AS code in SWF must in MAIN FRAME.
    I need put my AS code by using DOCUMENT CLASS.
    BUT when I using Document class, the method is not working.
    The flex cannot find function in Flash.
    PS.I already set main.as class as public
    Hope some one can give some hint.
    I really get a huge headache.
    Many thanks,
    Henry

    myIP wrote:
    > or perhaps more ideal;
    >
    > for(var sVar in flashVars)
    > {
    > i++;
    > //var mcName = sVar.substr(0,3);
    >
    > // create the MCs:
    > duplicateMovieClip(_root.testBut,"medium"+sVar,i);
    > _root["medium"+sVar].testText.text=sVar;
    > _root["medium"+sVar].mcName = sVar.substr(0,3);
    >
    >
    > // assign the function to each created MC:
    > _root["medium"+sVar].onRelease = function()
    > {
    > trace(this.mcName)
    > _root[mcName]._x=0;
    > }
    > }
    >
    thanks but this does not work.
    I think that the problem is that the variables defined in the
    for loop do not exist in the scope of
    the function.
    when the MC is clicked, and the onRelease function says:
    _root[mcName]._x=0;
    the variable "mcName" is empty.
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    An Ingenious WebSite Builder:
    http://sitelander.com

  • How to pass variable in a function

    I would like to ask how to pass the value "char" into the
    "onSoundComplete" function? many thanks! many thanks!
    _root.playVO = function(pageNum, char){
    var myVO:Sound = new Sound();
    myVO.loadSound("vo/vo" + pageNum + ".mp3", true);
    _root.myVO.onSoundComplete = function(char){
    _root.attachMovie("indicator", "indicator",
    _global.curLevel++);
    _root[char].mouth.gotoAndStop("mute");
    _root.indicator.clickIndicator_btn.onRelease = function(){
    _root.play();
    _root.currentPage++;
    _root.display(_root.currentPage);
    this._parent.removeMovieClip();
    }

    I don't think you can pass variables into the onSoundComplete
    handler function. But you don't really need to as you've written
    the code. You're passing it into the playVO function so it should
    be availble to the onComplete handler (which you've written inside
    playVO) without having to restate it. As long as you pass it in
    when calling playVO (e.g. playVO(myVar);)
    Hope that helps!

  • Passing variables: Functions

    Sorry if this is nooby questions:
    How can i pass variables between functions in AS. I know how
    to return a value and you can pass parameters into a function but
    say I had an outer function (say "a") with a local var (say "vara")
    with a subtended function (say "b") how can i pass "vara" into
    function b and then return it out so the value of "vara" has been
    updated. Sorry if bad explanation. Is this possible with local
    vars? or would i have to use a regular var which both functions can
    access?

    > This will basically do what your asking. If I missed the
    mark let me know.
    I think you did
    >> say I had an outer function
    >> (say "a") with a local var (say "vara") with a
    subtended function (say
    >> "b") how
    >> can i pass "vara" into function b and then return it
    out so the value of
    >> "vara"
    >> has been updated.
    Short answer .. no .. you can only pass things by value, and
    you can only
    return values.
    You cannot pass a variable into a function and have the
    function modify the
    variable.
    If you want to update a single variable with the result of a
    function, then
    you can do as TimSymons suggested: vara = b(vara);
    But that doesn't seem to be what you're asking.
    You can, however, put your variables inside an Object, pass
    the Object to a
    function, and modify the variables inside the object, then
    when the function
    returns, the object has the modified variables. eg
    function a() {
    var myvars = { vara : 123, varb : 456};
    b(myvars);
    trace(myvars.vara);
    trace(myvars.varb);
    function b(myvars) {
    myvars.vara = myvars.vara * 2;
    myvars.varb = 789;
    Jeckyl

  • The function javascript:doSubmit not passing variables between pages

    Hi,
    I have an report that has a link to another page, and I'm trying to pass 2 variables. If I use a target URL as such the variables do not get passed, but if I use a page target and explicitly add the item name and values it works fine. Here is the call I'm using to javascript:doSubmit:
    javascript:doSubmit('f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#');
    Does anyone have any insights?
    Thanks,
    Joe

    You can't use doSubmit to pass variables; it will only submit your page with the request you passed in.  All normal page processing and branching will be followed..  Why are you using doSubmit?  Just put the URL in the URL field.
    f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#

  • Passing variable having value as whole SOAP request to command while invoking ODI WS call

    When passing variable in place of soap request message (variable value is whole SOAP request message prepared using procedure) in ODI Invoke WebService command like -->
    OdiInvokeWebService "-URL=url...." "-PORT_TYPE=..." "-OPERATION=..." "-RESPONSE_MODE=NEW_FILE" "-RESPONSE_FILE_CHARSET=UTF8" "-RESPONSE_XML_ENCODING=UTF-8" "-RESPONSE_FILE=..." "-RESPONSE_FILE_FORMAT=SOAP" "-HTTP_USER=..." "-HTTP_PASS=..."
    #SOAPREQUESTMESSAGE
    Gives error :
    ODI-1226: Step OdiInvokeWebService 1 fails after 1 attempt(s).
    ODI-1241: Oracle Data Integrator tool execution fails.
    Caused By: com.sunopsis.wsinvocation.SnpsWSInvocationException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '#' (code 35) in prolog; expected '<'
    at [row,col {unknown-source}]: [1,1]
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromXML(AbstractMessageImpl.java:333)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromString(AbstractMessageImpl.java:348)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.fromString(AbstractMessageImpl.java:403)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.fromXML(AbstractJWSDLParserImpl.java:272)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:260)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.getSOAPMessage(WebserviceUtils.java:94)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.invoke(WebserviceUtils.java:138)
        at com.sunopsis.dwg.tools.InvokeWebService.actionExecute(InvokeWebService.java:327)
        at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:276)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java:3437)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1509)
        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 oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
        at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
        at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
        at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
        at java.lang.Thread.run(Thread.java:662)
    Thanks in anticipation...

    the used variable 'SOAPREQUESTMESSAGE' is being created in a procedure using jython.
    1. Can we use this variable (SOAPREQUESTMESSAGE) value in the next step that is while invoking web service request (can it persist) ?
    2. If not then how can we use this variable value to invoke ws request in next step ?
    Would like to appreciate help.
    Pls reply.

  • Passing variables from web server to HTML5 Captivate File

    I am publishing a Captivate quiz as HTML5 and hosting them on a website. I would like to know how I can pass data from my site to the HTML5 based Captivate quiz.
    So far I have had success getting data out of captivate by having the file POST the results of a finished quiz to a RESTful route. However, I have not had success putting data into the file. I would like to pass information such as User ids and quiz ids, maybe even current slide position so that I can associate the quiz information with my database. I am not specifically looking for a solution to user ids, quiz ids, etc. because I can get creative in that regard, I just want to know if others have been able to set variables on Captivate file load.
    I have tried a setting variables in a couple ways:
    - Declaring the variables with javascript, then ajax loading the page into a div. This caused dependency issues since the captivate file uses relative paths for its assets folder.
    - Modifying the published html file by adding the javascript variables, this returned an error message saying I cannot override the existing captivate variables
    - Adding the js variables into the init function, this had no effect.

    To simply pass the username and an id I used the following.
    Note the URL has query string parameters that match the captivate variables
    http://mywebsite/Course/index.html?cpQuizInfoStudentID=IDHere&cpQuizInfoStudentName=Studen tNameHere
    Another way to do this to use JavaScript to read the query string, and the assign variable in CP to the query string values. I remember reading some more detail, but cant remember where.
    Hope it helps
    Luke

  • How to pass variable form javacript to java BackingBean

    Hello,
    I am trying to pass variable from Javascript method (which is written in jspx) page to a Java BakingBean.
    here is the Javascript code:
    <SCRIPT type="text/javascript">
    function OnSave() {
    alert("The signature you have taken is the following data: " + SigPlus1.SigString);
    </SCRIPT>
    of course, this method will be called after the use press save button as follow:
    <INPUT id="submit1" name="Save" type="submit" value="Save" onclick="OnSave()"/>
    As you can see this Javascript will alert the result to the user. Instead I want to pass the object ( SigPlus1) to a Java Bean.
    I am using ADF technology with JDveloper 11.1.2.3

    here is the answer:
    ADF RichClient API - af:serverListener

  • How to pass variables between loaders

    Hi,
    I am trying to load an image, with descriptive text and a back button on the click of a thumbnail of the image. I am using a MovieClipLoader instance to do this.
    Here are my problems:
    1. I tried loading the image, with the text(which is within an external swf), using the same loader, but since I am placing them dynamically, depending on the dimensions of the image, I need to pass variables between the two. The image loader is taking longer than the text (obviously) but I need the dimensions of the image before I can place the text. How do I do that??
    2. I tried using two loaders, with separate listeners, and the problem once again is that the text loads before the image, and is hence placed with default values instead of the values derived from the image. The code is within onLoadInit(). Is it possible for me to get the dimensions of the image from onLoadStart()???
    3. There is a back button within the text.swf. I want the image and the text.swf to be unloaded when this button is clicked. How can I achieve that? Can I call loader.unloadClip(target), from within this? Will it recognize the variable?
    4. Is there a much easier way to do this, which I am sadly unaware of?
    Any help will be appreciated.

    Tried the onloadstart() function, but it gives target._width and _height as 0. So that is ruled out...any other suggestions?

  • How to pass variables to Skin applied with skinClass?

    Hi all,
    I'm experimenting with new skin for a SkinnableContainer, and I would like to pass variables to that skin to dynamically change some elements.
    This is how I would like it to work, but it doesn't. Is there a way to make it work? (Or something similar... like defining new stylesheet-elements in the skin.)
    <s:SkinnableContainer skinClass="skins.SkinnableContainerBackground" gradient1="0xFFF000" gradient2="0x000FFF>
    <s:RichText id="rt1" width="400" height="200"  />
    </s:SkinnableContainer>
    Skin:
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:d="http://ns.adobe.com/fxg/2008/dt"
            xmlns:ai="http://ns.adobe.com/ai/2008"
            height="100%"
            width="590">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <s:states>
            <s:State name="normal"/>
            <s:State name="disabled"/>
        </s:states>
        <fx:Metadata>[HostComponent("spark.components.SkinnableContainer")]</fx:Metadata>
        <fx:Script>
            <![CDATA[
                [Bindable] public var gradient1:uint;
                [Bindable] public var gradient2:uint;
            ]]>
        </fx:Script>
        <s:Group top="0"
                 bottom="0"
                 left="-11"
                 right="0">
            <s:Group x="15"
                     top="0"
                     bottom="0"
                     id="kaft">
                <!--            <s:filters>
                     <s:DropShadowFilter alpha="0.4"
                     blurX="6"
                     blurY="6"
                     distance="4.24264"
                     quality="3" />
                     </s:filters>
                -->
                <s:Rect width="586"
                        ai:knockout="0"
                        d:userLabel="kaft"
                        top="0"
                        bottom="0">
                    <s:fill>
                        <s:LinearGradient y="82.3125"
                                          scaleX="585.975"
                                          rotation="-0">
                            <s:GradientEntry color="{gradient1}"
                                             ratio="0.466667"/>
                            <s:GradientEntry color="{gradient2}"
                                             ratio="1"/>
                        </s:LinearGradient>
                    </s:fill>
                </s:Rect>
            </s:Group>
        </s:Group>
        <s:Group id="contentGroup"
                 left="20"
                 right="20"
                 top="10"
                 bottom="20">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
        </s:Group>
    </s:Skin>

    ou can also define custom CSS styles:
    MySkinnableContainer.as
        [Style(name="gradientA", type="uint", format="Color", inherit="no")]
        [Style(name="gradientB", type="uint", format="Color", inherit="no")]
        public class MySkinnableContainer extends SkinnableContainer
            public function MySkinnableContainer()
                super();
    MySkinnableContainerSkin.mxml
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/halo"
                 xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Metadata>
            <![CDATA[
            [HostComponent("MySkinnableContainer")]
            ]]>
        </fx:Metadata>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <s:Group bottom="0" left="-11" right="0" top="0">
            <s:Group id="kaft" x="15" bottom="0" top="0">
                <s:Rect width="586" bottom="0" top="0">
                    <s:fill>
                        <s:LinearGradient y="82.3125" scaleX="585.975" rotation="-0">
                            <s:GradientEntry color="{getStyle('gradientA')}" ratio="0.466667" />
                            <s:GradientEntry color="{getStyle('gradientB')}" ratio="1" />
                        </s:LinearGradient>
                    </s:fill>
                </s:Rect>
            </s:Group>
        </s:Group>
        <s:Group id="contentGroup" bottom="20" left="20" right="20" top="10" />
    </s:SparkSkin>
    styles.css
    @namespace local "*";
    local|MySkinnableContainer {
        gradientA: #FF0000;
        gradientB: #000FFF;
        skinClass: ClassReference("MySkinnableContainerSkin");   
    main app:
        <fx:Style source="styles.css" />
        <local:MySkinnableContainer width="590" height="100%">
            <s:RichText id="rt1" width="400" height="200" color="#000000" text="test" />
        </local:MySkinnableContainer>

  • Passing variable data into XSLT

    Hai all, I am trying to pass variable contents into a XSLT. I am trying the procedure given in the link below.I am not able to pass the parameter values into XSLT file.I am failing in the last step.
    Has anyone tried this example
    http://blogs.oracle.com/rammenon/2007/05/passing_bpel_variable_contents.html
    or
    Is there any other way to pass variable data into XSLT. Kindly help.
    Thank You

    True, the sample also uses the same function that I mentioned :
    <!-- convert Invoice to PO using XSLT service -->
              <assign name="transformVehicle">
              <copy>
                   <from expression="ora:processXSLT('InvToPo.xslt',bpws:getVariableData('input','payload') )"/>
                   <to variable="output" part="payload"/>
              </copy>                    
              </assign>

  • Passing variable trouble

    I have created a few arrays in a frame and am trying to pass
    a variable from the main array to choose a second array by passing
    a variable using a function after a button is clicked. I use this
    code to select the name of the new array:
    _root.m1[name].menuTwoID = homeMenu
    [0];
    from this array
    var homeMenu:Array = [["residential", "resMenu"],
    ["commercial", "comSubMenu"],.....
    That should produce a passed variable "resMenu" correct?
    It doesn't work later later in a new function when I put it
    into:
    _root.m2[name].main_text.text = menuTwoID[count-1][0];
    to get the names from the second array.
    If I put "resMenu" directly in the code (below) it works
    fine.
    _root.m1[name].menuTwoID = resMenu;
    Any ideas of what I'm doing wrong?
    Thanks

    Here's an example of the idea:
    I create a menu and when it's clicked try to use the
    menuTwoID to pass the name of the new array to create a new sub
    menu. But that doesn't work. Is it that's it's a string and not an
    array?
    var AllColors:Array = [["reds", "colorsOne"], ["blues",
    "colorsTwo"]];
    var colorsOne:Array = [["Fire Engine", "colors1a"],
    ["Sunset", "colors1b"]];
    var colorsTwo:Array = [["Sky Blue", "colors2a"], ["Cyan",
    "colors1b"]];
    function buildAllColors() {
    var spacing:Number = 20;
    for (var i = 0; i < 2; ++i) {
    var name:String = "flipper" + i + "_mc";
    var y:Number = i * spacing;
    _root.m1.attachMovie("flipper", name, i);
    _root.m1[name]._x = 0;
    _root.m1[name]._y = y;
    _root.m1[name].main_text.text = AllColors
    [0];
    _root.m1[name].menuTwoID = AllColors[1];
    _root.m1[name].item_btn.onPress = function () {
    itemClicked (this._parent.menuTwoID);
    for (var i = 0; i < 2; ++i) {
    _root.m1["flipper" + i + "_mc"].flipper_bg._alpha = 50;
    this._parent.flipper_bg._alpha = 100;
    buildAllColors();
    function itemClicked (menuTwoID:String){
    var spacing:Number = 20;
    for (i=0; i<2; i++){
    var y:Number = i * spacing;
    var name:String = "flipper" + i + "_mc";
    _root.m2.attachMovie("flipper", name, i);
    _root.m2[name]._x = 0;
    _root.m2[name]._y = y;
    _root.m2.attachMovie("flipper", name, i);
    _root.m2[name].main_text.text = menuTwoID
    [1];
    stop();

  • Cannot pass variables from PHP to actionscript 3.0

    I am using CS3 and I write the following code as to pass variable to flash from PHP
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    PHP file
    <?php
       echo ('values = 8');
    ?>
    But I always get the error and cannot get the values by using trace();
    Before i try to use "myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;" I still get the same error.
    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$iinit()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    Can anyone help me?

    The error is fixed.The new version is like that
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    php file
    <?php
       echo "values=8";
    ?>
    The output finally is "null" in flash file. Why does it happen? It should give me 8 when I input trace(myValue);

Maybe you are looking for

  • GeForce FX 5200 and Dell 20" 2005FPW - not recognized

    Hello, I just got a dell monitor figuring that my computer could support it as it's the same as the apple display. It works with my powerbook - recognized by name, but that's an ati card. With the G5, it works in the VGA, but not at the correct resol

  • How to group the values with this partition over clause ?

    Hi, I have a nice request : select  c.libelle "Activité", sum(b.duree) "Durée" from    fiche a, activite_faite b,         activites c, agent d where   a.date_activite BETWEEN TO_DATE('20/09/2009', 'DD/MM/YYYY') AND TO_DATE('26/10/2009', 'DD/MM/YYYY')

  • Required SQL 2012 features for RDS2012 HA

    what features are required (basic) for SQL 2012 in RDS 2012 HA FARM? Would just SQL Server Agent, SQL Server Database Engine, SQL Server Browser be enough for start?  Thanks. --- When you hit a wrong note its the next note that makes it good or bad.

  • Mighty Mouse just scrolls up

    Hi, I just got a used (looks like new) bluetooth mighty mouse. The problem is the scroll ball only scrolls up. I set it to 360° and all other options. No effect. Another thing is I can't configure the mouse as a bluetooth device. The mouse works (exc

  • Query regarding BI license

    If I have x number of mySAP Business Suite Professional and y number of mySAP Business Suite Limited Professional licenses, do it include users in BI as well? Cheers Sanjay