RE: [Flashcoders] add string to a function

2009-08-28 Thread thomas horner
thanks for the first answer, works a treat, i'm not really sure what other
stuff is though!

thanks, 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Hans Wichman
Sent: 28 August 2009 10:35
To: Flash Coders List
Subject: Re: [Flashcoders] add string to a function

ps a better option might be a parameter and a switchstatement

On Fri, Aug 28, 2009 at 11:20 AM, thomas horner
tho...@megawattmedia.co.ukwrote:

 this is possibly a very basic problem,   I'm still building my dynamic
 global sub nav, slooowly.



 what I want to know if can I add a string to a function,



 I have my initial first level navigation, I click a button and then if the
 button has children in that section it says true and then brings up the
 corresponding children to populate that subnav,



 I was going to have 3 separate functions for the subnavs







 what I'm unsure about is the line:  'createSubNav +page();



 ///I wanted to then have the following functions createSubNavHis
 createSubNavHerscreateSubNavTheirs



 //is this possible?



 //here is my code on the first level buttons///





 function mouseClickHandler(e:Event):void {



//var siteNav:XML =
 IXml(assets.siteNav).xml;

var
 page:String=e.target.label.text;

trace(page);

targetPage=e.target.linkTo;



//targetPage =
 e.target.linkTo;









if
 (e.target.kiddies.children().length()0) {


 hasChildren=true;


 TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut});


 trace(e.target.kiddies.children());


createSubNav
 + page() ;








 trace(hasChildren);

} else {


 hasChildren=false;


 trace(hasChildren);


 Gaia.api.goto( + [targetPage] + );



}

}





 ___
 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] add string to a function

2009-08-28 Thread Hans Wichman
Hi,

you are looking for:
this[createSubNav+page]();
HTH
JC


On Fri, Aug 28, 2009 at 11:20 AM, thomas horner
tho...@megawattmedia.co.ukwrote:

 this is possibly a very basic problem,   I'm still building my dynamic
 global sub nav, slooowly.



 what I want to know if can I add a string to a function,



 I have my initial first level navigation, I click a button and then if the
 button has children in that section it says true and then brings up the
 corresponding children to populate that subnav,



 I was going to have 3 separate functions for the subnavs







 what I'm unsure about is the line:  'createSubNav +page();



 ///I wanted to then have the following functions createSubNavHis
 createSubNavHerscreateSubNavTheirs



 //is this possible?



 //here is my code on the first level buttons///





 function mouseClickHandler(e:Event):void {



//var siteNav:XML =
 IXml(assets.siteNav).xml;

var
 page:String=e.target.label.text;

trace(page);

targetPage=e.target.linkTo;



//targetPage =
 e.target.linkTo;









if
 (e.target.kiddies.children().length()0) {


 hasChildren=true;


 TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut});


 trace(e.target.kiddies.children());

createSubNav
 + page() ;








 trace(hasChildren);

} else {


 hasChildren=false;


 trace(hasChildren);


 Gaia.api.goto( + [targetPage] + );



}

}





 ___
 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] add string to a function

2009-08-28 Thread Hans Wichman
ps a better option might be a parameter and a switchstatement

On Fri, Aug 28, 2009 at 11:20 AM, thomas horner
tho...@megawattmedia.co.ukwrote:

 this is possibly a very basic problem,   I'm still building my dynamic
 global sub nav, slooowly.



 what I want to know if can I add a string to a function,



 I have my initial first level navigation, I click a button and then if the
 button has children in that section it says true and then brings up the
 corresponding children to populate that subnav,



 I was going to have 3 separate functions for the subnavs







 what I'm unsure about is the line:  'createSubNav +page();



 ///I wanted to then have the following functions createSubNavHis
 createSubNavHerscreateSubNavTheirs



 //is this possible?



 //here is my code on the first level buttons///





 function mouseClickHandler(e:Event):void {



//var siteNav:XML =
 IXml(assets.siteNav).xml;

var
 page:String=e.target.label.text;

trace(page);

targetPage=e.target.linkTo;



//targetPage =
 e.target.linkTo;









if
 (e.target.kiddies.children().length()0) {


 hasChildren=true;


 TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut});


 trace(e.target.kiddies.children());

createSubNav
 + page() ;








 trace(hasChildren);

} else {


 hasChildren=false;


 trace(hasChildren);


 Gaia.api.goto( + [targetPage] + );



}

}





 ___
 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] add string to a function

