|
-
Dynamic MovieClip non-comprehension?
Hi, I'm new here...and I am trying to create a cross-fade between two dynamically loaded images...but I can't even get that far. I would appreciate it more than you could know if someone could please tell me what is wrong with my simple code:
Code:
createEmptyMovieClip("testImageMC");
testImageMC.loadMovie("C:\\images\\DSC_0684_filtered.jpg");
trace(testImageMC._width);
trace(testImageMC._height);
_width and _height return 0, even though the image is loaded...waaaah!! :'(
Also, the image is right in the middle of the stage, and a "moveTo(0,0)" doesn't move it at all...help me, FlashKit members, you're my only hope.
(I'm using Flash MX, not even MX 2004)
Thanks SOOO much in advance,
DC
-
Registered User
hi,
Welcome to Flash Kit.
When you load an external image, it always takes some time, which means you need to preload it in order to control it.
That's explained in loading movies.
moveTo() is a for components, it's not a movie clips' methods.
Just use the _x and _y properties.
code:
my_mc._x = 45;
my_mc._y = 23;
-
Thanks for the welcome and the info! I'll give that a whirl and get on to my next question.
I actually figured that maybe it wasn't loaded yet, so I put the traces in an OnEnterFrame function and it still kept showing (0, 0), but I just realized that the way I was looping I was reloading the image every frame...doh!!
Thanks,
DC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|