Re: [Flashcoders] Re: swf doesn't work the same online

2010-03-10 Thread Glen Pike
From the look of it, the complaint is about mynav not existing on the 
parent clip - nsprite.  Because mynav is not a property of Sprite, you 
may have to use the DisplayObjectContainer methods to access mynav - 
again, I was working in AS2 style, so directly accessing may not have 
worked for the AS3 version:


function onRolloverHandler(e:MouseEvent):void {
 var nsprite:Sprite = e.currentTarget as Sprite;
 if(nsprite) {
   var mynav:TextField = nsprite.getChildByName(mynav) as TextField;
   if(mynav) {
 TextField(nsprite.mynav).bgcolor = 0x97f9ec;
   } else {
 trace(can't find 'mynav' child of nsprite);
   }
 }
}





John Singleton wrote:

From: Glen Pike g...@engineeredarts.co.uk
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tue, March 9, 2010 1:26:14 PM
Subject: Re: [Flashcoders] Re: swf doesn't work the same online

Sorry, my typo / error.

You need to change bgcolor to backgroundColor in the event handler 
functions (bgcolor is not a property of TextField), e.g.


TextField(nsprite.mynav).backgroundColor = 0x...

No, I caught that and made the appropriate substitution. My vars are actually 
different than what I'm posting. That's not the problem. Please take a look at 
what I sent earlier.
Thanks,
John



John Singleton wrote:
  

From: Glen Pike g...@engineeredarts.co.uk
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tue, March 9, 2010 12:22:03 PM
Subject: Re: [Flashcoders] Re: swf doesn't work the same online

Hi,

   You need to make your nav function return the sprite it creates, so change the 
signature to:

function nav(nname:String, nurl:String, myX:int, bgcolor:uint):Sprite
   
and return nsprite at the bottom.


Thanks. That worked. Now I see that in your original instructions. Oops. I was doing this piecemeal and testing as I went along, sorry. 


Now I get this error:

Error: 1119: Access to possibly undefined property mynav...

I figured that might have something to do with not having defined bgcolor, so I 
added the following in the class' function definition:

var bgcolor:uint = new uint();

However, that then threw a new error:

Error #1151: A conflict exists with definition bgcolor

This, I assume, because of the following line:

function nav(nname:String, nurl:String, myx:int, bgcolor:uint):Sprite

That's the only place where that variable shows up and it of course is used in 
that function. I guess I'm confused as to how to work with those variables 
outside of the nav function, as you have me call them here:

function onRolloverHandler(e:MouseEvent):void {
  var nsprite:Sprite = e.currentTarget as Sprite;
  if(nsprite  nsprite.mynav) {
  TextField(nsprite.mynav).bgcolor = 0x97f9ec;
  }
}

which, of course, is where I'm getting in trouble.
Thanks,
John


 
___

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] FLVplackback problem

2010-03-10 Thread Cor
Hi list,

I have this application which plays MP3 sounds and play FLVs with use of the
FLVPlayback component.
For every sound and every flv I create a new instance of the according
class.
I can start as much MP3 as a like without any problem.
But when I start the 32th video, it crashes and error on my FoundFacade
class:

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at SoundFacade/play()
at SoundFacade/onLoadOpen()
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at SoundFacade/play()
at SoundFacade/onLoadComplete()

So I think this has to do with the FLVPlayback instances using up all the
possible soundchannels without releasing them

Any help is appreciated!

TIA

Cor



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


RE: [Flashcoders] FLVplackback problem

2010-03-10 Thread David Hunter

I haven't run into your problem yet but I just finished a website which played 
video and mp3 and played the video through FLVPlayback and built a separate 
player for the sounds using Sound and SoundChannel classes. Maybe that might 
help.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Date: Wed, 10 Mar 2010 10:55:23 +0100
 Subject: [Flashcoders] FLVplackback problem
 
 Hi list,
 
 I have this application which plays MP3 sounds and play FLVs with use of the
 FLVPlayback component.
 For every sound and every flv I create a new instance of the according
 class.
 I can start as much MP3 as a like without any problem.
 But when I start the 32th video, it crashes and error on my FoundFacade
 class:
 
 TypeError: Error #1009: Cannot access a property or method of a null object
 reference.
   at SoundFacade/play()
   at SoundFacade/onLoadOpen()
 TypeError: Error #1009: Cannot access a property or method of a null object
 reference.
   at SoundFacade/play()
   at SoundFacade/onLoadComplete()
 
 So I think this has to do with the FLVPlayback instances using up all the
 possible soundchannels without releasing them
 
 Any help is appreciated!
 
 TIA
 
 Cor
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FLVplackback problem

2010-03-10 Thread Cor
I do use a separate class for the sounds:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf
351e63e3d118a9b90204-7d09.html




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: woensdag 10 maart 2010 11:19
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] FLVplackback problem


I haven't run into your problem yet but I just finished a website which
played video and mp3 and played the video through FLVPlayback and built a
separate player for the sounds using Sound and SoundChannel classes. Maybe
that might help.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Date: Wed, 10 Mar 2010 10:55:23 +0100
 Subject: [Flashcoders] FLVplackback problem
 
 Hi list,
 
 I have this application which plays MP3 sounds and play FLVs with use of
the
 FLVPlayback component.
 For every sound and every flv I create a new instance of the according
 class.
 I can start as much MP3 as a like without any problem.
 But when I start the 32th video, it crashes and error on my FoundFacade
 class:
 
 TypeError: Error #1009: Cannot access a property or method of a null
object
 reference.
   at SoundFacade/play()
   at SoundFacade/onLoadOpen()
 TypeError: Error #1009: Cannot access a property or method of a null
object
 reference.
   at SoundFacade/play()
   at SoundFacade/onLoadComplete()
 
 So I think this has to do with the FLVPlayback instances using up all the
 possible soundchannels without releasing them
 
 Any help is appreciated!
 
 TIA
 
 Cor
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.733 / Virus Database: 271.1.1/2732 - Release Date: 03/09/10
08:33:00

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


RE: [Flashcoders] FLVplackback problem

2010-03-10 Thread David Hunter