2009-08-28 Thread thomas horner
ok my menu goes on almost there now... 

i have now launched the a function from my inital menu level to create the
sub nav for that page as per earlier help;

im basically using the same code for creating my inital menu, but i want to
only create buttons for the children of the button i've just clicked on,

i suppose i need the function 'createSubNavtheirs' to reference the
'mouseClickHandler' and only create menu items from the child node of the
button that has been clicked. 

//here is one of the functions for a subbutton///

function createSubNavtheirs():void {

siteNav=IXml(assets.siteNav).xml;

/*var xmlLabels:xmllist=sitenav.secti...@name;
var labelsArray:Array /* of String */
/* = new Array(xmlLabels.length);*/

var runningX:Number=0;

for each (var section:XML in
siteNav.section.subsection) {

var navbut:navItem = new navItem( );

navbut.label.text=secti...@name;

navbut.label.autoSize=TextFieldAutoSize.LEFT;
navbut.hit.width=navbut.label.width;
navbut.hit.height=30;
navbut.hit.alpha=0;

navbut.kiddies=section;

navbut.linkto=secti...@src;

//read instructions fomr nav xml
navbut.keepopen=sitenav.secti...@keep;
navbut.isclicked=sitenav.secti...@highlight;
//trace(section);
navbut.x=runningX;
runningX+=navbut.width+10;

trace(runningX);
navbut.buttonMode=true;
navbut.mouseChildren=false;
navbut.alpha=0;
navbut.name=sitenav.secti...@url;
TweenMax.to(navbut, 0.5, {alpha:1});




//navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler2);

//navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
//navbut.addEventListener(MouseEvent.CLICK,
mouseClickHandler);

nav2.addChild(navbut);

}

}


//here is the code on my initial subbutton//



function mouseClickHandler(e:Event):void {

//var siteNav:XML = IXml(assets.siteNav).xml;
var page:String=e.target.label.text;
trace(page);
targetPage=e.target.linkTo;

//targetPage = e.target.linkTo;




if (e.target.kiddies.children().length()0) {
hasChildren=true;
TweenMax.to(nav1, 0.25, {x:-200,
ease:Bounce.easeInOut});
trace(e.target.kiddies.children());
this[createSubNav+page]();
//trace(page);
trace(targetPage);


trace(hasChildren);
} else {
hasChildren=false;
trace(hasChildren);
Gaia.api.goto( + [targetPage] + );

}
}


///and here is my xml///

site 
section name=about src=index/nav/about keep=false/
section name=hers src=index/nav/hers keep=false 
subsection name=small src=index/nav/hers/smalltheirs
keep=true /
subsection name=medium src=index/nav/hers/mediumtheirs
keep=true /  
subsection name=large src=index/nav/hers/largetheirs
keep=true /
/section
section name=his src=index/nav/his keep=false   
subsection name=small src=index/nav/his/smalltheirs keep=true
/
subsection name=medium src=index/nav/his/mediumtheirs
keep=true /
subsection name=large src=index/nav/his/largetheirs keep=true
/
/section 
section name=theirs src=index/nav/theirs keep=false 
subsection name=small src=index/nav/theirs/smalltheirs
keep=true /
subsection name=medium src=index/nav/theirs/mediumtheirs
keep=true /
subsection name=large src=index/nav/theirs/largetheirs
keep=true /
/section
section name=contact src=index/nav/contact keep=true /
/site


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of thomas
horner
Sent: 28 August 2009 

[Flashcoders] just target children of particular node

2009-08-28 Thread thomas horner
ok in the following xml how would i create a loop just from the children of
his

 

for each (var section:XML in siteNav.section.subsection) {

 

 

site 

section name=about src=index/nav/about keep=false/

section name=hers src=index/nav/hers keep=false 

subsection name=small
src=index/nav/hers/smalltheirs keep=true /

subsection name=medium
src=index/nav/hers/mediumtheirs keep=true /   

subsection name=large
src=index/nav/hers/largetheirs keep=true /

/section

section name=his src=index/nav/his keep=false 


subsection name=small src=index/nav/his/smalltheirs
keep=true /

subsection name=medium src=index/nav/his/mediumtheirs
keep=true /

subsection name=large src=index/nav/his/largetheirs
keep=true /

/section 

section name=theirs src=index/nav/theirs keep=false 

subsection name=small src=index/nav/theirs/smalltheirs
keep=true /

subsection name=medium
src=index/nav/theirs/mediumtheirs keep=true /

subsection name=large src=index/nav/theirs/largetheirs
keep=true /

/section

section name=contact src=index/nav/contact keep=true
/

/site



 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] just target children of particular node

