This content has been marked as final. Show 14 replies
You say your code "looks like" what you have attached. Are you certain?
Could it be possible that you jpg is not in the same domain as your swf.
If so that would very likely be a feature - a security feature - of flash and not a bug.
when I googled "to access incompatible context" I found a number of links related to this, including this one, which seems pertinent:
Its also worth noting that if you are loading bitmaps (e.g. jpgs) from a different domain then you don't usually have access to the bitmap data.
There are ways to address this, such as using a helper swf to do the loading from the same domain as the bitmaps. I suspect that masking a loaded bitmap from a remote domain might be treated in the same way as being able to manipulate its bitmap data.
- Just partially informed speculation here, I didn't try it. Others may know more and either confirm this or rule it out -
i doubt that code would compile. copy and paste the relevant code when you need to display code otherwise you waste our time debugging code that you aren't using.
@kglad: lol, I didn't even look at that part. I was just thinking about the error. You're right of course. You're up early. Or late.
up early here (2 am)...
@kglad : lol, if you're up early at that time.. that's insomnia! get some sleep, man. BTW I registered with dzedward's site. I noticed you were registered there as well. There's live chat if you ever want to drop in. I'm there now (no-one else is!)
i'm going back to bed. sometimes this happens where i wake up, can't go back to sleep and just need to do something for an hour or two and then return to bed. i'm going back for sleep, part deux.
know what its like. double check you didn't mix caffeine and wine earlier. That's what does it for me. sedating effect of the alcohol wears off and exposes the residual effect of the caffeine which has a longer half life. At least that's what I learnt somewhere I think.
that's an interesting theory. i'll have to check on that.
SOrry rfkrocktk , we've kinda hijacked your thread.. please post with an update here and we'll continue to help...
@kglad good morning (again). re the caffeine thing... yeah. It may be no more than a theory that I read perhaps... but it kind of seemed, well, logical. Doesn't mean its correct though, I guess.
Here's my code.
MySQL>PHP>XML>Flash which lists buttons.
On roll over of each button, it SHOULD load the image into a movieclip which is masked to a square (hopefully soon a circle :] ). It's giving me those crazy errors.
you can't nest anonymous functions. change ultLoad() to be a named function.
and you're likely to run into problems if start a load before the previous has completed.
kglad: I think that should be ok - the function part. (Just on the basis that the OP said it was working without the mask).
The ultLoad is a regular function declaration, albeit nested - its not how I'd do it as is but if its working then guess that's ok. There is another anon function that follows, its not really nested though- its an argument for the zigo tween ; the end-of-tween callback.
The only reference to the clip named masker I see in you code is
can you put a
trace("I think masker is:"+masker)
statement in where you say is the problem code?
If what you say is true and everything else is working, then let's see what else it might be.
is the problem code.
If I comment that out, there are no problems, but if I leave it in, then crap starts flying in the output panel.
I tried tracing it, it isn't undefined, the movieclip really is there. What should I do?
Its pretty hard to tell for sure without testing your code first hand. I could look at it some time over the next few days if you post a link to a zip file with your fla and any as files.
Other than that... this is all I can suggest for the moment:
One thing you might want to try...
"Instead of setting a mask on a dynamically loaded MC, you can load the MC into a container which is itself masked".
So try loading the image into a child clip of a clip which is already masked with masker. That way you don't need to set the mask on each load.
Also it seems that someone else described your original problem in the comments on this page below. The answer they gave might help, although it seems unusual/unnecessary under normal circumstances.