sorry. misunderstood your first message and thought you were playing back mp3s 
through an FLVPlayback. good luck.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] FLVplackback problem
 Date: Wed, 10 Mar 2010 11:22:55 +0100
 
 I do use a separate class for the sounds:
 http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf
 351e63e3d118a9b90204-7d09.html
 
 
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
 Sent: woensdag 10 maart 2010 11:19
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] FLVplackback problem
 
 
 I haven't run into your problem yet but I just finished a website which
 played video and mp3 and played the video through FLVPlayback and built a
 separate player for the sounds using Sound and SoundChannel classes. Maybe
 that might help.
 
  From: c...@chello.nl
  To: flashcoders@chattyfig.figleaf.com
  Date: Wed, 10 Mar 2010 10:55:23 +0100
  Subject: [Flashcoders] FLVplackback problem
  
  Hi list,
  
  I have this application which plays MP3 sounds and play FLVs with use of
 the
  FLVPlayback component.
  For every sound and every flv I create a new instance of the according
  class.
  I can start as much MP3 as a like without any problem.
  But when I start the 32th video, it crashes and error on my FoundFacade
  class:
  
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  at SoundFacade/play()
  at SoundFacade/onLoadOpen()
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  at SoundFacade/play()
  at SoundFacade/onLoadComplete()
  
  So I think this has to do with the FLVPlayback instances using up all the
  possible soundchannels without releasing them
  
  Any help is appreciated!
  
  TIA
  
  Cor
  
  
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 _
 Do you have a story that started on Hotmail? Tell us now
 http://clk.atdmt.com/UKM/go/195013117/direct/01/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 No virus found in this incoming message.
 Checked by AVG - www.avg.com 
 Version: 9.0.733 / Virus Database: 271.1.1/2732 - Release Date: 03/09/10
 08:33:00
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FLVplackback problem

2010-03-10 Thread Cor
It seems that after instanciating 32 FLVPlayback my SoundFacade crashes.



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: woensdag 10 maart 2010 12:18
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] FLVplackback problem


sorry. misunderstood your first message and thought you were playing back
mp3s through an FLVPlayback. good luck.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] FLVplackback problem
 Date: Wed, 10 Mar 2010 11:22:55 +0100
 
 I do use a separate class for the sounds:

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf
 351e63e3d118a9b90204-7d09.html
 
 
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David
Hunter
 Sent: woensdag 10 maart 2010 11:19
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] FLVplackback problem
 
 
 I haven't run into your problem yet but I just finished a website which
 played video and mp3 and played the video through FLVPlayback and built a
 separate player for the sounds using Sound and SoundChannel classes. Maybe
 that might help.
 
  From: c...@chello.nl
  To: flashcoders@chattyfig.figleaf.com
  Date: Wed, 10 Mar 2010 10:55:23 +0100
  Subject: [Flashcoders] FLVplackback problem
  
  Hi list,
  
  I have this application which plays MP3 sounds and play FLVs with use of
 the
  FLVPlayback component.
  For every sound and every flv I create a new instance of the according
  class.
  I can start as much MP3 as a like without any problem.
  But when I start the 32th video, it crashes and error on my FoundFacade
  class:
  
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  at SoundFacade/play()
  at SoundFacade/onLoadOpen()
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  at SoundFacade/play()
  at SoundFacade/onLoadComplete()
  
  So I think this has to do with the FLVPlayback instances using up all
the
  possible soundchannels without releasing them
  
  Any help is appreciated!
  
  TIA
  
  Cor
  
  
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 _
 Do you have a story that started on Hotmail? Tell us now

http://clk.atdmt.com/UKM/go/195013117/direct/01/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 No virus found in this incoming message.
 Checked by AVG - www.avg.com 
 Version: 9.0.733 / Virus Database: 271.1.1/2732 - Release Date: 03/09/10
 08:33:00
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.733 / Virus Database: 271.1.1/2732 - Release Date: 03/09/10
08:33:00

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


Re: [Flashcoders] FLVplackback problem

2010-03-10 Thread Henrik Andersson

Cor wrote:

It seems that after instanciating 32 FLVPlayback my SoundFacade crashes.


What a coincidence, the Flash sound mixer only supports 32 sound 
channels at once.


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


[Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
Hi;
I have this line of code that I need to fix:

myFunction(e.currentTarget[aChild].text);

That is, I need to target not e.currentTarget but the child of the same
(aChild). How do I do that?
TIA.
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] OOP Books (OT)

2010-03-10 Thread Susan Day
On Mon, Mar 8, 2010 at 6:18 AM, Geografiek geograf...@geografiek.nl wrote:

 Hi Susan,
 I liked 'The Object-Oriented Thought Process' by Matt Weisfeld (not
 Actionscript)
 and of course Colin Moock's 'Essential Actionscript 3.0'


I don't find Moock's book helps much on this subject. Thanks for your
recommendation, and also Mark Burvill's recommendation of Advanced
Actionscript 3 with Design Patterns.
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Apparently Doesn't Check Cache

2010-03-10 Thread Victor Subervi
Hi;
I have this code:

public class Preloader extends MovieClip
{
var loader:Loader = new Loader();
var loader2:Loader = new Loader();
var loader3:Loader = new Loader();
private var myTextField:TextField = new TextField();
var imgFlag1:Boolean = new Boolean(false);
var imgFlag2:Boolean = new Boolean(false);

public function Preloader()
{
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
 private function init(e:Event)
{
var clientName:TextField = new TextField();
var format:TextFormat = new TextFormat();
format.font = 'Arial';
format.size = 35;
clientName.textColor = 0x023048;
clientName.text = 'Client Name';
clientName.autoSize = TextFieldAutoSize.LEFT;
clientName.setTextFormat(format);
var nameSprite:Sprite = new Sprite();
nameSprite.x = stage.stageWidth/2 - 140;
nameSprite.y = stage.stageHeight/2 - 40;
nameSprite.alpha = 0;
TweenLite.to(nameSprite, 2, {alpha:1});
addChild(nameSprite);
nameSprite.addChild(clientName);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(new URLRequest(images/logo.png));
loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
loader2.load(new URLRequest(images/graphic.png));
loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
removeEventListener(Event.ADDED_TO_STAGE, init);
addChild(myTextField);
myTextField.width = 250;
myTextField.x = stage.stageWidth/2;
myTextField.y = stage.stageHeight/2;
myTextField.selectable = false;
myTextField.border = false;
myTextField.borderColor = 0xAA;
myTextField.autoSize = TextFieldAutoSize.LEFT;
var myFormat:TextFormat = new TextFormat();
myFormat.color = 0x023048;
myFormat.size = 24;
myFormat.italic = true;
myTextField.defaultTextFormat = myFormat;
}

private function imageLoaded(event:Event):void
{
imgFlag1 = true;
if (imgFlag2 == true)
{
completePreloader();
}
}
 private function imageLoaded2(event:Event):void
{
imgFlag2 = true;
if (imgFlag1 == true)
{
completePreloader();
}
}
 function completePreloader()
{
var req:URLRequest = new URLRequest('index.py');
navigateToURL(req, '_self');
}
 function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded/e.bytesTotal;
myTextField.text = Math.ceil(perc*100).toString() + %;
}
}
}

Now, this does exactly what I want in that it loads the two graphics before
going to my page that has two swf files, one of which is a splash page. The
problem is that it *always* loads those images without, apparently,
bothering to check to see if they're already cached. I wonder if this is
because I never add them to the stage (addChild). How do I get the script to
check and see if the images are already cached?
TIA,
Victor
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread kennethkawam...@gmail.com
If aChild is a public property of your currentTarget, your code would work.

If not you can use getChildByName()/getChildAt()
-- 
Kenneth Kawamoto
http://www.materiaprima.co.uk/

On 10 March 2010 12:05, Susan Day suzieprogram...@gmail.com wrote:
 Hi;
 I have this line of code that I need to fix:

 myFunction(e.currentTarget[aChild].text);

 That is, I need to target not e.currentTarget but the child of the same
 (aChild). How do I do that?
 TIA.
 Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Apparently Doesn't Check Cache

2010-03-10 Thread mark . jonkman
Every request for a file will go back to the server at some level. For example, 
despite the fact that have a file preloaded' into cache when another request 
is made for the file it will look at the cache then send a request to the 
server to see if the file has changed or whether the file in cache is valid to 
use. If the server returns use file from cache then it will use the cached 
file otherwise it will load the revised version from the server. 

First questions would then be what is the header returned as part of the 
original file request. Is it no-cache or does it set a very short expiry? Are 
the url's exactly identical or is there any kind of query string associated 
with the url of one request but not the other? This might be walking on thin 
ice here, but can you see the file in the browser's cache? Back in the day, 
when I was doing Director development, there was a period of time that elapsed 
from when Shockwave loaded the file and the time that it went into the 
browser's cache. The file was always available within the Shockwave environment 
but it was immediately visible in the browser's cache. Don't know if a similar 
situation arises with Flash where the content is loaded but hasn't yet been 
written into the browser's cache. 

I'd honestly start out by using something like Internet Explorer where you can 
easily browse the cached files - blow away the cache and then load your swf 
preloader app. See if the files are in cache. If they are cool, note the URL 
associated with them. Then I'd go back and clear the cache again and re-run the 
app with the new window code in place. I'd run it through to completion and see 
if there are two copies of said image in cache one from the swf preloader and 
the other from the new window. If so it would imply that they must be seeing 
slightly different urls. If not then I'd be looking for no cache headers. 
Concurrent to this I'd be using something like Fiddler (IE), Charles or Tamper 
Data or similar app that will allow you to see the requests and the responses 
and be able to examine the headers and check for no-cache or very short expiry 
on the headers. 

Theoretically what you are doing should work, I can't see how placing the image 
on stage would make any difference. Everything is always a possibility but 
using a test strategy that stepwise verifies what is getting written into cache 
and what the request are for the files is a good first step in eliminating many 
issues. 

Sincerely 
Mark R. Jonkman 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Apparently Doesn't Check Cache

2010-03-10 Thread Nathan Mynarcik
I actually have experienced the reverse of this issue. Flash caches the dynamic 
content so hard that I have reverted to using no_cache meta tags in my HTML. 
Not to OT the topic, but are meta tags the best way to prevent this? I have 
even though of adding a variable at the end of my dynamic urls with a date 
element so flash would constantly think its a new XML doc to load everytime. 


Nathan Mynarcik
Interactive Web Developer
nat...@mynarcik.com
254.749.2525
www.mynarcik.com

-Original Message-
From: mark.jonk...@comcast.net
Date: Wed, 10 Mar 2010 13:46:08 
To: Flash Coders Listflashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Apparently Doesn't Check Cache

Every request for a file will go back to the server at some level. For example, 
despite the fact that have a file preloaded' into cache when another request 
is made for the file it will look at the cache then send a request to the 
server to see if the file has changed or whether the file in cache is valid to 
use. If the server returns use file from cache then it will use the cached 
file otherwise it will load the revised version from the server. 

First questions would then be what is the header returned as part of the 
original file request. Is it no-cache or does it set a very short expiry? Are 
the url's exactly identical or is there any kind of query string associated 
with the url of one request but not the other? This might be walking on thin 
ice here, but can you see the file in the browser's cache? Back in the day, 
when I was doing Director development, there was a period of time that elapsed 
from when Shockwave loaded the file and the time that it went into the 
browser's cache. The file was always available within the Shockwave environment 
but it was immediately visible in the browser's cache. Don't know if a similar 
situation arises with Flash where the content is loaded but hasn't yet been 
written into the browser's cache. 

I'd honestly start out by using something like Internet Explorer where you can 
easily browse the cached files - blow away the cache and then load your swf 
preloader app. See if the files are in cache. If they are cool, note the URL 
associated with them. Then I'd go back and clear the cache again and re-run the 
app with the new window code in place. I'd run it through to completion and see 
if there are two copies of said image in cache one from the swf preloader and 
the other from the new window. If so it would imply that they must be seeing 
slightly different urls. If not then I'd be looking for no cache headers. 
Concurrent to this I'd be using something like Fiddler (IE), Charles or Tamper 
Data or similar app that will allow you to see the requests and the responses 
and be able to examine the headers and check for no-cache or very short expiry 
on the headers. 

Theoretically what you are doing should work, I can't see how placing the image 
on stage would make any difference. Everything is always a possibility but 
using a test strategy that stepwise verifies what is getting written into cache 
and what the request are for the files is a good first step in eliminating many 
issues. 

Sincerely 
Mark R. Jonkman 
___
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] Apparently Doesn't Check Cache

2010-03-10 Thread Victor Subervi
On Wed, Mar 10, 2010 at 9:46 AM, mark.jonk...@comcast.net wrote:

 Every request for a file will go back to the server at some level. For
 example, despite the fact that have a file preloaded' into cache when
 another request is made for the file it will look at the cache then send a
 request to the server to see if the file has changed or whether the file in
 cache is valid to use. If the server returns use file from cache then it
 will use the cached file otherwise it will load the revised version from
 the server.

 First questions would then be what is the header returned as part of the
 original file request. Is it no-cache or does it set a very short expiry?


I have not explicitly set any such header parameters. Here is the code for
index.html:

htmlhead
SCRIPT language=JavaScript
!--
window.location=preload.py?width= + screen.width;
//--
/SCRIPT
/head/html

and here is preload.py:

#!/usr/bin/python

import cgitb; cgitb.enable()
import cgi
import sys,os
sys.path.append(os.getcwd())

form = cgi.FieldStorage()
width = form.getfirst('width','800')

lines = '''#!/usr/bin/python

def width():
  return %s

if __name__ == '__main__':
  width
''' % width
f = 'width.py'
try:
  os.remove(f)
except OSError:
  pass
f = open(f, 'w')
f.writelines(lines)
f.close()
os.chmod('width.py', 0755)
print Content-Type: text/html
print
print '''
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Frameset//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd;
head xmlns=http://www.w3.org/1999/xhtml;
meta http-equiv=REFRESH content=0;url=preloader.swf /
/head
/html
'''

I supplied earlier the code that generates that swf.

Are the url's exactly identical or is there any kind of query string
 associated with the url of one request but not the other?


See above.


 This might be walking on thin ice here, but can you see the file in the
 browser's cache?


I can't figure out where Safari's cache is :( I just tried googling without
success. Lots asking the same question...


 Back in the day, when I was doing Director development, there was a period
 of time that elapsed from when Shockwave loaded the file and the time that
 it went into the browser's cache. The file was always available within the
 Shockwave environment but it was immediately visible in the browser's cache.
 Don't know if a similar situation arises with Flash where the content is
 loaded but hasn't yet been written into the browser's cache.

 I'd honestly start out by using something like Internet Explorer where you
 can easily browse the cached files - blow away the cache and then load your
 swf preloader app. See if the files are in cache. If they are cool, note the
 URL associated with them. Then I'd go back and clear the cache again and
 re-run the app with the new window code in place. I'd run it through to
 completion and see if there are two copies of said image in cache one from
 the swf preloader and the other from the new window. If so it would imply
 that they must be seeing slightly different urls.


Well in that case, before I d/l Exploiter, they are indeed seeing different
urls, as you can see from the above.


 If not then I'd be looking for no cache headers. Concurrent to this I'd be
 using something like Fiddler (IE), Charles or Tamper Data or similar app
 that will allow you to see the requests and the responses and be able to
 examine the headers and check for no-cache or very short expiry on the
 headers.


Please advise me on what I've answered above if you believe that's where the
problem lies. Otherwise, I'll start experimenting with what you've
recommended here below.
TIA,
V
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 9:31 AM, kennethkawam...@gmail.com 
kennethkawam...@gmail.com wrote:

 If aChild is a public property of your currentTarget, your code would
 work.

 If not you can use getChildByName()/getChildAt()


It isn't, so I tried this code:

trace(e.currentTarget.getChildByName(aChild).text);

and while it didn't error, it didn't trace anything when I moused over :(
TIA,
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 10:20 AM, Susan Day suzieprogram...@gmail.comwrote:

 On Wed, Mar 10, 2010 at 9:31 AM, kennethkawam...@gmail.com 
 kennethkawam...@gmail.com wrote:

 If aChild is a public property of your currentTarget, your code would
 work.

 If not you can use getChildByName()/getChildAt()


 It isn't, so I tried this code:

 trace(e.currentTarget.getChildByName(aChild).text);

 and while it didn't error, it didn't trace anything when I moused over :(


Oops. My bad. Moused over the wrong widget. It threw this error:

1009: Cannot access a property or method of a null object.

Now, aChild is generated anew with every iteration; however, it's obviously
bound to the currentTarget. Please advise.
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Apparently Doesn't Check Cache

2010-03-10 Thread Karina Steffens
Hi Nathan,

The urls are the best way IMHO. Check out my blog entry on the subject: 
http://neo-archaic.ie/blog/2006/08/nocache-for-javascript-and-flash/

Cheers,
Karina

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
 boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik
 Sent: 10 March 2010 2:03
 To: Flash Coders List
 Subject: Re: [Flashcoders] Apparently Doesn't Check Cache
 
 I actually have experienced the reverse of this issue. Flash caches the
 dynamic content so hard that I have reverted to using no_cache meta
 tags in my HTML.
 Not to OT the topic, but are meta tags the best way to prevent this? I
 have even though of adding a variable at the end of my dynamic urls
 with a date element so flash would constantly think its a new XML doc
 to load everytime.
 
 
 Nathan Mynarcik
 Interactive Web Developer
 nat...@mynarcik.com
 254.749.2525
 www.mynarcik.com
 
 -Original Message-
 From: mark.jonk...@comcast.net
 Date: Wed, 10 Mar 2010 13:46:08
 To: Flash Coders Listflashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Apparently Doesn't Check Cache
 
 Every request for a file will go back to the server at some level. For
 example, despite the fact that have a file preloaded' into cache when
 another request is made for the file it will look at the cache then
 send a request to the server to see if the file has changed or whether
 the file in cache is valid to use. If the server returns use file from
 cache then it will use the cached file otherwise it will load the
 revised version from the server.
 
 First questions would then be what is the header returned as part of
 the original file request. Is it no-cache or does it set a very short
 expiry? Are the url's exactly identical or is there any kind of query
 string associated with the url of one request but not the other? This
 might be walking on thin ice here, but can you see the file in the
 browser's cache? Back in the day, when I was doing Director
 development, there was a period of time that elapsed from when
 Shockwave loaded the file and the time that it went into the
 browser's cache. The file was always available within the Shockwave
 environment but it was immediately visible in the browser's cache.
 Don't know if a similar situation arises with Flash where the content
 is loaded but hasn't yet been written into the browser's cache.
 
 I'd honestly start out by using something like Internet Explorer where
 you can easily browse the cached files - blow away the cache and then
 load your swf preloader app. See if the files are in cache. If they are
 cool, note the URL associated with them. Then I'd go back and clear the
 cache again and re-run the app with the new window code in place. I'd
 run it through to completion and see if there are two copies of said
 image in cache one from the swf preloader and the other from the new
 window. If so it would imply that they must be seeing slightly
 different urls. If not then I'd be looking for no cache headers.
 Concurrent to this I'd be using something like Fiddler (IE), Charles or
 Tamper Data or similar app that will allow you to see the requests and
 the responses and be able to examine the headers and check for no-cache
 or very short expiry on the headers.
 
 Theoretically what you are doing should work, I can't see how placing
 the image on stage would make any difference. Everything is always a
 possibility but using a test strategy that stepwise verifies what is
 getting written into cache and what the request are for the files is a
 good first step in eliminating many issues.
 
 Sincerely
 Mark R. Jonkman
 ___
 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] Passing Call To Child

2010-03-10 Thread Geografiek

Hi Susan,
The error means that 'e.currentTarget.getChildByName(aChild).text'  
dies not exist.
I think the syntax should read e.currentTarget.getChildByName 
(aChild).text (quotes around aChild as the name of an object is a  
string)

HTH
Willem van den Goorbergh

On 10-mrt-2010, at 15:22, Susan Day wrote:

On Wed, Mar 10, 2010 at 10:20 AM, Susan Day  
suzieprogram...@gmail.comwrote:



On Wed, Mar 10, 2010 at 9:31 AM, kennethkawam...@gmail.com 
kennethkawam...@gmail.com wrote:

If aChild is a public property of your currentTarget, your code  
would

work.

If not you can use getChildByName()/getChildAt()



It isn't, so I tried this code:

trace(e.currentTarget.getChildByName(aChild).text);

and while it didn't error, it didn't trace anything when I moused  
over :(




Oops. My bad. Moused over the wrong widget. It threw this error:

1009: Cannot access a property or method of a null object.

Now, aChild is generated anew with every iteration; however, it's  
obviously

bound to the currentTarget. Please advise.
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31) 
30-2719512 or cell phone: (+31)6-26372378

or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=




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


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 10:38 AM, Geografiek geograf...@geografiek.nlwrote:

 Hi Susan,
 The error means that 'e.currentTarget.getChildByName(aChild).text' dies not
 exist.


But it does too exist! Not fair! :(


 I think the syntax should read
 e.currentTarget.getChildByName(aChild).text (quotes around aChild as the
 name of an object is a string)


That made sense, but it still threw the same error. So I tried this:

trace(e.currentTarget.numChildren);

and that, too, threw the same error, collaborating with your evaluation.
However, I have these lines in the code that calls the function wherein the
trace is defined:

mySprite.addChild(aChild);
addChild(mySprite);

so clearly, mySprite, which is the currentTarget:

mySprite.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);

does indeed have a child. (This is beginning to remind me of certain
deadbeat fathers who divorce their wives and don't pay alimony lol.) What
do?
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Apparently Doesn't Check Cache

2010-03-10 Thread mark . jonkman
Really quick answer because I need to run to a meeting: 

Safari - I assume you are on Mac then. 

Safari open the activity monitor and you can see the requests. Validate that 
the urls for the image are the same. 

Download either Charles or another monitor type utility - if you have FireFox 
use FireBug extension. You can then see the actual requests and the detailed 
headers. Then you can look for things like no-cache headers. 

Don't bother with IE unless your on windows. 

There are some extensions for FireFox I believe that will let you view the 
cache as well. IE's cache on *windows* is just easy to see the files and the 
urls they came from so if you were on windows its a great low budget easy thing 
to do. 

Sincerely 
Mark R. Jonkman 

- Original Message - 
From: Victor Subervi victorsube...@gmail.com 
To: Flash Coders List flashcoders@chattyfig.figleaf.com 
Sent: Wednesday, March 10, 2010 9:08:55 AM GMT -05:00 US/Canada Eastern 
Subject: Re: [Flashcoders] Apparently Doesn't Check Cache 

On Wed, Mar 10, 2010 at 9:46 AM, mark.jonk...@comcast.net wrote: 

 Every request for a file will go back to the server at some level. For 
 example, despite the fact that have a file preloaded' into cache when 
 another request is made for the file it will look at the cache then send a 
 request to the server to see if the file has changed or whether the file in 
 cache is valid to use. If the server returns use file from cache then it 
 will use the cached file otherwise it will load the revised version from 
 the server. 
 
 First questions would then be what is the header returned as part of the 
 original file request. Is it no-cache or does it set a very short expiry? 


I have not explicitly set any such header parameters. Here is the code for 
index.html: 

htmlhead 
SCRIPT language=JavaScript 
!-- 
window.location=preload.py?width= + screen.width; 
//-- 
/SCRIPT 
/head/html 

and here is preload.py: 

#!/usr/bin/python 

import cgitb; cgitb.enable() 
import cgi 
import sys,os 
sys.path.append(os.getcwd()) 

form = cgi.FieldStorage() 
width = form.getfirst('width','800') 

lines = '''#!/usr/bin/python 

def width(): 
return %s 

if __name__ == '__main__': 
width 
''' % width 
f = 'width.py' 
try: 
os.remove(f) 
except OSError: 
pass 
f = open(f, 'w') 
f.writelines(lines) 
f.close() 
os.chmod('width.py', 0755) 
print Content-Type: text/html 
print 
print ''' 
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Frameset//EN  
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd; 
head xmlns=http://www.w3.org/1999/xhtml; 
meta http-equiv=REFRESH content=0;url=preloader.swf / 
/head 
/html 
''' 

I supplied earlier the code that generates that swf. 

Are the url's exactly identical or is there any kind of query string 
 associated with the url of one request but not the other? 


See above. 


 This might be walking on thin ice here, but can you see the file in the 
 browser's cache? 


I can't figure out where Safari's cache is :( I just tried googling without 
success. Lots asking the same question... 


 Back in the day, when I was doing Director development, there was a period 
 of time that elapsed from when Shockwave loaded the file and the time that 
 it went into the browser's cache. The file was always available within the 
 Shockwave environment but it was immediately visible in the browser's cache. 
 Don't know if a similar situation arises with Flash where the content is 
 loaded but hasn't yet been written into the browser's cache. 
 
 I'd honestly start out by using something like Internet Explorer where you 
 can easily browse the cached files - blow away the cache and then load your 
 swf preloader app. See if the files are in cache. If they are cool, note the 
 URL associated with them. Then I'd go back and clear the cache again and 
 re-run the app with the new window code in place. I'd run it through to 
 completion and see if there are two copies of said image in cache one from 
 the swf preloader and the other from the new window. If so it would imply 
 that they must be seeing slightly different urls. 


Well in that case, before I d/l Exploiter, they are indeed seeing different 
urls, as you can see from the above. 


 If not then I'd be looking for no cache headers. Concurrent to this I'd be 
 using something like Fiddler (IE), Charles or Tamper Data or similar app 
 that will allow you to see the requests and the responses and be able to 
 examine the headers and check for no-cache or very short expiry on the 
 headers. 
 

Please advise me on what I've answered above if you believe that's where the 
problem lies. Otherwise, I'll start experimenting with what you've 
recommended here below. 
TIA, 
V 
___ 
Flashcoders mailing list 
Flashcoders@chattyfig.figleaf.com 
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] Passing Call To Child

2010-03-10 Thread Merrill, Jason
 That is, I need to target not e.currentTarget but the child of the
same
(aChild). How do I do that?

Personally, I think this is the wrong approach.  Dispatch events with
event bubbling or a design pattern like MVC with events instead.  You
should not couple your code so tightly to parent/child relationships in
my opinion.  Continuing down the path of targeting children, parents,
grandparents, etc. will only bring headache and heartache for you and
anyone else who has to touch your code in the future.


Jason Merrill 

Bank of  America  Global Learning 
Learning  Performance Solutions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)


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


[Flashcoders] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Anthony Pace

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered as 
the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand active 
listeners, I only want to have 1 listener in the container monitoring 
for mouse movement, click, releases, etc... and knowing which child 
object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Geografiek

Yes I sent that to the wish list, to make AS4 fairer. ;-)
Did you try the quotes?
Willem

On 10-mrt-2010, at 15:58, Susan Day wrote:

On Wed, Mar 10, 2010 at 10:38 AM, Geografiek  
geograf...@geografiek.nlwrote:



Hi Susan,
The error means that 'e.currentTarget.getChildByName(aChild).text'  
dies not

exist.



But it does too exist! Not fair! :(



I think the syntax should read
e.currentTarget.getChildByName(aChild).text (quotes around  
aChild as the

name of an object is a string)



That made sense, but it still threw the same error. So I tried this:

trace(e.currentTarget.numChildren);

and that, too, threw the same error, collaborating with your  
evaluation.
However, I have these lines in the code that calls the function  
wherein the

trace is defined:

mySprite.addChild(aChild);
addChild(mySprite);

so clearly, mySprite, which is the currentTarget:

mySprite.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);

does indeed have a child. (This is beginning to remind me of certain
deadbeat fathers who divorce their wives and don't pay alimony  
lol.) What

do?
Susan
___
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] OOP Books (OT)

