I am connecting to a web service that I know has a method named getAddy.However, in order to work properly I need to provide this method with a paramater named sessionToken. I'm having difficulty with this, my code currently looks like this:
ActionScript Code: var WS_URL:String = "http://somedomain?wsdl"; var addy_ws:WebService = new WebService(this.WS_URL);
for(var i=1;i<=2;i++) { var mc=attachMovie("mc_name","obj"+i,i) mc._x=200*i;
[code]....
this code places two objects obj1 and obj2 and two buttons button1 and button2
button1 is expected to return _level0.obj1 button2 is expected to return _level0.obj2
Instead they both return _level0.obj2. Obviously, each button is passed the object corresponding to the last "i" in the loop. How shall I sort this out? One of the obvious solution sis to attach each button to its object
mc.mc=mc.attachMovie("button","button"+i,i+10);
but this is not acceptable for some other reason I also have to use this for(var i=1;i<=2;i++) block because in the final application the number of objects will be variable and set by the user at the run time.
I am using the asfunction to call a function and passing a parameter. The problem is in the parameter. I can give a parameter that is over 104 characters. What ever is after that 104th character doesnt pass into the string of the function.
how to pass a constant into a function, and then for that function to make use of that constant in its constant form (not the string form).
Some code snippets:
Code: // make call to play ad, passing a constant value defined in a separate AdType class // in the AdType class, AdType.PREROLL = "before_content"
[Code].....
I realize this is because the value of AdType.PREROLL resolves to a String value ("before_content"), which is then getting passed into the function as such (a String), but is there a way I can make use of that same constant in the playAd function without having to check its string value directly?
I am using the asfunction to call a function and passing a parameter. The problem is in the parameter. I can give a parameter that is over 104 characters. What ever is after that 104th character doesnt pass into the string of the function.
I have a custom function with parameter. I'm trying to pass the parameter to the gotoAndPlay as follows. This is where the function is called...
Code: myButton_btn.onPress = function() { myFunction("Apply"); } This is the function... Code: myFunction = function (fLabel) { trace(fLabel); gotoAndPlay(fLabel); }
Basically "Apply" is a frame label that I'm trying to send the playhead to. The fLabel paramater traces out properly, but the gotoAndPlay doesn't send the playhead to the appropriate frame label. It sends it to 4 frames before the end. It's really weird. Even if I add frames to the timeline, it still sends it to 4 before the end. I can get it to work perfectly in a "new" flash document, but not in my existing document.
I'm having troubles activating the HitTest, passing the objects name as a parameter through a global function. Let's say there is the following function on the main timeline:
I am new to flex and SAP. I am designing a dashboard in flex. I have retrieved data from SAP query_view_data and I am able to show it in charts. However now I want to pass parameter to SAP web service to retrieve data between two dates. I am trying to this with the following code:
protected function adg1_creationCompleteHandler(event:FlexEvent):void { var IInfoprovider:String="0FIGL_O02";
I have an asp.net page where I get the user_id from who's logged in. Now I need to pass this user_id to a flex application that runs in an asp.net page as a .swf. How can I get this user_id in a variable in my flex application.Or what is the best way to get the user_id into flex.
I have a main mxml file (flex4) and want to pass a parameter (user_name) to a component in a directory called components. When I run the program, the user_name is NOT being sent from the main to the component file. (Interestingly, if you make the component visible, you can see the parameter has been passed).
I have hacked much larger files down to get the following two files: Main <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" [Code] .....
I need to pass a struct and a string in a web service. I am using a WebService components to do so.upon my search, there is no struct type in actionscript and so I used a class for that one.
public class UserInfo{ public var name:String; public var dateAdded:Date; }
and I'm filling it up so that I can pass it on the web service like this:
var newUser:UserInfo = new UserInfo(); newUser.name = "myName"; newUser.birthdate = new Date(); webServComponentId.operationToCall(newUser, "password");
Upon sending this request, it prompts me an error of Error #1088.
the component that is being called by webServComponentId.operationToCall(newUser, "password"); is this:
Let's say I have a Custom Event Class, and it has several Event types stored in static Constant:
[Code]...
Is there an easy way to validate that the type passed to the Constructor is one of the Static Constants of the Class, without having to check it against each value?
What language construction can be used to make a compile time checking of Array elements type when the Array is a function parameter?[code]Here we've marked the returned Array as one containing elements of type string.Is there a way to mark the parameter variable as an Array containing elements of certain type?I'm specially interested in the Array collection. I'm aware of the vector collection but I have reasons not to use it in my case.
In as3, I am adding event listener and then attaching the anonymous function to it:[code]Now this whole piece of code is looped n times. Now, I have n myBoxes and whenever I roll my mouse over the box, it should alert the name. But, what I see is that the last value of count is used by each box. How can I pass parameter or value to the anonymous function? ( as roll over , I believe, expects only one variable)
I'm using FlashBuilder 4 beta2. My base class has a function foo(): protected function foo(s:String, z:String=null): void{} Literally "foo" so that there's no chance I'm stepping on a built-in method. I am getting an "Incompatible override" error when attempting to override the method in a subclass: override protected function foo(s:String, z:String=null): void{} Does the optional parameter do something "behind the scenes" that makes it illegal to override the method?
I'm having a problem in flex 3 where if a static const I have defined is used as the parameter to a function call within binding tags I get a "1120: Access of undefined property NodePropertyMatrix". _propMtx is a ArrayCollection.
I have a function setup that I was hoping to re-use to eliminate a bunch of code, but I can't figure out how to pass a parameter to it. I'm getting the trace output, but the rest of the function is not working.Is there a way to get this to work?From what I can tell the syntax matches the examples in the reference guide.
i have 1 PHP page in which i have a Flash animation. this flash swf file, display 2 fields and 1 button.
this php page is called "test.php".
i'm able to send data from Flash to a PHP page, but i would like to send the content of those 2 fields to the "test.php" and display them. however, i do not know how to do it.
i see that it works but i'm not able to display or refresh the PHp page to display the result.
as walkaround i was thinking to collect the webpage address where is executed the flash and to send it to another PHP page. and this 2nd PHP page, will reload the test.php with parameters...
how to get under flash, the address of the actual executed php page ?
I would like to know if is possible to pass a var type as parameter to a function. I have several sounds in library, and I would like to do something like that:
Code: function PlayMe(soundname:String) { var snd:this[soundname] = new this[soundname]; snd.play(); }
The problem I am currently having right now is the inability to send variables loaded from the LoaderSWF to the SWF that has been loaded.
Concretely speaking, I have an embed script on an HTML page that contains several variables in the FlashVars line. The embed script loads a file called loader.swf. Loader.swf's main responsibility is basically take those variables from the flashvar, load the game URL and pass along the rest of the necessary parameters to the game that the loader is loading. However, I've been working out several solutions and none of them worked the way I wanted to.
how can I load the game SWF file and send along additional parameters with that request? Is there someway I can punch in variables into the myLoader object?
The code I came up with sends along the authenticity token just fine, however, it is not sending score_url correctly. I'm not sure if that is the correct behavior, but please enlighten me with any insights you may have.
I have also considered trying LocalConnection, but the problem is that I do not have the necessary source code for the games to set up LocalConnection on the receiving end.
Also, the game files are using AS2, while the loader is using AS3. The game files read variables by utilizing _root.score_url, etc.