Re: [Flashcoders] digest

2007-10-21 Thread Keith Wilcox
I've entered my username and password and it says Authenitcation failed.

On 10/19/07, Zeh Fernando <[EMAIL PROTECTED]> wrote:
>
> > Apparently some user preferences were jostled/reset by the move.
> > Where can I change my subscription mode to digest?
> >
> > d
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
> For reference, just visit the flashcoders list page:
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> It's also listed on the footer of every list email.
> ___
> 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] digest

2007-10-21 Thread 365multimedia.com
UNSUBSCRIBE

On 10/19/07, Zeh Fernando <[EMAIL PROTECTED]> wrote:
>
> > Apparently some user preferences were jostled/reset by the move.
> > Where can I change my subscription mode to digest?
> >
> > d
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
> For reference, just visit the flashcoders list page:
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> It's also listed on the footer of every list email.
> ___
> 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] navigateToURL or getURL and pop-up blocking

2007-10-21 Thread John Olson
I have a client Flash AS3 project where I need to open a new window  
from within Flash.   I won't have any control over the html wrapper  
for the SWF so I can't use javascript within the HTML page.   I've  
read suggestions about using Javascript:window.open but seems that  
will get blocked as well.


Any suggestions?


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


Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread [EMAIL PROTECTED]

hi alistair,
you are confusing variable names with instance names. they're not the 
same thing.


when you do this:
 var cont1:Sprite = new Sprite();
 cont.addChild(cont1);

you are not naming the sprite "cont1", you are simply assigning the 
variable cont1 a reference to the new Sprite.


so you can't do:
 cont.getChildByName("cont1");

because the Sprite referenced by cont has no instance name.

you *can* do this:
 var room:Sprite = new Sprite();
 var b:Sprite = new Sprite();
 b.name = "ball";
 room.addChild(b);
 trace(room.getChildByName("ball"));

however, that technique is not recommended because it requires you to 
refer to the object by an arbitrary string name ("ball") that cannot be 
checked at compile time. in a pure ActionScript 3.0 program, rather than 
using instance names, you should reference all display objects through a 
variable. e.g.,


b.bounce()

instead of:

Ball(room.getChildByName("ball")).bounce()

(in the above code, the cast to Ball is required because 
getChildByName()'s return type is DisplayObject.)


if other areas of your code need access to the ball, pass them a 
reference to it. for example, you might have a Room class with a 
getBall() method:


 public function getBall ():Ball {
  return theBall;
 }

all that said, if you are just creating instances on the timeline in the 
Flash authoring tool, and you name them using the properties panel, you 
can reference them directly by name. e.g., if you have a clip that you 
named "ball" on the main timeline, you can reference that clip using 
this code on that timeline:


trace(this.ball);

the preceding code works because the compiler automatically adds a 
variable named 'ball' to the document class (the class representing the 
main timeline), and assigns 'ball' a reference to your named clip.


colin

Alistair Colling wrote:

Hiya everyone, good to see the list back up and running.

 I'm trying to access a sprite that is inside of 2 other sprites and I 
have 2 questions about this:


1) It seems that the syntax for targeting this sprite once it is created 
is quite long winded (2 temporary vars have to be created):


var cont:Sprite = new Sprite();
this.addChild(cont);
var cont1:Sprite = new Sprite();
cont.addChild(cont1);
var child1:Sprite = new H1();

var target =cont.getChildByName("cont1");
var targ2 = target.getChildByName("child1");   


targ2._visible = false;




2) Also, I can't data type my target var as a Sprite otherwise I get an 
error (unless I cast  the type as well).


If anyone knows of a better of doing this I would be really interested 
to hear it :)

Cheers,
Ali



___
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] FitFlash - smart flash resize script

2007-10-21 Thread Francis Turmel
Sweet, glad to hear this. The auto-scrollbar feature was one of the main
reasons
I started this project over 2 years ago.

BTW, I've moved the project to google code a while ago.
http://code.google.com/p/swfin/




On 10/19/07, Izaias | Grafikonstruct <[EMAIL PROTECTED]> wrote:
>
> I like it so much! I have seen on a lot of websites where simply not is
> possible navegate using a small browser window.
>
> I'm using another great solution to resolve it:
> The swfIN, created by http://nectere.ca.
>
> Izaias Cavalcanti - Grafikonstruct
> http://www.grafikonstruct.com.br
>
>
> -Mensagem original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Em nome de Ruy Adorno
> Enviada em: quinta-feira, 18 de outubro de 2007 20:40
> Para: flashcoders@chattyfig.figleaf.com
> Assunto: [Flashcoders] FitFlash - smart flash resize script
>
> A friend o'mine made a javascript that automatically resizes flash to
> 100% wid/hei when the browser window is greater than the minimum desired
> size and
> resizes flash to the minimum desired size when the browser window is
> smaller... it makes the default browser scroll appears and make the
> content more accessible..
>
> i think it's very useful for flash sites that uses 100% wid/hei..
>
> http://fitflash.millermedeiros.com/
>
> Ruy Adorno
> ___
> 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] FitFlash - smart flash resize script