2010-03-10 Thread Mattheis, Erik (MIN - WSW)
I got AS 3 w/Design Patterns right when I delved into AS3 and I found the 
examples too long and complicated to follow. I would not recommend it as an 
introduction to OOP.

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Susan Day
Sent: Wednesday, March 10, 2010 6:14 AM
To: Flash Coders List
Subject: Re: [Flashcoders] OOP Books (OT)

On Mon, Mar 8, 2010 at 6:18 AM, Geografiek geograf...@geografiek.nl wrote:

 Hi Susan,
 I liked 'The Object-Oriented Thought Process' by Matt Weisfeld (not
 Actionscript)
 and of course Colin Moock's 'Essential Actionscript 3.0'


I don't find Moock's book helps much on this subject. Thanks for your
recommendation, and also Mark Burvill's recommendation of Advanced
Actionscript 3 with Design Patterns.
Susan
___
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] Error in externally loaded SWF

2010-03-10 Thread Fahim Akhter
hi,

I have a class loadSWF which is responsible for loading SWF's when a swf
load is completed it triggers a custom event. Which the parent class catches
and adds it in the appropriate place.

Now apart from this the main as of my project needs to use this swf e.g
transform a perticular movieClip instance in the loaded SWF.

The issue is when in the main highest level class I try to access it, its
never loaded. When I debug the code. The SWFload complete is called after
processing everything else (including the main class) which is an issue. I
can't just do all the work of my program in the swfloadcomplete function. I
need to work on it in some other classes. Any clues?

