Re: [Flashcoders] (no subject)
This works great, but this does not have syntax highlighting, is that another issue in itself? Chris Hill wrote: http://ubergeek.tv/article.php?pid=90 Mike Boutin wrote: I have downloaded XPath implementation for AS2. Where do I extract the *.as files to? There seems to be no documentation on how to install. http://www.xfactorstudio.com/ActionScript/AS2/XPath/ Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Targeting when using for loop
I am trying to target an object inside my scrollpane. This is what im trying to achieve: my_pane.content[product_+i].[color_+j].loadMovie What is the correct way to target a movieclip in this way? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] preload loadvar xml return
I am doing a loadVars call to a php file, that then returns a bunch of xml. Is it possible to show a preloader for this load? var catalog_xml:XML = new XML(); catalog_xml.ignoreWhite = true; catalog_xml.onLoad = function(success:Boolean) { if (success) { } else { } sendAndLoad(catalog.php, catalog_xml); Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] preload loadvar xml return
Thanks! The problem I have seems to be that the flash player locks up for about 1-2 seconds from the time I make the request, to the time I get the xml data back. Is this something Ill just have to live with or is it fixable? JesterXL wrote: Theoretically, yes. Both LoadVars XML both have a getBytesLoaded getBytesTotal. However, in practice, neither took long enough to actually justify the time in creating a preloader for them. I'd be lucky to even get it to show a percentage. Therefore, you're better of just showing a loading progress bar, (ProgressBar.indeterminate = true): - show the progress bar - 1 frame later, load your XML - when the XML arrives, update your progress bar to done - 2 seconds later, kill the progress bar People can argue that for LoadVars XML calls to files larger than 200k, it's work it, but to me, people who think Flash can parse such loads without locking the computer are the types of people who are well aware of what they are doing (parsing data across frames to prevent Flash locking up) and thus already know how to create progress bars. The common use case is not them, however, most are in the less than 100k range. - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, December 01, 2005 7:16 PM Subject: [Flashcoders] preload loadvar xml return I am doing a loadVars call to a php file, that then returns a bunch of xml. Is it possible to show a preloader for this load? var catalog_xml:XML = new XML(); catalog_xml.ignoreWhite = true; catalog_xml.onLoad = function(success:Boolean) { if (success) { } else { } sendAndLoad(catalog.php, catalog_xml); Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] preload loadvar xml return
Perfect, thanks for all your help. Ill see what I can do to cut the size out. If there is whitespace in the xml being sent back, could that affect the parse time? JesterXL wrote: The lock up is the xml.parseXML running. The parseXML function is the bane of all Flash developers, and although many enlightened individuals have posted about various ways of handling it in Flash, the most trusted way is to go straight for the source; the XML it's parsing. If that's not a possibility, modifying the XML structure, then sure, you can parse manually across frames, but I'd rather roll down a hill of razor blades landing in a salt-pit. Therefore, you can use the common XML parsing techniques to expediate the XML parsing: - use Flash 7 or above for XML parsing; Flash Player 6 was the big optimizer, and 7 improved on it yet again. 8 you just get side-help in that code overall is optimized. - use attributes in your XML vs. nodes. // bad node childvalue1/child childvalue2/child node // good node att1=value1 att2=value2 / - make sure if you are utilizing the data, you make references to childNodes and other keyboards like attributes, etc. Those getter/setter properties actually re-parse the XML internally each time your re-access them. There are others, but those are best ones. Again, the reason I mentioned to wait 1 frame is to ensure the stage updates to actually show the preload bar before the XML/LoadVars parseing locks up your display. In a lock, at least a progress bar is showing. As far as lessenign the LoadVars load, well, you can parse it yoursel in onData using the string methods, but you'll still probably run into bottlenecks. Attack the problem at it's source; either get the server to give you smaller chunks of info, easier to parse, or use Remoting where possible. - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, December 01, 2005 7:40 PM Subject: Re: [Flashcoders] preload loadvar xml return Thanks! The problem I have seems to be that the flash player locks up for about 1-2 seconds from the time I make the request, to the time I get the xml data back. Is this something Ill just have to live with or is it fixable? JesterXL wrote: Theoretically, yes. Both LoadVars XML both have a getBytesLoaded getBytesTotal. However, in practice, neither took long enough to actually justify the time in creating a preloader for them. I'd be lucky to even get it to show a percentage. Therefore, you're better of just showing a loading progress bar, (ProgressBar.indeterminate = true): - show the progress bar - 1 frame later, load your XML - when the XML arrives, update your progress bar to done - 2 seconds later, kill the progress bar People can argue that for LoadVars XML calls to files larger than 200k, it's work it, but to me, people who think Flash can parse such loads without locking the computer are the types of people who are well aware of what they are doing (parsing data across frames to prevent Flash locking up) and thus already know how to create progress bars. The common use case is not them, however, most are in the less than 100k range. - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, December 01, 2005 7:16 PM Subject: [Flashcoders] preload loadvar xml return I am doing a loadVars call to a php file, that then returns a bunch of xml. Is it possible to show a preloader for this load? var catalog_xml:XML = new XML(); catalog_xml.ignoreWhite = true; catalog_xml.onLoad = function(success:Boolean) { if (success) { } else { } sendAndLoad(catalog.php, catalog_xml); Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Change object in xpath
productNames = XPath.selectNodes(catalog_xml, /shirtBin/shirt/name/text()); var ttTotal = XPath.selectNodes(catalog_xml,/shirtBin/shirt[price12.00]); Is it possible to say do another XPath query and get back a list of results. Then pass that xml object (ttTotal) through instead of catalog_xml? Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
I have tried using both content (which is read-only) and contentPath (which seems to target a enternal source, or a movieclip in the library with a linkage set). The problem is I am dynamically creating the clips first on the stage, then placing them in the scrollpane, so it does not contain a linkage in the library. Steve Krichten wrote: RTFM :) With the V2 component you use content and contentpath properties, read about those in the docs and you will have your answer. -Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] best place to start building flash 8 components
Yes I have done quite a bit of testing and searching different web sites including all the standard goto sites like actionscript.org / ultrashock.com etc... It seems like I should be able to use scrollpane.contentPath = _root.productHolder; but this doesnt work. Steve Krichten wrote: Flash 8 made no major updates to the components so any tutotials for flash mx 2004 components will be relevant. Ultrashock.com has some prety good ones. -Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
So I should be able to do something like this rather than putting all the clips in a empty_mc first: myScrollpane.attachMovie(productDisplay, product_+i, i, {_x:700, _y:pro_startY}); ? Steve Krichten wrote: Sorry, you can't do that with the V2 component. However I don't see why you want to... The way it works now is you set the contentPath to the linkage ID of a clip in the library, then attach the individual items to scrollPane.content. To me this makes more sense this way than the old way... why build content outside the pane then put it inside? ... instead just build it directly inside the pane from the start. -Steve - I have tried using both content (which is read-only) and contentPath (which seems to target a enternal source, or a movieclip in the library with a linkage set). The problem is I am dynamically creating the clips first on the stage, then placing them in the scrollpane, so it does not contain a linkage in the library. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
Derek Vadneau wrote: _root.productPane.contentPath = productHolder; The contentPath code will do the attachMovie for you. You either have to specify a symbol name from the library or a URL. Derek Vadneau - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 5:10 PM Subject: [Flashcoders] Scrollpane in the arse Hey, This works for me productPane.contentPath = productDisplay where productDisplay is the identifier int he library. But what if I want to attach 12 of that movieclip into the scrollpane rather than just 1? running it in a loop seems to do nothing Im having this problem with the scrollpane component in flash 8. This is my code: _root.attachMovie(empty_mc, productHolder, 1); _root.productPane.setScrollContent( _root.productHolder ); This code works perfectly with the scrollpane from mx. I am trying to accomplish the same thing with the flash 8 component but having no luck. Is this even possible? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
All that does is move the movieclip inside the pane around. I want to Duplicate that movieclip a bunch of times, not move it. This must be possible as it works fine with the old component. var pro_startY:Number = 0; for (i=0;i10;i++){ //Create movieclip object //productPane.attachMovie(productDisplay, product_+i, i, {_x:0, _y:pro_startY}); //pro_startY += 160; } productPane.contentPath = productDisplay only adds 1 movieclip JesterXL wrote: Close! Do what Derek said: myScrollpane.contentPath = productDisplay; myScrollpane.move(700, pro_startY); - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 5:55 PM Subject: Re: [Flashcoders] Scrollpane in the arse So I should be able to do something like this rather than putting all the clips in a empty_mc first: myScrollpane.attachMovie(productDisplay, product_+i, i, {_x:700, _y:pro_startY}); ? Steve Krichten wrote: Sorry, you can't do that with the V2 component. However I don't see why you want to... The way it works now is you set the contentPath to the linkage ID of a clip in the library, then attach the individual items to scrollPane.content. To me this makes more sense this way than the old way... why build content outside the pane then put it inside? ... instead just build it directly inside the pane from the start. -Steve - I have tried using both content (which is read-only) and contentPath (which seems to target a enternal source, or a movieclip in the library with a linkage set). The problem is I am dynamically creating the clips first on the stage, then placing them in the scrollpane, so it does not contain a linkage in the library. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
Thanks for the example, except I need 10 productDisplay clips in 1 scrollpane. JesterXL wrote: Then try: var pro_startY= 0; for(i=0; i10; i++) { var ref:ScrollPane = ScrollPane(attachMovie(ScrollPane, pane + i, i)); ref.move(0, pro_startY); ref.contentPath = productDisplay; pro_startY += 160; } That'll make 10 panes, each with a productDisplay loaded in it. - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 6:06 PM Subject: Re: [Flashcoders] Scrollpane in the arse All that does is move the movieclip inside the pane around. I want to Duplicate that movieclip a bunch of times, not move it. This must be possible as it works fine with the old component. var pro_startY:Number = 0; for (i=0;i10;i++){ //Create movieclip object //productPane.attachMovie(productDisplay, product_+i, i, {_x:0, _y:pro_startY}); //pro_startY += 160; } productPane.contentPath = productDisplay only adds 1 movieclip JesterXL wrote: Close! Do what Derek said: myScrollpane.contentPath = productDisplay; myScrollpane.move(700, pro_startY); - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 5:55 PM Subject: Re: [Flashcoders] Scrollpane in the arse So I should be able to do something like this rather than putting all the clips in a empty_mc first: myScrollpane.attachMovie(productDisplay, product_+i, i, {_x:700, _y:pro_startY}); ? Steve Krichten wrote: Sorry, you can't do that with the V2 component. However I don't see why you want to... The way it works now is you set the contentPath to the linkage ID of a clip in the library, then attach the individual items to scrollPane.content. To me this makes more sense this way than the old way... why build content outside the pane then put it inside? ... instead just build it directly inside the pane from the start. -Steve - I have tried using both content (which is read-only) and contentPath (which seems to target a enternal source, or a movieclip in the library with a linkage set). The problem is I am dynamically creating the clips first on the stage, then placing them in the scrollpane, so it does not contain a linkage in the library. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Scrollpane in the arse
Perfect! thanks it works great! Mike Boutin wrote: Thanks for the example, except I need 10 productDisplay clips in 1 scrollpane. JesterXL wrote: Then try: var pro_startY= 0; for(i=0; i10; i++) { var ref:ScrollPane = ScrollPane(attachMovie(ScrollPane, pane + i, i)); ref.move(0, pro_startY); ref.contentPath = productDisplay; pro_startY += 160; } That'll make 10 panes, each with a productDisplay loaded in it. - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 6:06 PM Subject: Re: [Flashcoders] Scrollpane in the arse All that does is move the movieclip inside the pane around. I want to Duplicate that movieclip a bunch of times, not move it. This must be possible as it works fine with the old component. var pro_startY:Number = 0; for (i=0;i10;i++){ //Create movieclip object //productPane.attachMovie(productDisplay, product_+i, i, {_x:0, _y:pro_startY}); //pro_startY += 160; } productPane.contentPath = productDisplay only adds 1 movieclip JesterXL wrote: Close! Do what Derek said: myScrollpane.contentPath = productDisplay; myScrollpane.move(700, pro_startY); - Original Message - From: Mike Boutin [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 30, 2005 5:55 PM Subject: Re: [Flashcoders] Scrollpane in the arse So I should be able to do something like this rather than putting all the clips in a empty_mc first: myScrollpane.attachMovie(productDisplay, product_+i, i, {_x:700, _y:pro_startY}); ? Steve Krichten wrote: Sorry, you can't do that with the V2 component. However I don't see why you want to... The way it works now is you set the contentPath to the linkage ID of a clip in the library, then attach the individual items to scrollPane.content. To me this makes more sense this way than the old way... why build content outside the pane then put it inside? ... instead just build it directly inside the pane from the start. -Steve - I have tried using both content (which is read-only) and contentPath (which seems to target a enternal source, or a movieclip in the library with a linkage set). The problem is I am dynamically creating the clips first on the stage, then placing them in the scrollpane, so it does not contain a linkage in the library. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders