first of all, there is no flash player for the iPhone ... so yeah, that's not really an option ... but there is a flash like alternative ... have a look at this post ... and at haXe ...
in short: haXe is an open source language, that allows targetting flash player 6-10, PHP, JavaScript, neko VM, and C++ (more targets coming) ... the creator of the haXe/cpp compiler backend uses it to get on the iPhone ... as a matter of fact, he has written a library, that allows you to use flash9 API on C++ or neko with openGL (neash? nme? can't remember which is which ... :D) ...
this allows you to write haXe for the iPhone, using flash 9 api ... haXe is a little different from actionscript, but you will quickly get the hang of it ...
currently, a limitation is, that his library uses either software rendering or Open GL for graphics, which is why he has to use software rendering on the iPhone (that's not really an option) ... but it's fair enough for developping and i think, hopefully he'll be having the Open GL ES integration soon ...
so maybe that would be a way to go ...
but as your active tags indicate, you never really dealt with actionscript or flash, so i am not sure, if it is not simpler to use the adequate Cocoa frameworks to get your stuff done ... there is an advantag in using haXe and flash API: i think it is a lot easier than related Cocoa frameworks (a friend of mine, who is a mac developer, started with the iPhone, so i have a superficial insight, but it was a little shocking, how little he had up and running after 2 days of work) ... the flash API more high level, thus simpler, but also limited and may not be as performant ... but you will get results really quickly ... but perfomance matters on the iPhone, because it means power usage ...
this is a full haXe program doing pretty much the circle stuff the ocarina does:
package ;
import flash.display.DisplayObject;
import flash.display.GradientType;
import flash.display.LineScaleMode;
import flash.display.Shape;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.filters.BlurFilter;
import flash.geom.Matrix;
import flash.Lib;
class Main {
static function main() {
for (i in 0...(Std.random(5) + 5)) {
var s = genCircle();
Lib.current.addChild(s);
pulsate(s, Std.random(10) + 10);
}
}
static function genCircle():Shape {
var radius = Std.random(50) + 50;
var s = new Shape();
var color = 0x110000 * Std.random(8) + 0x001100 * Std.random(8) + 0x000011 * Std.random(8) + 0x7F7F7F;
s.graphics.lineStyle(5, color,1,false, LineScaleMode.NONE);
if (Std.random(2) == 1)
s.filters = [new BlurFilter(4, 4, 3)];
else {
var m = new Matrix();
m.createGradientBox(radius, radius, 0, -radius/2, -radius/2);
s.graphics.beginGradientFill(GradientType.RADIAL, [color, color], [1,0.5], [0, 0xFF], m);
}
s.graphics.drawCircle(0, 0, radius);
s.x = 50 + Std.random(300);
s.y = 50 + Std.random(300);
return s;
}
static function pulsate(d:DisplayObject, speedModifier:Float):Void {
var cter = Std.int(Std.random(Std.int(speedModifier)));
d.addEventListener(Event.ENTER_FRAME, function (e:Event):Void {
var x = Math.sin(cter++ / speedModifier)/2 + 0.5;
d.scaleX = d.scaleY = x + 0.5;
d.alpha = 1.2 - x;
});
}
}
still, this i bit further in the future ... what is left to do, is use Open GL ES, as mentioned, and, by far more tricky, get haXe binding to all the inputs an iPhone produces (acceleration, multi-touch) ...
well, you might wanna keep an eye on it, if this road seems interesting to you ... or even, as someone, who works with the iPhone, you might even want to contribute to the haXe->C++->iPhone solution ... ;)
hope that helped ... or that it was interesting at least ... :)