Fahim Akhter
Game Developer | White Rabbit Studios |
http://apps.facebook.com/feline-frenzy/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 11:23 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

  That is, I need to target not e.currentTarget but the child of the
 same
 (aChild). How do I do that?

 Personally, I think this is the wrong approach.  Dispatch events with
 event bubbling or a design pattern like MVC with events instead.  You
 should not couple your code so tightly to parent/child relationships in
 my opinion.  Continuing down the path of targeting children, parents,
 grandparents, etc. will only bring headache and heartache for you and
 anyone else who has to touch your code in the future.


Example?
TIA,
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 12:04 PM, Geografiek geograf...@geografiek.nlwrote:

 Yes I sent that to the wish list, to make AS4 fairer. ;-)
 Did you try the quotes?


Yes, to no avail :(
Other ideas?
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Anthony Pace
I guess I should have noted that I also need to know which objects are 
underneath too.


On 3/10/2010 10:38 AM, Anthony Pace wrote:

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered 
as the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand 
active listeners, I only want to have 1 listener in the container 
monitoring for mouse movement, click, releases, etc... and knowing 
which child object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
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] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Anthony Pace
it is damned obvious that I have to use something like to find out which 
one is at the top... but how am I to tell which ones are underneath?  I 
remember there was a way, but I can't remember what that way was.


import flash.events.MouseEvent;
function eMH(e:MouseEvent){
trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

On 3/10/2010 10:38 AM, Anthony Pace wrote:

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered 
as the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand 
active listeners, I only want to have 1 listener in the container 
monitoring for mouse movement, click, releases, etc... and knowing 
which child object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
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] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Glen Pike

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html#getObjectsUnderPoint%28%29

Anthony Pace wrote:
it is damned obvious that I have to use something like to find out 
which one is at the top... but how am I to tell which ones are 
underneath?  I remember there was a way, but I can't remember what 
that way was.


import flash.events.MouseEvent;
function eMH(e:MouseEvent){
trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

On 3/10/2010 10:38 AM, Anthony Pace wrote:

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered 
as the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand 
active listeners, I only want to have 1 listener in the container 
monitoring for mouse movement, click, releases, etc... and knowing 
which child object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
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] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Anthony Pace
I meant to say that: it is damned obvious that you should use something 
like the code beneath if all I am interested in is the top most child:


import flash.events.MouseEvent;
function eMH(e:MouseEvent){
trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

But I am also interested in which children are underneath...  how do you 
go about doing that in AS3?  if I don't get a response I will repost as 
a different topic.


On 3/10/2010 11:39 AM, Anthony Pace wrote:
it is damned obvious that I have to use something like to find out 
which one is at the top... but how am I to tell which ones are 
underneath?  I remember there was a way, but I can't remember what 
that way was.


import flash.events.MouseEvent;
function eMH(e:MouseEvent){
trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

On 3/10/2010 10:38 AM, Anthony Pace wrote:

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered 
as the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand 
active listeners, I only want to have 1 listener in the container 
monitoring for mouse movement, click, releases, etc... and knowing 
which child object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
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] Apparently Doesn't Check Cache

2010-03-10 Thread Victor Subervi
On Wed, Mar 10, 2010 at 11:15 AM, mark.jonk...@comcast.net wrote:

 Safari - I assume you are on Mac then.


Affirmative.


 Download either Charles or another monitor type utility - if you have
 FireFox use FireBug extension. You can then see the actual requests and the
 detailed headers. Then you can look for things like no-cache headers.


Decided to go with FF, d'l'd same, doesn't want to render Flash right now
and the plug-in didn't seem to plug in. At any rate, it did cache the assets
when I loaded the page, FireBug reported nothing amiss. What now?
TIA,
V
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread kennethkawam...@gmail.com
If you trace e.currentTarget what do you get?
-- 
Kenneth Kawamoto
http://www.materiaprima.co.uk/

On 10 March 2010 14:58, Susan Day suzieprogram...@gmail.com wrote:
 On Wed, Mar 10, 2010 at 10:38 AM, Geografiek geograf...@geografiek.nlwrote:

 Hi Susan,
 The error means that 'e.currentTarget.getChildByName(aChild).text' dies not
 exist.


 But it does too exist! Not fair! :(


 I think the syntax should read
 e.currentTarget.getChildByName(aChild).text (quotes around aChild as the
 name of an object is a string)


 That made sense, but it still threw the same error. So I tried this:

 trace(e.currentTarget.numChildren);

 and that, too, threw the same error, collaborating with your evaluation.
 However, I have these lines in the code that calls the function wherein the
 trace is defined:

 mySprite.addChild(aChild);
 addChild(mySprite);

 so clearly, mySprite, which is the currentTarget:

 mySprite.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);

 does indeed have a child. (This is beginning to remind me of certain
 deadbeat fathers who divorce their wives and don't pay alimony lol.) What
 do?
 Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 thousand child objects in a container, but only 1 listener in parent

2010-03-10 Thread Anthony Pace

Awesome... Thank you Glen.  I knew I wasn't imagining things.

On 3/10/2010 11:48 AM, Glen Pike wrote:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html#getObjectsUnderPoint%28%29 



Anthony Pace wrote:
it is damned obvious that I have to use something like to find out 
which one is at the top... but how am I to tell which ones are 
underneath?  I remember there was a way, but I can't remember what 
that way was.


import flash.events.MouseEvent;
function eMH(e:MouseEvent){
trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

On 3/10/2010 10:38 AM, Anthony Pace wrote:

if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being 
rendered as the top most layer at a given x,y position?


I don't want to have a thousand contained objects with a thousand 
active listeners, I only want to have 1 listener in the container 
monitoring for mouse movement, click, releases, etc... and knowing 
which child object the mouse is hovering over/clicking etc...


What is the fastest way to do this?
___
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] Convert Flex to FLA

2010-03-10 Thread Mattheis, Erik (MIN - WSW)
Is there a way to convert a Flex 3 project to Flash? Tried decompiling the SWF 
with FlashDecompiler, but it decompiles it back into a Flex project.

I inherited a complex Flex project and have to deliver major edits to it in 2 
weeks ... things is, I've not worked in Flex before!

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year

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


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 1:21 PM, kennethkawam...@gmail.com 
kennethkawam...@gmail.com wrote:

 If you trace e.currentTarget what do you get?


[object Sprite]
1

The 1 is from this line, which follows:

trace(e.currentTarget.numChildren);

So lo and behold, apparently currentTarget does indeed have a child (I'm
vindicated!).

So I changed the line which used getChildByName to getChildAt and entered
the value 0 and now all works well. But why didn't getChildByName work?
How can I find the name of the child?
TIA,
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 2:20 PM, Susan Day suzieprogram...@gmail.comwrote:

 On Wed, Mar 10, 2010 at 1:21 PM, kennethkawam...@gmail.com 
 kennethkawam...@gmail.com wrote:

 If you trace e.currentTarget what do you get?


 [object Sprite]
 1

 The 1 is from this line, which follows:

 trace(e.currentTarget.numChildren);

 So lo and behold, apparently currentTarget does indeed have a child (I'm
 vindicated!).

 So I changed the line which used getChildByName to getChildAt and entered
 the value 0 and now all works well. But why didn't getChildByName work?
 How can I find the name of the child?


Well, correction. getChildAt(0).htmlText gives me, of course, the full html
text:
a href='index.html'Home/a
which, obviously, is not what I want. I tried to change htmlText to just the
link, but of course that screwed up the display of the name of the nav
widget (which should be Home not the whole blooming link). So I tried to
cheat and use the name property and assign the url to it, but it didn't
assign and chose its own name. What do?

 TIA,
 Susan

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


Re: [Flashcoders] OOP Books (OT)

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 12:23 PM, Mattheis, Erik (MIN - WSW) 
ematth...@webershandwick.com wrote:

 I got AS 3 w/Design Patterns right when I delved into AS3 and I found the
 examples too long and complicated to follow. I would not recommend it as an
 introduction to OOP.


Noted. And your thoughts, if any, on The Object-Oriented Thought Process?
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Nathan Mynarcik
If you are putting the sprite in an MC and then doing mc.name = myName it 
should then return the name of the mc. Sprite however does not have the name 
property. 


--Original Message--
From: Susan Day
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] Passing Call To Child
Sent: Mar 10, 2010 12:20 PM

On Wed, Mar 10, 2010 at 1:21 PM, kennethkawam...@gmail.com 
kennethkawam...@gmail.com wrote:

 If you trace e.currentTarget what do you get?


[object Sprite]
1

The 1 is from this line, which follows:

trace(e.currentTarget.numChildren);

So lo and behold, apparently currentTarget does indeed have a child (I'm
vindicated!).

So I changed the line which used getChildByName to getChildAt and entered
the value 0 and now all works well. But why didn't getChildByName work?
How can I find the name of the child?
TIA,
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Nathan Mynarcik
Interactive Web Developer
nat...@mynarcik.com
254.749.2525
www.mynarcik.com

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


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Susan Day
On Wed, Mar 10, 2010 at 2:32 PM, Nathan Mynarcik nat...@mynarcik.comwrote:

 If you are putting the sprite in an MC and then doing mc.name = myName
 it should then return the name of the mc. Sprite however does not have the
 name property.


The plot thickens. So I changed my Sprite to an MC and then I discovered I
could add a text or htmlText property to it. So I did and tried to use them
in my navigation function

e.currentTarget.htmlText

for example, now no need to call the child (so I thought). But it's
stubborn. No matter what value I assign to the text or htmlText, it wants to
give it the name property. Good grief. What up? Or can I somehow assign a
value to the child that will properly pass nothing but the url?
TIA,
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Convert Flex to FLA

2010-03-10 Thread Kerry Thompson
Erik Mattheis wrote:

 Is there a way to convert a Flex 3 project to Flash? Tried decompiling the 
 SWF with FlashDecompiler, but it decompiles it back into a Flex project.

 I inherited a complex Flex project and have to deliver major edits to it in 2 
 weeks ... things is, I've not worked in Flex before!

There is nothing to fear from Flex. It's just another AS3 coding
environment, and it's pretty easy to use. Your real challenge is to
learn a new code base and edit it in two weeks. The environment
shouldn't make that much difference.

It my not be possible to do it in Flash, also. If there are Flex
components, they probably won't work in Flash. Also, there are things
in Flex, like data grids, that don't port easily to Flash. Also, if
anything significant has been done in MXML, you're pretty much stuck
with Flex (which is a good thing, actually).

But, having said that, if you really want to work in Flash, and there
are no roadblocks, you can look at the Flex project, find the .as file
that is the starting point and make that your document class.

Cordially,

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


RE: [Flashcoders] OOP Books (OT)

2010-03-10 Thread Benny
Hi Susan I cannot recommend any OOP book but I can recommend Lynda.com. 
Lynda.com has some great video courses, like
http://www.lynda.com/home/DisplayCourse.aspx?lpk2=759
Which amongst other covers OOP fundamentals and common design patterns.


- Benny

-Oorspronkelijk bericht-
Van: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] Namens Susan Day
Verzonden: woensdag 10 maart 2010 19:29
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] OOP Books (OT)

On Wed, Mar 10, 2010 at 12:23 PM, Mattheis, Erik (MIN - WSW) 
ematth...@webershandwick.com wrote:

 I got AS 3 w/Design Patterns right when I delved into AS3 and I found the
 examples too long and complicated to follow. I would not recommend it as
an
 introduction to OOP.


Noted. And your thoughts, if any, on The Object-Oriented Thought Process?
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

__ Informatie van ESET NOD32 Antivirus, versie van database
viruskenmerken 4932 (20100310) __

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com



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


RE: [Flashcoders] OOP Books (OT)

2010-03-10 Thread Mattheis, Erik (MIN - WSW)
I'm just getting the hang of AS 3 - I learn more from looking at examples than 
reading books front to back, but it was using Foundation Actionscript 3.0 
Animation: Making Things Move! when I felt like things started clicking.

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Susan Day
Sent: Wednesday, March 10, 2010 12:29 PM
To: Flash Coders List
Subject: Re: [Flashcoders] OOP Books (OT)

On Wed, Mar 10, 2010 at 12:23 PM, Mattheis, Erik (MIN - WSW) 
ematth...@webershandwick.com wrote:

 I got AS 3 w/Design Patterns right when I delved into AS3 and I found the
 examples too long and complicated to follow. I would not recommend it as an
 introduction to OOP.


Noted. And your thoughts, if any, on The Object-Oriented Thought Process?
Susan
___
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] OOP Books (OT)

2010-03-10 Thread Nathan Mynarcik
I second this recommendation from personal experience. Great learning 
experience and can help you with more than just Flash. 

They just recently started doing month by month subscriptions. 


--Original Message--
From: Benny
Sender: flashcoders-boun...@chattyfig.figleaf.com
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: RE: [Flashcoders] OOP Books (OT)
Sent: Mar 10, 2010 1:06 PM

Hi Susan I cannot recommend any OOP book but I can recommend Lynda.com. 
Lynda.com has some great video courses, like
http://www.lynda.com/home/DisplayCourse.aspx?lpk2=759
Which amongst other covers OOP fundamentals and common design patterns.


- Benny

-Oorspronkelijk bericht-
Van: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] Namens Susan Day
Verzonden: woensdag 10 maart 2010 19:29
Aan: Flash Coders List
Onderwerp: Re: [Flashcoders] OOP Books (OT)

On Wed, Mar 10, 2010 at 12:23 PM, Mattheis, Erik (MIN - WSW) 
ematth...@webershandwick.com wrote:

 I got AS 3 w/Design Patterns right when I delved into AS3 and I found the
 examples too long and complicated to follow. I would not recommend it as
an
 introduction to OOP.


Noted. And your thoughts, if any, on The Object-Oriented Thought Process?
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

__ Informatie van ESET NOD32 Antivirus, versie van database
viruskenmerken 4932 (20100310) __

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com



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


Nathan Mynarcik
Interactive Web Developer
nat...@mynarcik.com
254.749.2525
www.mynarcik.com

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


RE: [Flashcoders] OOP Books (OT)

2010-03-10 Thread Benny
http://www.adobe.com/devnet/actionscript/articles/oop_as3.html



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


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Karl DeSaulniers
Can u give the text box a variable name and reference that instead of  
the .text or .htmlText value?


Karl

Sent from losPhone

On Mar 10, 2010, at 12:47 PM, Susan Day suzieprogram...@gmail.com  
wrote:


On Wed, Mar 10, 2010 at 2:32 PM, Nathan Mynarcik  
nat...@mynarcik.comwrote:


If you are putting the sprite in an MC and then doing mc.name =  
myName
it should then return the name of the mc. Sprite however does not  
have the

name property.



The plot thickens. So I changed my Sprite to an MC and then I  
discovered I
could add a text or htmlText property to it. So I did and tried to  
use them

in my navigation function

e.currentTarget.htmlText

for example, now no need to call the child (so I thought). But it's
stubborn. No matter what value I assign to the text or htmlText, it  
wants to
give it the name property. Good grief. What up? Or can I somehow  
assign a

value to the child that will properly pass nothing but the url?
TIA,
Susan
___
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] Passing Call To Child

2010-03-10 Thread Kenneth Kawamoto

If I understand you correctly you want to trace index.html?

One funky way is...

trace(new XML(a href='index.html'Home/a)@href);
// traces index.html

...therefore if your e.currentTarget.getChildAt(0).htmlText is giving 
you a href='index.html'Home/a you can do:


trace(new XML(e.currentTarget.getChildAt(0).htmlText)@href);

Or you can use RegExp to extract the string without using XML.

But this is crazy, really ;)

You should not need to use getChildByName/getChildAt at all for this.

Just extend Sprite and create public property, so that you can for 
example just do


trace(e.target.href);

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Susan Day wrote:

On Wed, Mar 10, 2010 at 2:20 PM, Susan Day suzieprogram...@gmail.comwrote:


On Wed, Mar 10, 2010 at 1:21 PM, kennethkawam...@gmail.com 
kennethkawam...@gmail.com wrote:


If you trace e.currentTarget what do you get?


[object Sprite]
1

The 1 is from this line, which follows:

trace(e.currentTarget.numChildren);

So lo and behold, apparently currentTarget does indeed have a child (I'm
vindicated!).

So I changed the line which used getChildByName to getChildAt and entered
the value 0 and now all works well. But why didn't getChildByName work?
How can I find the name of the child?



Well, correction. getChildAt(0).htmlText gives me, of course, the full html
text:
a href='index.html'Home/a
which, obviously, is not what I want. I tried to change htmlText to just the
link, but of course that screwed up the display of the name of the nav
widget (which should be Home not the whole blooming link). So I tried to
cheat and use the name property and assign the url to it, but it didn't
assign and chose its own name. What do?


TIA,
Susan

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


Re: [Flashcoders] Passing Call To Child

2010-03-10 Thread Paul Andrews

On 10/03/2010 12:05, Susan Day wrote:

Hi;
I have this line of code that I need to fix:

myFunction(e.currentTarget[aChild].text);

That is, I need to target not e.currentTarget but the child of the same
(aChild). How do I do that?
TIA.
Susan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

   


Sue, I have glanced over the thread and it looks like you may be making 
something more complicated than it needs to be. It might be an idea to 
explain exactly what the problem is (and I don't mean at such a low 
level), then you might get a better answer than the ones to the 
questions that you are asking.


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


[Flashcoders] SharedObject slot seems to be inaccessible

2010-03-10 Thread ktt
Hello,

I use the same applet to connect to FMS.
If I login as admin, create two slots:

createFMSConn.sharedWObject.data[adminactive] = Admin active;
createFMSConn.sharedWObject.data[guestactive] = Guest nonactive;
createFMSConn.sharedWObject.setDirty(admina ctive);
createFMSConn.sharedWObject.setDirty(guesta ctive);
createFMSConn.sharedWObject.connect(_createFMSConn);

After I login as Guest(Admin still logged in):

createFMSConn.sharedWObject.data[guestactive] = Guest active;
createFMSConn.sharedWObject.setDirty(guesta ctive);
createFMSConn.sharedWObject.connect(_createFMSConn);

But I can't update the slot as Guest. Slot remains with Guest nonactive. 
sharedWObject is defined as public static.
Maybe to use setProperty?

Thank you in advance,
Ktt


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


[Flashcoders] banner click tracking code problem

2010-03-10 Thread Amol
Hi list,



  I have a problem with banner tracking code 
  I am using flash banner with  player 6.0 and as 1.0
  and the code is 

  System.security.allowDomain(test.com);
  System.security.allowInsecureDomain(test.com);
  System.security.allowDomain(test.com);
  System.security.allowInsecureDomain(test.com);
  System.security.allowDomain(_parent);
  System.security.allowInsecureDomain(_parent);
  loadVariables(http://www.test.com/testing.aspx?Key=62Action=1RND=; + 
Math.random(), this);

  but cant track the click , is there any code in as 2.0


Thanx

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