Hello!
I am trying to adapt a flash game developed for the browser to the iphone.
The game is similar to the old windows game where you have a pannel whith hundreds of cells and you have to dicover where are the bombs without activate it.
I had a big amount of vectors that represent each cell in the game, the problems comes when I try tu run it in the iphone, is to slow, imposible to reder all the cells.
I tried using cacheAsBitmap, cacheAsBitmapMatrix but doesn´t work.
Someone could give me a clue and put me on the right way to run it on the iphone.
I am working with flash CS5.5
Thanks a lot
Yes, thanks!
It works much better.
But it carry on working a bit slowly and you have to click more than one to trigger the click event.
I found a code that draws a grid and work very smoothly. The problem is that I have to do each cell interactive, to hide it, or to color it. This is the code:
var bmpd:BitmapData = new BitmapData(2, 2, false, 0x000000);
// Create a rectangle, 1x1 pixels
var rect:Rectangle = new Rectangle(0, 0, 1, 1);
// Place the rectangle inside the bitmap data object
// Give it a color... Black.
bmpd.fillRect(rect,0xFF0000);
var mc:MovieClip = new MovieClip();
// Create a new bitmap fill based on the bitmap data object
// And allow it to repeat
mc.graphics.beginBitmapFill(bmpd, null, true);
mc.graphics.drawRect(0, 0, 320, 480);
mc.graphics.endFill();
Do you think is a better way? How can i make each cell interactive?
Apologies for my english and thanks so much
Because it is working a bit slowly than in the browser, I'm using Iphone 4, I think in ipone 3 it will work very slow.
Some times when I click it doesn't do nothing like if the sistem can't respond to the click event.
But thanks any way, I thought maybe there was a better technique, but i am following your advise and I am working more in my old code.
Thanks!!!
North America
Europe, Middle East and Africa
Asia Pacific