2007-10-21 Thread Rafael Rinaldi
Yeah, swfIN is amazing Izaias :)

-- 
Rafael Rinaldi
www.rafaelrinaldi.com
55 11 9769 5369
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Your new list server

2007-10-21 Thread Charles Thibaudeau
I'd like you to reset me to digest please. This is taking way too much space in 
my inbox.

thank you



> From: [EMAIL PROTECTED]
> To: flashcoders@chattyfig.figleaf.com
> Subject: RE: [Flashcoders] Your new list server
> Date: Fri, 19 Oct 2007 17:01:41 +
> 
> Can you reset me to digest, thanks.
> 
> > Date: Fri, 19 Oct 2007 00:49:23 -0400> From: [EMAIL PROTECTED]> To: 
> > Flashcoders@chattyfig.figleaf.com> CC: > Subject: [Flashcoders] Your new 
> > list server> > Somehow, in setting up your new list server, you 
> > re-activated all the > e-mail addresses that had been previously 
> > UNSUBSCRIBED from the list, (3 > in my case).> > Now that's annoying - 
> > especially if you have multiple mailboxes filling > up with messages.> > I 
> > can't unsubscribe, because your password reminder button doesn't seem > to 
> > work.> > Can you please unsubscribe me?> > Chris Ivey> 
> > ___> Flashcoders mailing list> 
> > Flashcoders@chattyfig.figleaf.com> 
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> _
> Overpaid or Underpaid? Check our comprehensive Salary Centre
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fcontent%2Emycareer%2Ecom%2Eau%2Fsalary%2Dcentre%3Fs%5Fcid%3D595810&_t=766724125&_r=Hotmail_Email_Tagline_MyCareer_Oct07&_m=EXT___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=EMENCA122___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] digest

2007-10-21 Thread Cynthia Lawson Jaramillo
Yes, but what password did you assign to us?  My usual passwords are  
not working to log in, so I'm guessing a default one was used?


Thanks,
C.

On Oct 19, 2007, at 12:04 PM, Dave Watts wrote:


Apparently some user preferences were jostled/reset by the move.


Yes, sorry about that!

I've reset your account to digest, but in the future you can use  
the URL in

the message footer.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

___
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] digest

2007-10-21 Thread swfer
Uh-huh. I've set my my preferences to 'digest' twice in the past two 
days, and I'm still getting individual messages.


Still some bugs in the system, I see.

- hb


At 3:11 PM -0300 on 10/19/07, you spake thus:


Apparently some user preferences were jostled/reset by the move.
Where can I change my subscription mode to digest?

d



For reference, just visit the flashcoders list page:

http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

It's also listed on the footer of every list email.

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


Re: [Flashcoders] digest

2007-10-21 Thread tcoz
Password mailing reminder seems to be broken as well, I put in two requests so 
that I could change to digest, and have received neither one. 

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


RE: [Flashcoders] good to everything back up & running

2007-10-21 Thread Jason White

Me too please: Unsubscribe. Thanks.
 
-J

> Subject: RE: [Flashcoders] good to everything back up & running> Date: Fri, 
> 19 Oct 2007 09:09:19 -0500> From: [EMAIL PROTECTED]> To: 
> flashcoders@chattyfig.figleaf.com> > > > > Can I please get back to being 
> unsubscribed??? Thanks! > > > > > -Original Message-> From: [EMAIL 
> PROTECTED]> [mailto:[EMAIL PROTECTED] On Behalf Of> [EMAIL PROTECTED]> Sent: 
> Thursday, October 18, 2007 10:27 PM> To: flashcoders@chattyfig.figleaf.com> 
> Subject: Re: [Flashcoders] good to everything back up & running> > > > > > 
> Can I please get set back to digest??? Thanks!> > > > > > Joan> The Lassie 
> Network> _www.lassie.net_ (http://www.lassie.net/) > > This transmission is 
> intended to be delivered to the named addressee(s)> and > may contain 
> information that is confidential and/or legally privileged.> If > this 
> information is received by anyone other than the named> addressee(s), the > 
> recipient should immediately notify the sender by E-Mail and by> telephone > 
> (410) 569-5321 and permanently delete the original and any copy,> including > 
> printout of the information. In no event shall this material be read,> used, 
> copied, > reproduced, stored or retained by anyone other than the named> 
> addressee(s), > except with the express consent of the sender.> > > > > > 
> ** See what's new at> http://www.aol.com> 
> ___> 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] >> load 500 by 500 from db in flash

2007-10-21 Thread Jordan L. Chilcott
If you want to limit the number of your results, add LIMIT(0, 500) at  
the end of your statement.


jord

On Oct 19, 2007, at 11:29 AM, CARABUS-Plus wrote:


Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Jordan L. Chilcott, President
Interactivity Unlimited
Guelph, Ontario
-
Tel:  (519) 837-1879
Fax: (519) 837-8610
mailto:[EMAIL PROTECTED]
http://www.interactivityunlimited.com
iChat/AIM: j1chilcott
Skype: bear-faced-cow
SightSpeed: [EMAIL PROTECTED]

Author: "Building Web Sites with Macromedia Studio MX"
Author: "Building Dynamic Web Sites with Macromedia Studio MX"
Author: "Flash Professional 8: Training From the Source"
Author: "Foundation Flash 8 Video"


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


RE: [Flashcoders] central up to date data

2007-10-21 Thread Michael Ypes
Great to have the list back, I was worried for a while that it was gone
forever, phew

In answer to your question: 

Create a singleton class which stores all data. I use this in applications
to store data from xml files and use it as a mvc pattern. This way you can
extract the information from the data anywhere in the application by using
the getInstance() method.

EG.

ModelData.getInstance().getMenuColor()

Which would then return the color that you are after.

Read Joey Lotts book AS3 with Design Patterns - which can be easily
translated for AS2 but really helps on building a usable architecture for
your applications which are scaleable and usable.

If you require an example then shout again. Bit rushed at the mo.

Cheers

M

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Huynen
Sent: 19 October 2007 10:41
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] central up to date data

