haXe Forum > Add Bitmap to loaded SWF

  • Hi i have a Problem here... maybe someone has an idea.

    I Load a SWF (made with flash) to my "Mother"-SWF. Works fine.
    In my loaded SWF (the "child") i have some methods i can call from the mother-SWF.. Works fine.
    With one method for example i can change some textfields. Works fine.
    With another method i want to change a image of the Child-SWF. Here is the problem.
    I can remove the image in the Method (removeChildAt(0)) but i cannot add the one i give the method.

    If i call the method from within the Child-SWF it works.. here is my method in the child-SWF:

    function changeImage(image:Bitmap) {
    imageContainer.removeChildAt(0); //works
    imageContainer.addChild(image); //works only from call within the child-SWF
    }

    Any Ideas would be great!
    Regards,
    Thomas

  • Ok found the problem.. my fault. The time i called the method from mother-swf the image was not loaded yet.. trace gave me null. With event.COMPLETE-Listener it works fine now..

    I only have some milliseconds till the image is changed now, not great but i think i'll find a way to handle that. (i hope) :D

    i love haxe.. really nice to work with it!

< Prev | Page 1 / 1 | Next >