I have a function which makes a call to the server to load some financial data. This data is then displayed in a grid. In order to keep displaying the latest data I keep making this server call (every 30 secs). I'm using a Timer object to do this. The problem I have is that I have to wait 30 secs when the application starts for financial data to be displayed, what I'd like to happen is that the load data call is made, then start the update timer. Is there a way to set this up or shall I use to data load calls, one to get the initial data, then one to get the updates, which is made every 30 secs?
I hope I have worded the question ok. I know that you can pass the 'id' of the component but I'm just wondering if there is a more generic way. I have tried using 'this' (shown in example below) but the 'this' keyword refers to the application.
I have a function that has a For Loop inside it. Inside that For Loop I am defining a button and calling to another function if clicked. The issue is (since I shouldn't put functions inside other functions) how do I get the variable being processed in the For Loop to be considered in the function that was just activated by pressing the button.
Here's the code. All variable are defined elsewhere in the code. function populateBox(DataInput:XML) { linkAmount = DataInput.country[boxPartNum - 1].link.length(); /// defines amount of links being made for (k=0; k<linkAmount; k++) { myLink = new LinkClass(); [Code] ..... I need to trace the "K" used in the For Loop.
I'm trying to get to grips with having a function that can accept an input that is passed to it as it is called, and then use that input in its workings.As I'm writing more code, it's becoming clear that this is something that I need to pick up, but despite reading and playing about with it, I'm still a little confused.The code is designed for a character's "level up" screen. When the button next to a stat is pressed, I want it to pass the name of that stat to the statUp function, which will increase the selected stat by one.In my main file I have this code, to call the function when the button is pressed. (In this example, it is the Strength button)
I have an external log file which name changes each session, with the format XXXXX.log
I need to load it inside a swf to show its data, but each time the logs name is different, I need to open the .fla, changing the name of the file and then republishing the swf.
So I have made a simple script to load another .txt, to type manually in it the 5 number of the logs name and load it externally inside the swf:
Code: var logNumLoader:URLLoader = new URLLoader(); logNumLoader.dataFormat=URLLoaderDataFormat.VARIABLES; logNumLoader.addEventListener(Event.COMPLETE, loadedLogNum);
[Code]....
While I cannot assign the value of logNum to the last function, the .log cannot be opened.
I have an external log file which name changes each session, with the format XXXXX.log I need to load it inside a swf to show its data, but each time the log's name is different, I need to open the .fla, changing the name of the file and then republishing the swf. So I have made a simple script to load another .txt, to type manually in it the 5 number of the logs name and load it externally inside the swf:
I have a number of nodes that are plotted on stage. I want to display the value of each node when hovering over the node (using the Tooltip class). [code]...
the idea is that the site keeps tracks of whatever page is current and passes this variable to the alpha function which will target that movie instance to fade when moving to another page - then that page's name will be assigned to current.this is the code that i have now..
How do i pass a variable to a function from an event listener which is inside a function Below is a function that is called when after loading some variables
function dataOK(mydataevent:Event):void{ var j:int = 0; do { trace(j);
[Code]....
This is a simplified version of the original code. The above function generates an error because j is undefined in the function. I am wanting to get the variable j when the button is pressed.
How do I pass the variable j to the Button_Click function?
I am running a loop to pull thumbs into a containing movieclip from an xml list. What I want to do is have the thumb's parent movieclip fade in after they are done loading, but I can't figure out how to reference the parent once it's loaded.My code(which currently doesn't work the way I want it):
var vsThumb:articleBox; var currentarticleX:Number = 0; var articleLinkURL:String;
How can I combine the following functions and still pass a different string to the buildUI(); function?
I have two functions that do the same thing only at the end they both call a function and pass a String value to the function. This string value is the only thing different.
Below is are my eventlisteners and functions as they are now:
female_start.addEventListener(MouseEvent.MOUSE_DOWN, startFemale); male_start.addEventListener(MouseEvent.MOUSE_DOWN, startMale); //FUNCTIONS THAT DO THE SAME THING AND BOTH CALL buildUI BUT PASS A DIFFERENT STRING.
Code: onEnterFrame = traceMe("test") traceMe = function(param){ trace(param)} If that won't work then would someone explain how you get something to execute a predefined function and pass a variable...
I have a movieClip named MC, and it's enabled with action script, with the class name MC_Rectangle and a Stage.I override the MC_Rectangle class file in a mc_rectangle.as external file.here is the code:
1. how can i access the variable "sequence" in "mc_rect"
2. how can i pass parametre from main stage to mc_rect via function setSequence(data:int)?
3. how can i call the function in addSequence() in mc_rect.
in asp.net, i usually use mc_rect.sequenct,mc_rect.setSequence(data), mc_rect.addSequence() to achieve my goals......btw, can function in mc_rect return out result to main stage?