Hi List!

I'm using a class named utils.as to store data like color values in my
project.
This class is then extended by let's say the application.as and the menu.as.

Next in the application class I change the value of a var in the utils
class.
When retrieving this value from the third (menu) class I still get the old
value instead of the new one.

What is the best thing to do when I want to keep my data central, up to date
and accesible for all classes in my project?

Kind regards,

Tom
___
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] digest

2007-10-21 Thread Luis Recchini
same as sean

On 10/19/07, Sean Suggs <[EMAIL PROTECTED]> wrote:
>
> Apparently some user preferences were jostled/reset by the move.
>
> Where can I change my subscription mode to UNSUBSCRIBE?
>
> s
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David
> Bitterman
> Sent: Thursday, October 18, 2007 11:28 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] digest
>
> Apparently some user preferences were jostled/reset by the move.
>
> Where can I change my subscription mode to digest?
>
> d
> ___
> 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] unsetting object property in AS2

2007-10-21 Thread ekameleon
Hello :)

See the documentation of the Array class and the splice method :

splice(startIndex:Number <2026.html#419506>,
[deleteCount:Number<2026.html#419506>],
[value:Object <2035.html#421878>])


The null value don't remove an item in the Array instances :) clean only the
value in the case :)

If you use a property in an object use 'undefined' or 'delete' :

var o = {} ;
o.prop1 = 1 ;
o.prop2 = 2 ;
trace(o) ;

for (var prop in o )
{
  trace( prop  + " : " + o[prop] ) ;
}

trace("--- remove prop1") ;

trace( "remove prop1 : " + delete o.prop1 ) ;

for (var prop in o )
{
  trace( prop  + " : " + o[prop] ) ;
}

... If you want keep the property but this property not must be enumerable
in the for..in loop, use ASSetPropFlags :

var o = {} ;
o.prop1 = 1 ;
o.prop2 = 2 ;
trace(o) ;

ASSetPropFlags(o, ["prop1"] , 1 ) ;

// with the for..in
for (var prop in o )
{
  trace( prop  + " : " + o[prop] ) ;
}

// but the property exist :
trace(o.prop1 ) ;


EKA+ :)

2007/10/19, Andrew Sinning <[EMAIL PROTECTED]>:
>
> A question in my sent box from when the list went down:
>
> I like to use the Object class as an index, but there doesn't appear to
> be a way to completely remove a property from an object.  I can set the
> value to null, but I'd really like to be able to remove the property
> completely.  Why? Because if I want to do a reverse lookup, then I have
> to iterate through all of the properties, but having to iterate through
> the nulled values seems inefficient.
>
> I can do this with another class, something that includes an Array to
> keep track of current properties and an Object for the index, but I'm
> wondering if I'm overlooking something.  Often I find that I am.
>
> Speaking of Arrays, it's a bit frustrating that there's no easy way to
> remove an item from an array either.  Currently I use:
>
>iterate through the array to find the index of the needle
>splice the Array at the index
>
> Is there a faster way to remove an item from an array?
>
>
> 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] >> load 500 by 500 from db in flash

2007-10-21 Thread Ricky Bacon

CARABUS-Plus wrote:

Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500 result ?
Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


My SQL is rusty, but assuming you are using MySQL (no pun there...):

SELECT * FROM NP_socs_nancy WHERE soc_09='foo' ORDER BY soc_01 LIMIT 1, 500;

