flash actionscript:
Any ideas why this does nothing? Not even throw an error? init(); // intialise the swf function init() { // load in main image this.createEmptyMovieClip("logo_mc", this.getNextHighestDepth()); _root.logo_mc.loadMovie("../images/Title_logo.png"); _root.logo_mc._width = 187; _root.logo_mc._height = 31; }
What version of Flash are you using? Dynamic PNG import is only possible in Flash Player 8 and above... -- ------------------------------- Remove '_spamkiller_' to mail -------------------------------
oops, my bad. i thought you were calling init() using setInterval().
<b>Peter Blumenthal</b> - Thanks I didn't know that, I am using Flash MX 2004 Pro. I have changed the image to a .gif and it still wont load in or error. I know my path is correct as if I change it, it will error. But no image. <b>kglad</b> - I tried manually setting the depth of the empty movie clip but still no joy. Does anyome have any ideas? Thanks.
[quoted text, click to view] > Does anyome have any ideas?
Yes. The same idea as last time ;) The only image type that Flash MX 2004 (or Flash Player 7) can load dynamically is a non-progressive JPEG. No GIFs, no PNGs. -- ------------------------------- Remove '_spamkiller_' to mail -------------------------------
OK, If I use a jpg it still doesn't work. However, I have got it working but not how I wanted to. Instead of using createEmptyMovieClip, I created one on the stage myself. This dodn't work either, but as soon as I drew some content in the movieclip it worked straight away. Why is this?
Can you show your current code please. Are you *sure* the path to your image is correct? -- ------------------------------- Remove '_spamkiller_' to mail -------------------------------
path has to be correct if it works with target created in the authoring environment. which means the problem is the createEmptyMovieClip() part of the code. and that means you're publishing for flash 6 or less or you've done more than we're able to detect in this forum. you need to be publishing for flash 7 or better to use getNextHighestDepth() and if you think you are doing that, post a link to your fla.
Don't see what you're looking for? Try a search.
|