[Flashcoders] [SOLVED] arguments.caller -- name of this function?

2008-07-17 Thread Leonardo Scattola - New Vision srl

Thanks everybody for your prompt response.

A dude on the FlashMedia List (on which we crossposted) proposed this 
solution:


setFunctionNames = function (pObjContainer) {
  // Description:
  // Sets the property name for every Function
  // that was found in pObjContainer
  // Arguments:
  // pObjContainer - Obj|Mc in which to recursively
  //  search for functions
  pObjContainer = pObjContainer || _root;
  for (var p in pObjContainer) {
 if (typeof pObjContainer[p] == 'object') {
   arguments.callee(pObjContainer[p]);
 } else if (typeof pObjContainer[p] == 'function') {
   pObjContainer[p].name = p; // -- sets the name
   arguments.callee(pObjContainer[p].prototype);
 }
  }
}

Quick, swift and efficient.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] arguments.caller -- name of this function?

2008-07-16 Thread Leonardo Scattola - New Vision srl

Hi list!
I apologize in advance if this question has already been asked... it is 
my little Wednesday puzzle :D


Given this sample code (AS2):

myFunction=function() {
   // call the second one:
   trace(Now calling secondFunction);
   secondFunction();
   trace(End.);
}

secondFunction=function() {
   // who summoned me?
   trace(arguments.caller= +arguments.caller);
}

The question is simple: secondFunction traces (of course) 
arguments.caller= [type Function].
Is there a method to return the name of the caller function (in this 
case myFunction)?


Thank you.

--
* Logo New Vision Leonardo Scattola*
/Research  Development/
New Vision Group

tel.049.8841146
fax049.8840366 


videoconf. newvision.comunicarepro.it http://newvision.comunicarepro.it
web site www.newvision.it http://www.newvision.it



Le informazioni contenute in questa e-mail e nei suoi eventuali allegati 
sono da intendersi confidenziali e riservate esclusivamente ai 
destinatari. Ne sono proibiti l'utilizzo e la divulgazione a qualunque 
fine senza previa autorizzazione del mittente.
Se avete ricevuto questa e-mail per errore, vi preghiamo cortesemente di 
notificarlo (via e-mail, fax, o telefono) al mittente e di distruggerla.
Tutti i messaggi elettronici sono suscettibili di alterazioni. I dati 
personali vengono trattati esclusivamente per le finalità della presente 
comunicazione in conformità con la legislazione vigente (D.L. 196/2003 
Codice Privacy).
Per qualunque informazione si prega di fare riferimento a 
[EMAIL PROTECTED] mailto:info:@newvision.it

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


Re: [Flashcoders] how to return in this function

2008-01-30 Thread Leonardo Scattola - New Vision srl

Claudio M. E. Bastos Iorio ha scritto:

Hi guys, hope you can help me on this one.

I have a class to load an XML file. I'm trying this:
  

As Eric said, remember that the Event class is your friend.

You will want to manage any asynchronous procedure (such as Remoting, 
XML parsing, NetConnection responders and millions of other features) 
by launching and listening to a couple of Events.

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


[Flashcoders] [AS3] how to tell Loader on which clip you are going to load?

2008-01-26 Thread Leonardo Scattola - New Vision srl

Hello everyone!
I wrote a little class extending the AS3 Loader class.
In my new loader I've added a reference to the clip to which attach my 
content, so that I can write


myLoader.loadImage(url, clip:MovieClip)

where loadImage is a static method; in an ideal world myLoader will 
always load an image, and will fire an Event.INIT when the image has 
been loaded; I have defined a listener for this event, like this:


function onLoadSuccessful(myEvent:Event) {
   trace(myEvent.target.loader.myClip);
}

where myEvent.target is the loaderInfo property in my event, and 
myEvent.target.loader is an instance of the myLoader object; 
myEvent.target.loader.myClip will thus be the reference to the clip on 
which I will attach my image.



The problem is: when the image doesn't exist, I would listen for an 
IOError. In this case, I have defined another listener:

function onLoadError(myEvent:IOEvent) {
   trace(myEvent.target.loader.myClip);
}

But this raises an exception if the image fails to load (because the 
file doesn't exist), and tells me that the loader is not accessible 
because the event was fired too early to access the loaderInfo property.


How can I access the myClip property in the onLoadError event?

Thanks in advance.

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


[Flashcoders] [slightly OT] Somebody could confirm this please?

2007-07-06 Thread Leonardo Scattola - New Vision srl

http://www.appleinsider.com/articles/07/07/05/mossberg_apple_working_on_adobe_flash_support_for_iphone.html

It would be a very nice thing... but if the iPhone could support the 
NetStream and NetConnection classes natively, thus permitting us to 
download / upload a live video stream, it would definitely be a 
*wonderful* thing!

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com