The LIMIT command uses [offset, max rows], so LIMIT 1, 500 would start 
at row 1 and return 500 rows from the db.  You can increment the offset 
when the data has parsed successfully and query again.


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


[Flashcoders] flashcoders list page

2007-10-21 Thread Rob Buse

I've requested to be unsubscribed several times via:

http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

The confirmation e-mail never shows.
Neither does the password reminder.

-Rob

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


RE: [Flashcoders] digest

2007-10-21 Thread Bryan Thompson
Folks, before this list gets flooded (again) with remove/change requests,
please remember that the owner of this list does not necessarily watch it
for help requests.  By sending these requests to the list, you are just
clogging our in boxes with noise.

Every email you get has a link to the list's home page at the bottom.  Use
it, and use your head.  There is a mailto link at the bottom for the list
owner: mailto:[EMAIL PROTECTED]

Please send your maintenance requests to him and not the list.

Thanks for helping reduce the noise.

Bryan

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David
> Bitterman
> Sent: Friday, October 19, 2007 12:28 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] digest
> 
> Apparently some user preferences were jostled/reset by the move.
> 
> Where can I change my subscription mode to digest?
> 
> d
> ___
> 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] Welcome Back

2007-10-21 Thread Troy Rollins


On Oct 19, 2007, at 1:00 AM, Kerry Thompson wrote:


Please come and join us on Flash_Tiger--but please, please don't leave
Flashcoders. This is such a great list, and we truly don't want to  
see it

diminished in any way. Again, our aim is to expand the Flash list
environment and complement the existing lists.


In that case, maybe it would make sense to migrate Flashcoders to  
being AS3 specific at this point.


--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


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


[Flashcoders] password retrieval

2007-10-21 Thread David Bitterman

I'm getting the same result here, password retrieval is not functioning.

hmmm


On Oct 19, 2007, at 10:21 AM, Richard Helgor wrote:

Unsubscribe and password retrieval don't seem to be working. Can  
someone check please?


I was set not to receive messages, and now it's back on, and I  
can't turn it off.


On 19 Oct 2007, at 04:26, [EMAIL PROTECTED] wrote:


Can I please get set back to digest???   Thanks!


Joan
The  Lassie Network
_www.lassie.net_ (http://www.lassie.net/)

This  transmission is intended to be delivered to the named  
addressee(s) and
may  contain information that is confidential and/or legally  
privileged. If
this  information is received by anyone other than the named  
addressee(s), the
recipient should immediately notify the sender by E-Mail and by  
telephone
(410)  569-5321 and permanently delete the original and any copy,  
including
printout of  the information. In no event shall this material be  
read, used, copied,
 reproduced, stored or retained by anyone other than the named  
addressee(s),

except with the express consent of the sender.





** See what's new at http:// 
www.aol.com

___
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] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread Troy Rollins


On Oct 19, 2007, at 10:05 AM, Alistair Colling wrote:


var cont:Sprite = new Sprite();
this.addChild(cont);
var cont1:Sprite = new Sprite();
cont.addChild(cont1);
var child1:Sprite = new H1();

var target =cont.getChildByName("cont1");
var targ2 = target.getChildByName("child1");  

targ2._visible = false;


Well, if you _really_ want to, you can do it with 1...

//
// This code will run in a frame script
import flash.display.*;

var cont:Sprite = new Sprite();
cont.name = "cont"
this.addChild(cont);
var cont1:Sprite = new Sprite();
cont1.name = "cont1"

var child1:Sprite = new Sprite();
child1.name = "child1"
cont1.addChild(child1);
cont.addChild(cont1);


var childTest:Sprite = Sprite(cont.getChildByName 
("cont1")).getChildByName("child1") as Sprite;

childTest.visible = true;
trace(childTest.name + " " + childTest);
stop();
///

Of course, I effectively casted twice in one line, but hey...  ;-)

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


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


Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread keith
Is there a reason you can't access the Sprite with the variable you 
first created?

cont.visible=false;

-- Keith H --




Alistair Colling wrote:

Hiya everyone, good to see the list back up and running.

 I'm trying to access a sprite that is inside of 2 other sprites and I 
have 2 questions about this:


1) It seems that the syntax for targeting this sprite once it is 
created is quite long winded (2 temporary vars have to be created):


var cont:Sprite = new Sprite();
this.addChild(cont);
var cont1:Sprite = new Sprite();
cont.addChild(cont1);
var child1:Sprite = new H1();

var target =cont.getChildByName("cont1");
var targ2 = target.getChildByName("child1");   


targ2._visible = false;




2) Also, I can't data type my target var as a Sprite otherwise I get 
an error (unless I cast  the type as well).


If anyone knows of a better of doing this I would be really interested 
to hear it :)

Cheers,
Ali



___
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