2009-08-28 Thread thomas horner
sorry worked it out - was easy and obvious - doh!

for each (var section:XML in siteNav.section[3].subsection) {




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of thomas
horner
Sent: 28 August 2009 12:06
To: Flashcoders@chattyfig.figleaf.com


Subject: [Flashcoders] just target children of particular node

ok in the following xml how would i create a loop just from the children of
his

 

for each (var section:XML in siteNav.section.subsection) {

 

 

site 

section name=about src=index/nav/about keep=false/

section name=hers src=index/nav/hers keep=false 

subsection name=small
src=index/nav/hers/smalltheirs keep=true /

subsection name=medium
src=index/nav/hers/mediumtheirs keep=true /   

subsection name=large
src=index/nav/hers/largetheirs keep=true /

/section

section name=his src=index/nav/his keep=false 


subsection name=small src=index/nav/his/smalltheirs
keep=true /

subsection name=medium src=index/nav/his/mediumtheirs
keep=true /

subsection name=large src=index/nav/his/largetheirs
keep=true /

/section 

section name=theirs src=index/nav/theirs keep=false 

subsection name=small src=index/nav/theirs/smalltheirs
keep=true /

subsection name=medium
src=index/nav/theirs/mediumtheirs keep=true /

subsection name=large src=index/nav/theirs/largetheirs
keep=true /

/section

section name=contact src=index/nav/contact keep=true
/

/site



 

___
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] Re: a function tells to move to a frame and then update content in that frame

2009-08-28 Thread Isaac Alves
oops the code down there should be:

function updateContent(e:Event):void {

   container.gotoAndStop(2);

   link = String(e.target.frameLink);
   counter = 0;

   if (content[link].tit != undefined)
   {
   container._tit.text = content[link].tit;
   counter ++;
   }
   else
   {
   container._tit.text = ;
   }
etc...

2009/8/28 Isaac Alves isaacal...@gmail.com:
 Hello!

 In the following code, i tell the Flash runtime to go to frame2 and
 update the content of this frame.

 The problem is that, the first time this function runs it throws the error:

 TypeError: Error #1009:

 I believe that happens because it tries to update container._tit
 before render the screen, so it will be still in frame 1. It goes to
 frame 2 but doesn't update the _tit textfield.

 I've tried to solve it this way: instead of using gotoAndStop(2) i've
 called another functiion with that statement and updateAfterEvent();

 but it seems that it is not a method of the Event class.

 Any solution ??
 thanks in advance!!



 function updateContent(e:Event):void {

        gotoAndStop(2);

        link = String(e.target.frameLink);
        counter = 0;

        if (content[link].tit != undefined)
        {
                container._tit.text = content[link].tit;
                counter ++;
        }
        else
        {
                container._tit.text = ;
        }
 etc...


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] a function tells to move to a frame and then update content in that frame

2009-08-28 Thread Isaac Alves
Hello!

In the following code, i tell the Flash runtime to go to frame2 and
update the content of this frame.

The problem is that, the first time this function runs it throws the error:

TypeError: Error #1009:

I believe that happens because it tries to update container._tit
before render the screen, so it will be still in frame 1. It goes to
frame 2 but doesn't update the _tit textfield.

I've tried to solve it this way: instead of using gotoAndStop(2) i've
called another functiion with that statement and updateAfterEvent();

but it seems that it is not a method of the Event class.

Any solution ??
thanks in advance!!



function updateContent(e:Event):void {

gotoAndStop(2);

link = String(e.target.frameLink);
counter = 0;

if (content[link].tit != undefined)
{
container._tit.text = content[link].tit;
counter ++;
}
else
{
container._tit.text = ;
}
etc...
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] add string to a function

2009-08-28 Thread thomas horner
this is possibly a very basic problem,   I'm still building my dynamic
global sub nav, slooowly. 

 

what I want to know if can I add a string to a function, 

 

I have my initial first level navigation, I click a button and then if the
button has children in that section it says true and then brings up the
corresponding children to populate that subnav,

 

I was going to have 3 separate functions for the subnavs 

 

 

 

what I'm unsure about is the line:  'createSubNav +page(); 

 

///I wanted to then have the following functions createSubNavHis
createSubNavHerscreateSubNavTheirs   

 

//is this possible?

 

//here is my code on the first level buttons///

 

 

function mouseClickHandler(e:Event):void {

 

//var siteNav:XML =
IXml(assets.siteNav).xml;

var
page:String=e.target.label.text;

trace(page);

targetPage=e.target.linkTo;

 

//targetPage =
e.target.linkTo;









if
(e.target.kiddies.children().length()0) {

 
hasChildren=true;

 
TweenMax.to(nav1, 0.25, {x:-200, ease:Bounce.easeInOut});

 
trace(e.target.kiddies.children());

createSubNav
+ page() ;



 

 

 
trace(hasChildren);

} else {

 
hasChildren=false;

 
trace(hasChildren);

 
Gaia.api.goto( + [targetPage] + );

 

}

}

 

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ::::Html Text inline Image Problem

2009-08-28 Thread artur

i need to add an graphical end qoute to a line of text.

but the image keeps breaking over into a new line.

is there a clever workaround?

i have a nasty deadline!

thanks



--

*artur :.*

- *www.artur.com*
- *ar...@artur.com*
- *ph:646.797.3320*

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] a function tells to move to a frame and then updatecontent in that frame

2009-08-28 Thread Merrill, Jason
 but doesn't update the _tit textfield.

Wait, hold the phone, what kind of site are you building?


Jason Merrill 

Bank of  America   Global Learning 
Learning  Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] :::Html Text inline Image SOLVED

