Installation of C# variables in flash



  • There's a ready flash drive with AS2 or AS1 (i don't know) in the C# form, the values of its global variables from C#, or Java (as I don't know don't know, but if possible, they'll do the same). For this, there is the function of AxShockwaveFlash.SetVariable(string name, string value). It works, but only with local variables, with no global response, i.e.:

    axShockwaveFlash.SetVariable("gVar.var", "3");
    axShockwaveFlash.SetVariable("_global.gVar.var", "3");
    

    and similar variations are not effective (although they also work at java script)

    axShockwaveFlash.SetVariable("localVar", "3");
    

    Here, with local variables, it works great.

    Who knows what this is about? Einette's gone, but he didn't find the answer. Or can there be other options for how you can pass the meaning without writing the flash drive itself?



  • For global variables, I can't say exactly, but the properties of swf shapes through _root can be addressed. Also when the Flash and C# user interface used the interface code in the form of properties at Flash. AS2

    var getSomething =   function ():Number {
        return Graph.Something;
    }
    var setSomething = function(value) {
        Graph.Something= Number(value);
    }
    _root.addProperty("FSomething", getSomething , setSomething );
    

    C#

    axShockwaveFlash.SetVariable("FSomething", "3");
    axShockwaveFlash.GetVariable("FSomething");
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2