I then found out the line should have worked which made little sense at the time, as we'd spent ages trying to clear the bitmap in case it needed to be cleared before running a copyPixels command again.
So ended up going home with still no idea, had a few further ideas such as parameters and things to check, but somehow I still missed the obvious answer.
A further post on flash forums, posting all my code and other files so far, got a response from a really helpful person called 5TonsOfFlax, who told me what I should have realised way before, I wasn't resetting one variable, which told it where to paste the next tile using copypixels.
What this means is, after the first time it ran through, which would work fine, it would then be copying pixels and working perfectly, but it was copying to x values greater than the screen width so we never saw it! Bah!
The only thing that needed adding to fix the problem was this line:
myX = 0;
Yep, thats right, six or seven hours of painstaking troubleshooting, is fixed with 6 characters of code.
So now, in all its glory, is the shiny new version that MOVES!
(Z = LEFT, X = RIGHT, / = DOWN, ' = UP)
0 comments:
Post a Comment