Hi,
If your loaded asset is a swf, you cannot just access the
bitmapData property - it does not have one.
However, you can draw the contents of a MovieClip / Sprite /
DisplayObject into a BitmapData object, which you can then pass to the
constructor of a Bitmap.
Hi all,
Just curious and I think it may shed a little light on this issue,
but isn't there a way to grab another SWFs library assets and
plug them into your own swf? If so, then you could just assign ids to
the
loaded library assets and then call on them in your swf??
I thought I remembered
@ACE
You may want to separate your function calls for each type of file.
IE: using your bitmap function for png, jpg, gif, etc.
Then another function that just loads the swf files in a MC the way
they come?
But I think Henrik is right here, you cant load a SWF as if it was an
image. Its a
There are several ways to get at the assets. The most obvious one is to
simple ask the code in the loaded swf to give you what you want. You can
use all the fancy factory patterns that you've been reading about this way.
Personally I keep it simple and just store each thing in an object that
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
Exhausted Google.
Setup: Pure AS3 project in Flashbuilder, I have embedded an external .swf into
the main .swf using an [Embed] metadata tag.
[Embed(source=source/deploy/ScenePresenterTimeline.swf)]
public var ScenePresenterTimeline:Class;
...
var scenePresenterTimelineSprite:Sprite = new
Nevermind - found the answer:
scenePresenterTimelineSprite.getChildAt(0)[contentLoaderInfo][sharedEvents].addEventListener(TimelineEvent.NEXT_CLICKED,
onTimelineNextClicked);
Jason Merrill
Instructional Technology Architect
Bank of America Global Learning
___
18 matches
Mail list logo