2009-08-28 Thread artur
from my wise colleague Ben Fhala, 


basically this is the only way:

we need to find the last char of the sentence, in this case a period
and attach an image.

var mcQuote = new lmcQuote();

isWhite = false; //hack

var box:Object = txt.getCharBoundaries(txt.text.lastIndexOf(.)+2);

mcQuote.buttonMode=false;

mcQuote.mouseChildren=false;

mcQuote.x = txt.x + box.x + box.width/2+ 4;

mcQuote.y = txt.y + box.y + box.height/2 -1;
/


/thanks BEN!
*

*


artur wrote:

i need to add an graphical end qoute to a line of text.

but the image keeps breaking over into a new line.

is there a clever workaround?

i have a nasty deadline!

thanks




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: a function tells to move to a frame and then update content in that frame

2009-08-28 Thread Isaac Alves
HEy Jason, don't worry, that's not a porno web site.

tit is for title ..:D

if that's not the answer you were expecting,  it is not a website, it
is a powerpoint-like-presentation to be run off-line, with a whole
bunch of an endless content (that is, a terrible nightmare), that i
have to pick from .doc files.

so everything is in an xml file, and this function puts the content of
a specific element in the content.xml file and organizes it all on the
display list.

that was the only way i found to do this kind of job, otherwise (if i
put content directly into the .fla file)  the flash application gets
extremelly lagged and thus impossible to work, which was making me
completely insane .

so... that's i'mtrying to build this function that tells a certain
moviecli'p to go to a specific frame and then update content in that
frame, like searching text in an xml file and putting in the textfield
on that frame.

i'll have to do that because this updateContent function won't fit in
some specific frames of the presentation

thanks!


2009/8/28 Isaac Alves isaacal...@gmail.com:
 oops the code down there should be:

 function updateContent(e:Event):void {

       container.gotoAndStop(2);

       link = String(e.target.frameLink);
       counter = 0;

       if (content[link].tit != undefined)
       {
               container._tit.text = content[link].tit;
               counter ++;
       }
       else
       {
               container._tit.text = ;
       }
 etc...

 2009/8/28 Isaac Alves isaacal...@gmail.com:
 Hello!

 In the following code, i tell the Flash runtime to go to frame2 and
 update the content of this frame.

 The problem is that, the first time this function runs it throws the error:

 TypeError: Error #1009:

 I believe that happens because it tries to update container._tit
 before render the screen, so it will be still in frame 1. It goes to
 frame 2 but doesn't update the _tit textfield.

 I've tried to solve it this way: instead of using gotoAndStop(2) i've
 called another functiion with that statement and updateAfterEvent();

 but it seems that it is not a method of the Event class.

 Any solution ??
 thanks in advance!!



 function updateContent(e:Event):void {

        gotoAndStop(2);

        link = String(e.target.frameLink);
        counter = 0;

        if (content[link].tit != undefined)
        {
                container._tit.text = content[link].tit;
                counter ++;
        }
        else
        {
                container._tit.text = ;
        }
 etc...



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Re: a function tells to move to a frame and then update content in that frame

2009-08-28 Thread Merrill, Jason
I answered you yesterday, did you not see my post?


Jason Merrill 

Bank of  America   Global Learning 
Learning  Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


FW: [Flashcoders] help with frame navigation and xml

2009-08-28 Thread Merrill, Jason
 Howdy Jason,
Didn't see a reply from you come through. Just you query (tit)... ;),
then
the email that said you answered it before. Nothing in between them.

That happens to me on this list sometimes, but only this list.  Seems
this list only accepts pure text formatted e-mails and if you forget
that and send in another format, it rejects your messages silently.
Sorry about that.

Isaac, here was my reply to your question yesterday from the thread,
help with frame navigation and xml:

You don't need any code inside the clip, I think you're approaching this
the wrong way around.  Why have the XML node based on the frame's label?
You already know it's going to intro since you have to tell the
MovieClip to go there. Do something like this instead:

var destination:String = intro;
myClip.gotoAndPlay(destination);
myClip.myTextField.text = myXML.myNode.(@destination);

Or could be this if your text is in the text node:

var destination:String = intro;
myClip.gotoAndPlay(destination);
myClip.myTextField.text = myXML.myNode.(@destination).text();

Hope that helps,


Jason Merrill 

Bank of  America   Global Learning 
Learning  Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] help with frame navigation and xml

2009-08-28 Thread Merrill, Jason
But what's weird is it did show up for me on the list - just not you
two


Jason Merrill 

Bank of  America   Global Learning 
Learning  Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: accessing a text node inside another node in a XMLList

2009-08-28 Thread Isaac Alves
I´ve realized actually that flash recognizes the XMLList as having 9
children, ignoring the tags slide

when I was expecting three children , each one of them with also 3
children ( the tags item).

Why?

2009/8/28 Isaac Alves isaacal...@gmail.com:
 Hello list,

 I have the following XML ( i get that by tracing
 tabsContentSlideshow which is a XMLList.
 I-d like to use something like

 tabsContentSlideshow[slide][1]

 slide is an integer, so for example, if the slide 2 is showing, this
 statement would return the first node item inside the second node
 slide, that is:

  item label=ss1_title link=# type=_selfSLIDE 2/item

 but it doesn´t work like that.
 how could I do it ??

 thanks in advance !


 slide
  item label=ss1_title link=# type=_selfCONECTE-SE/item
  item label=ss1_subtitleBem-vindo ao Conecte-se!/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 2/item
  item label=ss1_subtitleBem-vindo ao slide 2/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 3/item
  item label=ss1_subtitleBem-vindo ao slide 3/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] accessing a text node inside another node in a XMLList

2009-08-28 Thread Isaac Alves
Hello list,

I have the following XML ( i get that by tracing
tabsContentSlideshow which is a XMLList.
I-d like to use something like

tabsContentSlideshow[slide][1]

slide is an integer, so for example, if the slide 2 is showing, this
statement would return the first node item inside the second node
slide, that is:

  item label=ss1_title link=# type=_selfSLIDE 2/item

but it doesn´t work like that.
how could I do it ??

thanks in advance !


slide
  item label=ss1_title link=# type=_selfCONECTE-SE/item
  item label=ss1_subtitleBem-vindo ao Conecte-se!/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
células, que se reúnem semanalmente. Nós oramos e desejamos que você
desenvolva bons relacionamentos, um propósito, envolvimento e encontre
alegria. Vamos servir ao Senhor juntos!/item
/slide
slide
  item label=ss1_title link=# type=_selfSLIDE 2/item
  item label=ss1_subtitleBem-vindo ao slide 2/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
células, que se reúnem semanalmente. Nós oramos e desejamos que você
desenvolva bons relacionamentos, um propósito, envolvimento e encontre
alegria. Vamos servir ao Senhor juntos!/item
/slide
slide
  item label=ss1_title link=# type=_selfSLIDE 3/item
  item label=ss1_subtitleBem-vindo ao slide 3/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
células, que se reúnem semanalmente. Nós oramos e desejamos que você
desenvolva bons relacionamentos, um propósito, envolvimento e encontre
alegria. Vamos servir ao Senhor juntos!/item
/slide

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] accessing a text node inside another node in a XMLList

2009-08-28 Thread Taka Kojima
tabsContentSlideshow.children()[slide].children()[1]

2009/8/28 Isaac Alves isaacal...@gmail.com

 Hello list,

 I have the following XML ( i get that by tracing
 tabsContentSlideshow which is a XMLList.
 I-d like to use something like

 tabsContentSlideshow[slide][1]

 slide is an integer, so for example, if the slide 2 is showing, this
 statement would return the first node item inside the second node
 slide, that is:

  item label=ss1_title link=# type=_selfSLIDE 2/item

 but it doesn´t work like that.
 how could I do it ??

 thanks in advance !


 slide
  item label=ss1_title link=# type=_selfCONECTE-SE/item
  item label=ss1_subtitleBem-vindo ao Conecte-se!/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 2/item
  item label=ss1_subtitleBem-vindo ao slide 2/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 3/item
  item label=ss1_subtitleBem-vindo ao slide 3/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide

 ___
 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] Re: accessing a text node inside another node in a XMLList

2009-08-28 Thread Taka Kojima
First off, XML can only have one root node, thus you're probably getting
some weird errors.

If you enclose all of your xml within slides/slides, you should be fine.

- Taka

On Fri, Aug 28, 2009 at 11:53 AM, Isaac Alves isaacal...@gmail.com wrote:

 I´ve realized actually that flash recognizes the XMLList as having 9
 children, ignoring the tags slide

 when I was expecting three children , each one of them with also 3
 children ( the tags item).

 Why?

 2009/8/28 Isaac Alves isaacal...@gmail.com:
  Hello list,
 
  I have the following XML ( i get that by tracing
  tabsContentSlideshow which is a XMLList.
  I-d like to use something like
 
  tabsContentSlideshow[slide][1]
 
  slide is an integer, so for example, if the slide 2 is showing, this
  statement would return the first node item inside the second node
  slide, that is:
 
   item label=ss1_title link=# type=_selfSLIDE 2/item
 
  but it doesn´t work like that.
  how could I do it ??
 
  thanks in advance !
 
 
  slide
   item label=ss1_title link=# type=_selfCONECTE-SE/item
   item label=ss1_subtitleBem-vindo ao Conecte-se!/item
   item label=ss1_textAqui você encontra vida! Grupos pequenos,
  células, que se reúnem semanalmente. Nós oramos e desejamos que você
  desenvolva bons relacionamentos, um propósito, envolvimento e encontre
  alegria. Vamos servir ao Senhor juntos!/item
  /slide
  slide
   item label=ss1_title link=# type=_selfSLIDE 2/item
   item label=ss1_subtitleBem-vindo ao slide 2/item
   item label=ss1_textAqui você encontra vida! Grupos pequenos,
  células, que se reúnem semanalmente. Nós oramos e desejamos que você
  desenvolva bons relacionamentos, um propósito, envolvimento e encontre
  alegria. Vamos servir ao Senhor juntos!/item
  /slide
  slide
   item label=ss1_title link=# type=_selfSLIDE 3/item
   item label=ss1_subtitleBem-vindo ao slide 3/item
   item label=ss1_textAqui você encontra vida! Grupos pequenos,
  células, que se reúnem semanalmente. Nós oramos e desejamos que você
  desenvolva bons relacionamentos, um propósito, envolvimento e encontre
  alegria. Vamos servir ao Senhor juntos!/item
  /slide
 

 ___
 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] Re: accessing a text node inside another node in a XMLList

2009-08-28 Thread Isaac Alves
Ok I´ve realized now something.

I had before in the script:
tabsContentSlideshow = myXML.slideshow.children();

I´ve replaced with:
tabsContentSlideshow = myXML.slideshow;

Then if i trace  tabsContentSlideshow.children()[0]  it will show :

slide
  item label=ss1_title link=# type=_selfCONECTE-SE/item
  item label=ss1_subtitleBem-vindo ao Conecte-se!/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
células, que se reúnem semanalmente. Nós oramos e desejamos que você
desenvolva bons relacionamentos, um propósito, envolvimento e encontre
alegria. Vamos servir ao Senhor juntos!/item
/slide

alright. now how can I retrieve the text that´s inside the tag item ??

ok i-ve just discovered:

trace (dfdf:  + tabsContentSlideshow.children()[0].item[1]);

:D

thank you people



2009/8/28 Isaac Alves isaacal...@gmail.com:
 I´ve realized actually that flash recognizes the XMLList as having 9
 children, ignoring the tags slide

 when I was expecting three children , each one of them with also 3
 children ( the tags item).

 Why?

 2009/8/28 Isaac Alves isaacal...@gmail.com:
 Hello list,

 I have the following XML ( i get that by tracing
 tabsContentSlideshow which is a XMLList.
 I-d like to use something like

 tabsContentSlideshow[slide][1]

 slide is an integer, so for example, if the slide 2 is showing, this
 statement would return the first node item inside the second node
 slide, that is:

  item label=ss1_title link=# type=_selfSLIDE 2/item

 but it doesn´t work like that.
 how could I do it ??

 thanks in advance !


 slide
  item label=ss1_title link=# type=_selfCONECTE-SE/item
  item label=ss1_subtitleBem-vindo ao Conecte-se!/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 2/item
  item label=ss1_subtitleBem-vindo ao slide 2/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide
 slide
  item label=ss1_title link=# type=_selfSLIDE 3/item
  item label=ss1_subtitleBem-vindo ao slide 3/item
  item label=ss1_textAqui você encontra vida! Grupos pequenos,
 células, que se reúnem semanalmente. Nós oramos e desejamos que você
 desenvolva bons relacionamentos, um propósito, envolvimento e encontre
 alegria. Vamos servir ao Senhor juntos!/item
 /slide



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] a function tells to move to a frame and then update content in that frame

2009-08-28 Thread Keith Reinfeld
Isaac, 

I wanted to show you, and anyone interested, that your idea of frame label
navigation in conjunction with XML is doable. 

To use this example just start a fresh fla, build out the fla according to
the structure laid out under 'Structure:' in the comment below, then copy
and paste the code into frame 1 of the actions layer. 

/*
 FrameLabelNav.fla Example
 Author: Keith Reinfeld
 FlashPlayer 9, AS3
 Structure:
 Main Timeline:
 Three layers: actions
   buttons
   textfields
 actions layer: five blank keyframes
frame 1: Actionscript (no frame label)
frame 2: frame label: intro
frame 3: frame label: labelone
frame 4: frame label: labeltwo
frame 5: frame label: labelthree
 buttons layer: two buttons spanning all five frames
SimpleButton: prevBtn
SimpleButton: nextBtn
 textfields layer: 
frame 1: blank keyframe
frames 2 - 5: 
TextField: content_txt spanning last four frames
*/
// Timeline code in frame 1:
stop();

// The order of the XML elements doesn't matter.
// However, each name attribute value must be unique.
var contentXML:XML = frames
frame name=labeltwo text=This is the frame with the label 'labeltwo'./
frame name=intro text=This is the frame with the label 'intro'./
frame name=labelthree text=This is the frame with the label
'labelthree'./
frame name=labelone text=This is the frame with the label 'labelone'./

frame name=labelnone text=There is no frame with the label
'labelnone'./
/frames;

// Init vars
var labels:Array = this.currentLabels;
var frameIndex:uint = 0;
var frameMax:uint = labels.length - 1;
var nextLbl:FrameLabel = labels[frameIndex];

// Listeners
prevBtn.addEventListener(MouseEvent.CLICK, navPrev);
nextBtn.addEventListener(MouseEvent.CLICK, navNext);
this.addEventListener(Event.ENTER_FRAME, navTo);

function navPrev(event:MouseEvent):void {
frameIndex = (frameIndex  0)? --frameIndex: frameIndex;
this.addEventListener(Event.ENTER_FRAME, navTo);
}

function navNext(event:MouseEvent):void {
frameIndex = (frameIndex  frameMax)? ++frameIndex: frameIndex;
this.addEventListener(Event.ENTER_FRAME, navTo);
}

function navTo(event:Event):void{
nextLbl = labels[frameIndex];
this.gotoAndStop(nextLbl.name);
if(this.content_txt != null){
this.removeEventListener(Event.ENTER_FRAME, navTo);
updateTextField();
}
}

function updateTextField():void{
this.content_txt.text =
contentText(contentXML,frame,name,nextLbl.name,text)+ (Frame:
+this.currentFrame+);
}

function
contentText(node:XML,element:String,att1:String,val1:String,att2:String):Str
ing{
return node.elements(element).(@[att1] == val1)@[att2];
}

Questions?

HTH

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders