[Flashcoders] XML Question
I know this is easy, but I'm having trouble finding the answer: if I'm iterating through XML like so: return xml.category.(@name == cat[0]).subcategory.subcategory2.(@name == cat[1]).product.(@prodCode == String(id)); where cat is an array, eg cat = [men,shirts] but what I want to do is search the ENTIRE XML for the first occurrence, in any category/subcategory, of a @prodCode that matches id, how would I do that? eg,I want to do something like return xml.category.*.subcategory.subcategory2.*.product.(@prodCode == String(id)); but that's obviously not the actual code. Does anyone have any suggestions? Thanks! .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] XML Question
You would do xml..product.(@prodCode == id); Yep, that simple. Taka On Thu, Nov 4, 2010 at 11:17 AM, Matt S. mattsp...@gmail.com wrote: I know this is easy, but I'm having trouble finding the answer: if I'm iterating through XML like so: return xml.category.(@name == cat[0]).subcategory.subcategory2.(@name == cat[1]).product.(@prodCode == String(id)); where cat is an array, eg cat = [men,shirts] but what I want to do is search the ENTIRE XML for the first occurrence, in any category/subcategory, of a @prodCode that matches id, how would I do that? eg,I want to do something like return xml.category.*.subcategory.subcategory2.*.product.(@prodCode == String(id)); but that's obviously not the actual code. Does anyone have any suggestions? Thanks! .m ___ 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] XML Question
Yep, I knew it was gonna be something dead-simple ;) . Thanks Taka! .m On Thu, Nov 4, 2010 at 2:27 PM, Taka Kojima t...@gigafied.com wrote: You would do xml..product.(@prodCode == id); Yep, that simple. Taka On Thu, Nov 4, 2010 at 11:17 AM, Matt S. mattsp...@gmail.com wrote: I know this is easy, but I'm having trouble finding the answer: if I'm iterating through XML like so: return xml.category.(@name == cat[0]).subcategory.subcategory2.(@name == cat[1]).product.(@prodCode == String(id)); where cat is an array, eg cat = [men,shirts] but what I want to do is search the ENTIRE XML for the first occurrence, in any category/subcategory, of a @prodCode that matches id, how would I do that? eg,I want to do something like return xml.category.*.subcategory.subcategory2.*.product.(@prodCode == String(id)); but that's obviously not the actual code. Does anyone have any suggestions? Thanks! .m ___ 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] Gaia - TransitionIn
Hi there I'm having some trouble with a site created in Gaia Framework - the index file runs before the preloader has finished. I was told this is not a Gaia issue because transitionIn is not called until after the preloader has finished and to leave frame 1 blank as a first step toward fixing this and do not go to frame 2 and beyond until transitionIn is called. I have tried numerous ways but all without success - by moving the content to frame 2 I get output error: Cannot access a property or method of a null object reference. at com.vanellensheryn::IndexPage$iinit() Below is my index page class file - any help would be greatly appreciated. package com.vanellensheryn { import com.gaiaframework.templates.AbstractPage; import com.gaiaframework.events.*; import com.gaiaframework.debug.*; import com.gaiaframework.api.*; import flash.display.*; import flash.events.*; import flash.net.URLRequest; import flash.net.navigateToURL; import com.greensock.TweenMax; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([AutoAlphaPlugin, TransformMatrixPlugin, TintPlugin, RemoveTintPlugin]); public class IndexPage extends AbstractPage { public var container_mc:MovieClip; public var gel:MovieClip; public var nav_bg:MovieClip; public var btn_mailto:SimpleButton; public var btn_mularam:SimpleButton; public var btn_riba:SimpleButton; public function IndexPage() { super(); alpha = 0; btn_mailto.addEventListener (MouseEvent.CLICK, buttonClickHandler); btn_mailto.addEventListener(MouseEvent.ROLL_OVER, over1); btn_mailto.addEventListener(MouseEvent.ROLL_OUT, out1); btn_mularam.addEventListener (MouseEvent.CLICK, buttonClickHandler2); btn_mularam.addEventListener(MouseEvent.ROLL_OVER, over1); btn_mularam.addEventListener (MouseEvent.ROLL_OUT, out1); btn_riba.addEventListener (MouseEvent.CLICK, buttonClickHandler3); TweenPlugin.activate([ColorTransformPlugin]); function over1(event:MouseEvent):void { TweenMax.to(event.target, 0.75, {colorTransform:{tint:0xFF9900}, ease:Back.easeInOut}); } function out1(event:MouseEvent):void { TweenMax.to(event.target, 0.75, {colorTransform:{tint:0xCC}, ease:Back.easeInOut}); } } private function buttonClickHandler (e:MouseEvent):void { var request:URLRequest = new URLRequest(mailto:i...@vanellensheryn.com;); navigateToURL(request, _self); } private function buttonClickHandler2 (e:MouseEvent):void { var request:URLRequest = new URLRequest(http://www.mularam.com;); navigateToURL(request); } private function buttonClickHandler3 (e:MouseEvent):void { var request:URLRequest = new URLRequest(http://www.architecture.com/TheRIBA/AboutUs/RIBAMembers.aspx;); navigateToURL(request); } override public function transitionIn():void { super.transitionIn(); TweenMax.to(this, 0.3, { alpha:1, onComplete:transitionInComplete } ); } override public function transitionOut():void { super.transitionOut(); TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete}); } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders