I know a solution may already be found but this was my first thought and I
am curious how any of you feel about switch (true) for this problem
switch (true) {
case loadedDisplayObject is MovieClip:
case loadedDisplayObject is Bitmap:
}
Is switch (true) just bad practice? and does 'is' not
On Thu, Dec 2, 2010 at 3:17 AM, Karim Beyrouti ka...@kurst.co.uk wrote:
Hopefully the line breaks here wont be too bad, pasting the code:
Very nice!!! Many thanks Karim
I will test it out and let you know how it goes. :)
Have an excellent day/night!
Cheers,
Micky
Hopefully the line breaks here wont be too bad, pasting the code:
CODE
package {
import flash.utils.describeType;
import flash.utils.getQualifiedClassName;
/**
* @author karim @ kurst.co.uk
*/
public class ClassUtils {
Hello,
I am using this class:
http://code.google.com/p/as3-multiple-file-preloader/
And I need to determine the display object type (i.e. is it MovieClip
or Bitmap).
trace(getQualifiedClassName(loadedDisplayObject));
Gives me this output (in a loop of 3 images and 1 swf loaded):
Micky Hulse skriver:
trace(getQualifiedClassName(loadedDisplayObject));
Would that be the best way to test for MovieClip or Bitmap?
It fails the empty base class test. It is an extremely bad way.
___
Flashcoders mailing list
How about up-casting:
var mc:MovieClip = loadedDisplayObject as MovieClip;
if(mc) {
mc.play();
} else {
//could be a bitmap, but if it's not guaranteed, then you might
need to do more tests.
var bmp:Bitmap = loadedDisplayObject as Bitmap;
}
On 01/12/2010 22:39, Micky Hulse
Sorry, I meant downcast
On 01/12/2010 22:56, Glen Pike wrote:
How about up-casting:
var mc:MovieClip = loadedDisplayObject as MovieClip;
if(mc) {
mc.play();
} else {
//could be a bitmap, but if it's not guaranteed, then you might
need to do more tests.
var bmp:Bitmap =
Hi Henrik! Thanks for the quick reply, I really appreciate it. :)
On Wed, Dec 1, 2010 at 2:49 PM, Henrik Andersson he...@henke37.cjb.net wrote:
It fails the empty base class test. It is an extremely bad way.
Ah, I am glad I asked! :D
Any tips on a better way to test display object if it is
Hi Glen! Many thanks for the quick reply and example code. I really
appreciate it! :)
On Wed, Dec 1, 2010 at 2:56 PM, Glen Pike postmas...@glenpike.co.uk wrote:
How about up-casting:
var mc:MovieClip = loadedDisplayObject as MovieClip;
if(mc) {
mc.play();
} else {
//could be a bitmap,
On Wed, Dec 1, 2010 at 3:02 PM, Glen Pike postmas...@glenpike.co.uk wrote:
Sorry, I meant downcast
No worries!
I appreciate the code sample and help. That did the trick. :)
Cheers,
Micky
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Hi,
If your downcast does not work - the as bit - your variable will
be null -it does not throw exceptions.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#as
Glen
On 01/12/2010 23:07, Micky Hulse wrote:
Hi Glen! Many thanks for the quick
On Wed, Dec 1, 2010 at 3:25 PM, Glen Pike postmas...@glenpike.co.uk wrote:
If your downcast does not work - the as bit - your variable will be
null -it does not throw exceptions.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#as
Excellent! Thanks for
attached a class that does that, hope it helps...
example :
trace( ClassUtils.getFullClassPath( canvas ) ); // flash.display.Bitmap
trace( ClassUtils.getSuperClass( canvas ) ); // flash.display.DisplayObject
On 1 Dec 2010, at 23:40, Micky Hulse wrote:
On Wed, Dec 1, 2010 at 3:25 PM,
Karim Beyrouti skriver:
attached a class that does that, hope it helps...
The mailer ate it.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Hi Karim! Many thanks for the reply and code sample! I really
appreciate the help. :)
On Wed, Dec 1, 2010 at 5:19 PM, Karim Beyrouti ka...@kurst.co.uk wrote:
attached a class that does that, hope it helps...
Doh! Looks like the Flash Coders List does not allow attachments! :(
Do you have a
I am using loader_clip.removeChild(ldr); to remove child objects from my loader
clip, and I want to test if a child object is there before removing it. I
thought it would be something like
if (loader_clip.child !=0) { // or !=, or !=null, or ==true, or
something like that
try .numChildren property
On Wed, Nov 18, 2009 at 4:48 PM, Alan Neilsen aneil...@gotafe.vic.edu.auwrote:
I am using loader_clip.removeChild(ldr); to remove child objects from my
loader clip, and I want to test if a child object is there before removing
it. I thought it would be something like
If I understand properly what you mean, the contains method is what you're
looking for.
if (loader_clip.contains(ldr)){
loader_clip.removeChild(ldr);
}
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html#contains%28%29
On Wed, Nov 18, 2009
i always use
this is a test
do not adjust your set
a
On 11 Sep 2009, at 23:57, Glen Pike wrote:
8,16,32
Karl DeSaulniers wrote:
Aaap ya missed 3
;)
Karl
On Sep 11, 2009, at 5:45 PM, Glen Pike wrote:
1,2,4
--
Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk
1,2,4
--
Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Aaap ya missed 3
;)
Karl
On Sep 11, 2009, at 5:45 PM, Glen Pike wrote:
1,2,4
--
Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
8,16,32
Karl DeSaulniers wrote:
Aaap ya missed 3
;)
Karl
On Sep 11, 2009, at 5:45 PM, Glen Pike wrote:
1,2,4
--
Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
1,2,4
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Testing my messages are not getting through I think.
Charles P.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Yes they are.
This is a common issue with Gmail - it is 'clever' enough not to show
you your own emails to a mailing list unless they're replied to.
Ian
On Tue, Sep 16, 2008 at 3:54 PM, Charles Parcell
[EMAIL PROTECTED] wrote:
Testing my messages are not getting through I think.
Charles
Hmm I just never noticed it before. :) Thanks.
Charles P.
On Tue, Sep 16, 2008 at 11:00 AM, Ian Thomas [EMAIL PROTECTED] wrote:
Yes they are.
This is a common issue with Gmail - it is 'clever' enough not to show
you your own emails to a mailing list unless they're replied to.
Ian
On
I didn't know that, I've got the same issue. Any way to solve it?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: 16 September 2008 16:01
To: Flash Coders List
Subject: Re: [Flashcoders] Testing
Yes they are.
This is a common issue
] wrote:
I didn't know that, I've got the same issue. Any way to solve it?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: 16 September 2008 16:01
To: Flash Coders List
Subject: Re: [Flashcoders] Testing
Yes they are.
This is a common
I am testing an application extensibly localy and on the server,
there are just a comple of methods that I want them to run locally but they
need to be user initiated when running on the server.
At the moment if I post the files to the server then I comment out the
automatic calls and
On 19/03/2008 20:28, Helmut Granda wrote:
I started testing the ApplicationDomain and
ApplicationDomain.currentDomain but that still turns undefined off line and
online...
// just for testing purposes:
import flash.system.ApplicationDomain;
this.applicationDomain =
0-1-0-1
--
Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
0-1-0-1
5
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Hi, my emails to the list were bounced back and I don't know why...I
hope this not.
Regards
Gustavo Duenas
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
Testing... Please disregard...
Haven't got any email since 6/2... :(
___
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
Not getting messages. Sorry for inconvenience.
___
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
as I moved the form after
the embedded swf in the html code, it worked. Extremely weird.
-Mark
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ryan
Potter
Sent: Tuesday, April 18, 2006 3:19 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Testing
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ryan
Potter
Sent: Tuesday, April 18, 2006 3:19 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Testing ExternalInterface on Windows for
me.
I get the same as you. I looked
I am at work right now. And we only have one windows machine. We are
using some ExternalInterface functionality in one of our projects.
It's not working on out windows machine. It doesn't work in either
Firefox or Internet Explorer. It works fine in every browser on MAC.
I've been doing
Smith
Sent: Tuesday, April 18, 2006 12:12 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Testing ExternalInterface on Windows for me.
I am at work right now. And we only have one windows machine. We are
using some ExternalInterface functionality in one of our projects.
It's not working
uploaded and I am on windows too.
I will look at your source.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Smith
Sent: Tuesday, April 18, 2006 12:12 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Testing ExternalInterface on Windows for me
] On Behalf Of Aaron
Smith
Sent: Tuesday, April 18, 2006 12:22 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Testing ExternalInterface on Windows for
me.
ok, yeah I wonder if thats the issue (local). I was just testing it
locally. I'll try it on a server.
On Apr 18, 2006, at 11:17 AM
, April 18, 2006 12:46 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Testing ExternalInterface on Windows for me.
Yes I tried it out on yours and my server. works just fine. Now have
a look at this. on Firefox and IE: ( http://www.smithaaronlee.net/
jstest/ImgScrollerTEST.html )
It works
: [Flashcoders] Testing ExternalInterface on Windows for me.
I get the same as you. I looked at the external interface code that I
have and the only difference I can see is I have swLiveConnect set to
true but I don't think that is it.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
: [Flashcoders] Testing ExternalInterface on Windows for
me.
I get the same as you. I looked at the external interface code that I
have and the only difference I can see is I have swLiveConnect set to
true but I don't think that is it.
-Original Message-
From: [EMAIL PROTECTED]
[mailto
loud and clear
2006/3/31, Christian [EMAIL PROTECTED]:
testing... coming through?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought
testing... coming through?
___
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
Hi Mani -
Have you prefixed your localConnectionID with an underscore?
Try _id as opposed to id.
The other gotcha is just to make sure there aren't two instances of the
receiving swf running (as often is the case when using one of the SWF2EXE
tools), since one will capture all the messages and
forgive me if this is implied, but there's always been alot of
misunderstanding about LocalConnection..
LocalConnection is not used to send messages from one machine to
another. It's meant to send messages between 2 or more swf files on
the same machine whether in browser or .exe
again, don't
Alan- They're both on the same machine but thanks for clearing that up
either way.
I was thinking that I could test a file sitting on the server using a local
swf file and the local connection. I tried putting the domain permission
etc but to no avail. Finally I resolved to just placing the
Mani -
Read here forthwith and whereas the underscore is important:
http://www.macromedia.com/support/flash/action_scripts/local_connection_objects/local_connection_object07.html
best, - rajat
On 3/29/06, Manuel Saint-Victor [EMAIL PROTECTED] wrote:
Alan- They're both on the same machine but
testing
___
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
Test 2.
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
Just a test.
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
will I see my own post?
e.d.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
54 matches
Mail list logo