ActionScript 2.0 :: XML Linking Function Is Not Going Through The Loop
Dec 27, 2004
I've modified Squirrel Finder (off Kirupa) a little to create a list that goes to various links. Only problem is, the links for each button do not match, as I believe the linking function is not going through the loop. I've included a FLA, I need it so that the label goes to the URL specified in the XML. In this case, Google goes to [URL] when clicked, and eBay goes to [URL] when clicked.
If you place a for loop in a recursive function with the function call within the loop... will the loop finnish or does it stop working untill the last recursion?
I have a FLVplayer that has multiple films linking to it. There are also categories of films that can change, without disturbing the previous video from playing. This will be on the 'portfolio' page of my website. I then want to have links on the homepage to play certain videos.How can I set up an HTML link to a SWF on a different HTML page, linking to a certain frame (category) and loading the correct video in the FLVplayer?I have read about flashvars but im not sure if they can load bits inside the swf (ie the video).
I have a variable in a loop that i want to access in a function outside of the loop. However the variable gets deleted when the loop is closed so no longer exists when i call in the function.here is the code; i'm trying to access the variable picHeight from within the scroll function
I am making a character walk. This code will make him wobble to the right and when thats done it will trigger him to wobble to the left and then call the function again to continue the loop.I can get the loop to work fine by calling the function but how do I STOP the function? Also I want to call it later on. Is there a way to start and stop a function?
the project im working on is all database driven, there are no html files and all coding that is created is made by php then stored within a db to be called later on. now because of this i can't use relative links at all with anything i.e. images, videos and swf files.
so.....i am using swfobject to link to a swf file using absolute linking as shown in the coding below. but what i need to do now is link an .as file in my swf using absolute linking so i can call some arrays from the file.i have doubled checked to make sure my vars can be passed by local testing and it works but now i need it as absolute....is this possible?
I have a while loop that I need to shuffle the order of my array. This was initially an AS2 code and am trying to convert this over but have come across with an error I don't understand so hoping someone may know what it means. My while loop code is:
Code: var randomArray = shuffle(orderArray); function shuffle(toShuffle) { // shuffles an array
I looked through the documentation on looping, but I don't understand it. I'm trying to make this function loop, until the user stops it:
function playMusic(evt:MouseEvent):void{ channel.stop(); //to prevent users from starting files multiple times over top of each other - is there a better way to do this? channel = myMusic.play(songPosition); myTimer.start();}
If I want to break out of a function rather than a loop, it's suggested that I use the return; statement. But that doesn't work in the following code, I just want the trace statement to run once...
I am designing and coding a navigation menu at the moment, and so far I have got the button instances to duplicate for each of the menu items, and set widths, positioning values and RollOver/RollOut functions. However, I would ideally like to include the onRelease button functions in the for loop too - as they are all the same apart from the variable "i". Here is the code snippet:
ActionScript Code: for (i=1;i<(_root.noofmenuitems+1);i++){ duplicateMovieClip("mc", "mc"+i, i);
[code]...
Now my problem is that by the time the onRelease function is called, the for loop has been completed and the value of i returned is the last i value from the loop (_root.noofmenuitems+1). The this["mc"+i] part obviously works, because the trace function is called when I click any of the menu items.The problem is that I have 6 menu items, and when I click any of them, the trace function returns "test 7" - not the corresponding i values for each button.
this is a standalone AIR app which runs off of usb media to help people organize their personal information. there is an XML file in a separate folder which stores the name of a file that the user uploads to usb media (into yet another folder), in this case, the person's living will. getting the path to that file as it differs from mac to pc has been a challenge and i feel the only way around this is to give a conditional for the operating system (second function below).
My immediate goal below is to get the name of the file (VALUE) over to the openThisFile function so that "fileName" can be given a value appropriately in the second function code for mac. I can't figure out how to do this...Alternately, is there a way to manipulate "currentTarget.data.toString()"? I was thinking that could also help me... it has the full path to the file, which unfortunately does not work on Macs... for some reason it just can't locate the file (unless I'm missing something).
Quote:
public function handleLoadData(event:Event):void { try { propertyFilePath = path;
I have a script that contains: an array of movieclips -> MaxBallArr another array of movieclips -> MaxBallLrg an array of textfields -> MaxToolTipArr a library movie clip -> max_box
I'm trying to gather them some how in an addEventListener which worked fine in that way:
ok how and where do i put the setInterval script if i want to execute the "animateThumbsToLeft" function for 6 times and inbetween each time have a delay of say half a second..
i need a function that would remove all children of a specified container, except specified exceptions, something like removeall(cont, {cont.mc1, cont.mc2});that removes all children of cont, except the two mcs. if possible i need the number of exceptions to be not too limited.i almost made it, but then, when i needed to add the children back, i got stuck.the function needs to remember (array?) everything it has removed, including the state in which all of it was (alpha, scale, childinxed, etc);even that almost succeeded, but when i used one specific array that i declared outside of the function, if i used it to remove children of somebody else, i couldnt make the array remember both cases to add them later. make an array of arrays?anyway, i am very very much stuck, and would would be very happy to get out.if something like this exists on the web, would love a link. if not, i think such a function (especially integrated with an eventmanager class to make a super as3 nanny) would be a great gift to the as3 people.
This function creates a word inside of a movieclip. The words that it makes are specified in a text document in an array, and I don't know how many there will be. Then I have a do while loop that creates movie clips for these words to go into:
have images play automatically when you don't click on PREV or NEXT buttons in a gallery for a certain amount of time.
I've used the TIMER function, but found that, when I click on PREV or NEXT, the timer would be activated again on that picture, which messes up the entire browsing experience.
I'm creating a sort of psuedo DBMS in flash and I'm having trouble populating my tablesI'm creating input textboxes for each of the input values.My problem is this. The textboxes are being created in a for loop like this..
How would one go about creating a function inside a for loop that does not have a button action attached to it while still having access to the current index number.
This code was found on senocular:
Code: var curr_button; for (var i=1; i<=3; i++){ curr_button = this["button"+i]; curr_button.num = i;
[Code]....
This is all great however i would like the functions to just be regular old functions, not button actions (onPress), is this possible?
Am Creating a game in as2 an object come from left to right Randomly how do i stop the object i written script in single frame but it runs in all frame of the game
_root.onEnterFrame = function() { passed++; if (passed>speed) {
well its not really a loop in the strict programatic sense, but the effect is similar. I have a function attached to a button that uses the onEnterFrame event of an MC to start some action. When I rollout I want the action to stop, similar to using a clearInterval method. I tried using the setInterval method to create the action but the values inside the interval function are only checked at the first call of the setInterval, not after each interval.I'll admit I am far from a programer or any kind of expert in code, so my methodology may be completely whack. I am open to suggestions to better solutions...FYI, here is the code I am using
"256 levels of recursion were exceeded in one action list.This is probably an infinite loop.Further execution of actions has been disabled in this movie."Why do I get this error (above) when I use the code (below)? Why isn't this acceptable? [I use function similar to this in Javascript with no problem.][code]
I want to call a function and pass a different array value each time. bit difficult to explain but see below:
Code: var mnu:ContextMenu = new ContextMenu(); mnu.hideBuiltInItems();[code].......
This just uses the context menu as an example. If you run it & right-click on a, b, or c, you get #a every time.What am I missing?! Why is it always #a? I have also tried using apply() but it gives me the same result.