ActionScript 2.0 :: Looping Through A ChildNode Of A ChildNode?
Jan 26, 2008
I've been working on a flash presentation for work. It's pretty much a mini-site with links to PDF's files and DOCS for distributors. I am feeding everything from an XML file so we can easily update this presentation for our other products.
I've run into a problem on the last part of this swf and I can't seem to get the proper syntax to get this working properly. I am looping through the childNodes and creating MC and filling with data. I can loop through the first set of childNodes no problem. But its when one of these first set childNodes has a set of childNodes itself, I cant pair up that data with it's parent on the flash movie.
I'm trying to work with XML in flash here and ran into an issue. I need to collect all the nodes in an XMLList that contains a certain childnode with a certain value. For example, from the XML below I just want to get the ''product'' nodes that have 1 as a value for ''amount'', i.e product 3 and 5.
I've horizental images scroller added on my website using xml and actionscript 2.0. All images loaded perfectly and the scrolling function works great too but the main problem is that in actionscript all the links are in external flash however i want to use all links in internal flash using actionscript on all those images so that i can get the flash popup window from there on.I'm not able to find a method to link those images in actionscript to use flash functions. Below is my actionscript code and xml code.[code]
I have an upload application to do and I am using xml and php to do that. The problem is that I have to remove physically childNodes from that xml when I press a delete button.I have to do that because I am using that same xml in a secondary application that is showing the data.
Ok, I have this extremely simple XML displaying movie I made using the Display XML in Flash tutorial, and now I want to know what to do so that I can click on a button and make the whole data change to the next ChildNode. For example,
im trying to write a handfull of XML functions in AS2.0 and im trying to find a way of getting flash to detect the number of attributes in a childNode. <item name="aaron" location="sydney" sex="male"/> as in finding out how many of these ^ there are in each item.
how I would do this? I've tried for...in... statements and even trying to access them as objects i.e. ...ode[0].attributes["name"] but it never works - I always have to hard code...ode[0].attributes.name to get the value. im sure theres a way to do this, there has to be a way.
im working on a flash file where im loading a title, description and image from an xml file.
im using this tutorial from Kirupa [URL] and have everything working fine. my only problem is I can't seem to figure out how to load a specific childnode when clicking a button. right now when the user clicks a button, it loads the next or previous childnode using this code
im trying to write a handfull of XML functions in AS2.0and im trying to find a way of getting flash to detectthe number of attributes in a childNode.<item name="aaron" location="sydney" sex="male"/>as in finding out how many of these ^ there are in each itemas to how I would do this? I've tried for...in... statementsand even trying to access them as objects i.e. ...ode[0].attributes["name"]but it never works - I always have to hard code...ode[0].attributes.name
I have seven movieclips that I want to load individual ChildNode information into from an XML file. Is there a way to pass that XML info into individual MovieClips for each individaul ChildNode?
Here's the code I have so far.
var myXML:XML; var myLoader:URLLoader = new URLLoader();myLoader.load(new URLRequest("links.xml"));myLoader.addEventListener(Event.COMPLETE, processXML);function processXML(e:Event):void {myXML = new XML(e.target.data);trace(myXML.*);}
The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?
I am fairly new to Flash and I am constructing a website. The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?
I'm a newbie at Flash...and have a main movie that I would like to load external movies into..for ease of modification of the different areas vice having one large swf.I'm using the loadMovieNum command to load the external swf's just fine. When I play the external swf's by themselves...they play once and stop. When they are loaded into the main movie...they loop.I've placed a "stop();" command at both the frame in the main movie...and also on the line directly after the loadMovideNum line.
I have many movieclips on stage, let's say 100.Rather than setting onRelease or OnPress function for each one, is there any way of looping through all the movie clips (maybe if they were called MC1 MC2 MC3 MC4 etc etc), using an array, to see which one was pressed and then say what should happen if so and so MC was pressed.
Depending on which MC is pressed a variable will be a different number... e.g. MC1 pressed means variableA = 1, MC1 pressed means variableA = 2, MC1 pressed means variableA = 3 etc
I just thought there would be a more intelligent solution than writing out this 100's of times: MC[numberOfMC].onPress = function() { do something };
I made a basic slideshow it's not interactive it just loops, each time it loops the preloader loops with it so you see it each time. How would I get rid of that preloader looping?
I am adding an 6 minute audio to a flash website and want it to loop. It is a 6,000 kb size file .mp3 audio stream and audio event are set the same at, bit rate of 16kbps mono and a 60 second play time, however it loops after abt 17 seconds. I have set the sync to stream and loop. Code is simply Play(); The timeline is set to 405 frames at 24 fps. I have tested the original and it is fine and plays well when not in flash.
I have four flv videos (video1.flv, video2.flv,video3.flv and video4.flv) and I want to play them one after the other.When video4.flv is finished I need the movie to start playing video1.flv again and the rest after it, an endless loop.I'm using CS3 ,AS2 and Flash Player 9
I've mc contain some animation which is all workin via actionscript. What I want to do is once the animation is complete.......i want a delay of about 10 secs & then I want it to start all over again, so its just a looping animation.
I have a sliding menu with buttons - each button calls an external swf - which plays in an empty movie clip.Now, I want the current loaded swf to loop till the time the user clicks on another button. The problem is, I do not have the fla files for any of the external swfs (these are screencam recordings using a software that does not publish .fla) - so I can't put a code at the end of each external swf asking it to not stop.
I am fairly new to AC and have some questions about a project. I am creating a gallery with images tweening from one to the other. I have the animation working but it will not loop as expected.
1) The images are loaded dynamically via the below code.
2) The main stage uses stop(); and all mc's except the gallery mc will loop as expected.[code]...
I have (what should be) a really simple little piece of code inside a moviclip, trying to get it to fade in and out in a loop. Here's the code (within the movieclip):
I am used to working in Flash MX but now have CS4. You use to be able to just drop an mp3 file onto a layer and it would loop continously now it's not doing that.I need help in a big way to loop this mp3 file in CS4.
I have created a looping movie clip which I want playing in the background of my main movie which has multiple scenes. Obviously I cant drop it on the timeline in each scene as then when it skips scenes the movie reloads and there is a jerk on the screen. Is there a piece of actionscript that I can point to my SWF and just have it looping throughout the whole movie?
Im having trouble getting my head around writing script for looping certain layers of a fla file.I have a project that I urgently need to finish and can't figure out how to achieve what I need.I have an fla file that has several animated layers.I want layer 1 to play once and stop while continuing to be visible (which I have achieved).I then need to play layer 2, layer 3 and layer 4, and loop these layers continuosly without relooping layer 1.
I'm trying to loop a Flash Banner ad. I added the code to the first and last frames on a separate action layer on the main timeline, but it's not working.
I'm using actionscript 2.0/CS4.
I have a stop action on the last frame of the last text movieclip that plays. And it seems to get hung up here. When I remove the stop action it just loops that movieclip and not the whole animation.
This is the code I'm using in the first frame of the main timeline.
> var counter:Number = 0
And this is the code I'm using in the last frame of the main timeline:
> // if its being used on the last frame use a stop(); action on the top line > if (counter < 3) { >counter++ > gotoAndPlay(1) > }
What I have is a sliding menu with buttons - each button calls an external swf - which plays in an empty movie clip. Now, I want the current loaded swf to loop till the time the user clicks on another button. The problem is, I do not have the fla files for any of the external swfs (these are screencam recordings using a software that does not publish .fla) - so I can't put a code at the end of each external swf asking it to not stop.
I'm brand new to flash so cut me a little slack. I'm in the middle of building a website in Flash CS4 in Action Script 3.0 and (according my the tutorial I'm using) I need to access the "parameters" panel. The problem is I don't see it anywhere. I see "properties" and "filters" but to parameters. I've cycled through all the workspace presets but with no luck. How can I bring it up?? Also, even though I used the "stop();" code in the beginning of my actions frame my movie just keeps looping when I test it.