Getting started building AIR applications for the iPhone
This question was posted in response to the following article: http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b2-240138de1243a7725e7-8000.html
good
Similar Messages
-
Building AIR Applications with the NetBeans IDE
Hello Everyone,
Here's a link to screencast showing you how to Build AIR
Applications with the NetBeans IDE.
http://xwisdomhtml.com/netbeans-and-air.htmlNeat!
-
AIR Intrinsic Classes-Tried and Proven Approach to building AIR applications in the Flash CS3 IDE
Hi everyone,
For all of you out there who would like to develop AIR
applications
from the Flash CS3 IDE but aren't sure how to get those pesky
intrinsic
classes working, I have a technique that you can work with to
create
your classes and make fully functional AIR applications.
First of all, those solutions out there that list
"intrinsic" functions
in their class definitions won't work. That keyword has been
taken out
and simply won't work. The "native" keyword also doesn't work
because
Flash will reject it. The solution is to do dynamic name
resolution at
runtime to get all the classes you need.
Here's a sample class that returns references to the "File",
"FileStream", and "FileMode" classes:
package com.adobe{
import flash.utils.*;
import flash.display.*;
public class AIR extends MovieClip {
public static function get File():Class {
try {
var classRef:*=getDefinitionByName('flash.filesystem.File');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get File
public static function get FileMode():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileMode');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileMode
public static function get FileStream():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileStream');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileStream
}//AIR class
}//com.adobe package
I've defined the package as com.adobe but you can call it
whatever you
like. You do, however, need to import "flash.utils.*" because
this
package contains the "getDefinitionByName" method. Here I'm
also
extending the MovieClip class so that I can use the extending
class
(shown next) as the main Document class in the Flash IDE.
Again, this is
entirely up to you. If you have another type of class that
will extend
this one, you can have this one extend Sprite, Math, or
whatever else
you need (or nothing if it's all the same to you).
Now, in the extending class, the Document class of the FLA,
here's the
class that extends and uses it:
package {
import com.adobe.AIR;
public class airtest extends AIR{
public function airtest() {
var field:TextField=new TextField();
field.autoSize='left';
this.addChild(field);
field.text="Fileobject="+File;
}//constructor
}//airtest class
}//package
Here I'm just showing that the class actually exists but not
doing much
with it.
If you run this in the Flash IDE, the text field will show
"File
object=null". This is because in the IDE, there really is no
File
object, it only exists when the SWF is running within the
Integrated
Runtime. However, when you run the SWF as an AIR application
(using the
adl.exe utility that comes with the SDK, for example), the
text field
will now show: "File object=[object File]". Using this
reference, you
can use all of the File methods directly (have a look here
for all of
them:
http://livedocs.adobe.com/labs/flex/3/langref/flash/filesystem/File.html).
For example, you can call:
var appResource:File=File.applicationResourceDirectory;
This particular method is static so you don't need an
instance. If you
do (such as when Flash tells you the property isn't static),
simply
create an instance like this:
var fileInstace:File=new File();
fileInstance.someMethod('abc'); //just an example...read the
reference
for actual function calls
Because the getter function in the AIR class returns a Class
reference,
it allows you to perform all of these actions directly as
though the
File class is part of the built in class structure (which in
the
runtime, it is!).
Using this technique, you can create references to literally
*ALL* of
the AIR classes and use them to build your AIR application.
The beauty
of this technique is its brevity. When you define the class
reference,
all of the methods and properties are automatically
associated with it
so you don't need reams of code to define each and every
item.
There's a bit more that can be done with this AIR class to
make it
friendlier and I'll be extending mine until all the AIR
classes are
available. If anyone's interested, feel free to drop me a
line or drop
by my site at
http://www.baynewmedia.com
where I'll be posting the
completed class. I may also make it into a component if
there's enough
interest. To all of you who knew all this already, I hope I
didn't waste
your time.
Happy coding,
PatrickWow, you're right. The content simply doesn't show up at all.
No
JavaScript or HTML parsing errors, apparently. But no IE7
content.
I'll definitely have to look into that. In the meantime, try
FireFox :)
I'm trying to develop a panel to output AIR applications from
within the
Flash IDE. GSkinner has one but I haven't been able to get it
to work
successfully. Mine has exported an AIR app already so that's
a step in
the right direction but JSFL is a tricky beast, especially
when trying
to integrate it using MMExecute strings.
But, if you can, create AIR applications by hand. I haven't
yet seen an
application that allows you to change every single option
like you can
when you update the application.xml file yourself. Also, it's
a great
fallback skill to have.
Let me know if you need some assistance with AIR exports.
Once you've
done it a couple of times, it becomes pretty straightforward.
Patrick
GWD wrote:
> P.S. I've clicked on your link a few times over the last
couple of days to
> check it out but all I get is a black page with a BNM
flash header and no way
> to navigate to any content. Using IE7 if that's any
help.
>
>
>
http://www.baynewmedia.com
Faster, easier, better...ActionScript development taken to
new heights.
Download the BNMAPI today. You'll wonder how you ever did
without it!
Available for ActionScript 2.0/3.0. -
ITunes 8 lost library and all applications for the iPhone 3g
I am on WinXP Prof, using iTunes v8. This is second time I lost my entire library with ratings, applications, etc. for my iPhone 3g. The first tie it happened to iTunes v7, now with v8.
Music folder (it is on another HDD) is still there, but iTunes shows no playlists, no files. I looked at other posts on how to rebuild the library, but could not restore song ratings. I did not have a backup of the library files (only music mp3s).
Now I re-created the library from scratch (glad iTunes writes song data into mp3 and not into its library file.)
QUESTION: How do I restore all of my applications that I bought and free ones from the App Store for iPhone? I see that the "Mobile Applications" folder is there with all of the *.ipa files, but iTunes does not show those apps. How do I make iTunes pick it up?
PS. It is really amazing to me that iTunes would behave like this in v8. Apple, WOW... Up until I bought iPhone 3G in August 2008 I was using different versions of WinAmp for ~6 years and not once did I lose my library of songs...Hi, I and most polish users have the same problem. There are plenty of apps I would buy if I could but I need to have that **** credit card. Apple could at least enable paypal payments for foreing users but it looks they don't mind losing money they could get (America is not the only country wehere people have iPhones).
So I guess most iPhone users will continue to hack their phones to be able to install greatly affordable commercial applications instead of buying it. I gess I don't understand Apple anymore. -
Where can I find the iPod application for the iPhone?
My son (3yrs) just deleted the iPod application to watch videos and to listen to music on my iPhone 3Gs. Where can I find the download to reinstall this vital application? The fact that the application is called iPod and there are millions of hits for the iPod makes the search very tedious...
Any help is greatly appreciated.It can't be deleted, it's been moved to another page where you most likely can't see/find it, so do this: Settings>General>Reset>Reset Home Screen Layout...see if you see it now.
-
I currently have a blackberry bold on a virgin contract...im considering buying an iphone 4 but as im on virgin can i transfer my contract onto a iphone sim? please help....
You will have to trim the std SIM . Best getting the trimmer tool its about £5 and looks just like a modified stapler !
Like this one
http://www.amazon.co.uk/UltimateAddons-Micro-Cutter-Adapters-iPhone/dp/B003VAQ0I 2
The iPhone must be unlocked (Bought from Apple and not another network provider) , or officially been unlocked after the requisite qualifying period and fee payment as applicable.
All the UK suppliers are bound to unlock on request however they can add certain restrictions - Everyone Everywhere (New name of combined Orange and T-Mobile UK) require minimum of three months usage and a £20.00 fee, O2 you can do online . 3 will also do online, Vodafone not so sure of their terms.
When you do get the card cut and iPhone working its not all over however because you are going to have to do some manual settings to get full functionality as your iPhone will almost certainly assume the settings for T-Mobile/Orange the primary carrier.
This may mean that you can not send texts or access the Internet straight away.
You may need to click on Settings/General/Network/Cellular Data Network and change the following settings.
Name:
Virgin Media Mobile Internet
Username:
(none)
Password:
(none)
Homepage:
Virgin Media
Server Address:
http://m.virginmedia.com
Name:
Virgin MMS
IP Address:
193.030.166.002
Username:
(none)
Password:
(none)
Homepage:
http://mms.virginmobile.co.uk:8002
Server Address:
goto.virginmobile.uk
Then hold home and sleep button , slide to power off and finally press sleep button to reboot. -
My Dad who is 81 is finding his iphone difficult to use. At first I was surprised that he struggles to use it. He had no problems using his old style cell phone. But after trying to teach him how to use the iphone I can now see why he struggles with it. If the phone could have the features I've listed below it would make things so much easier for him.
1) With the exception of incoming phone calls, the phone app always opens to the same screen. This screen gives the choices of Favorites, Recents, Contacts, Keyboard and Voicemail in big blocks in the center of the screen.
2) There is a setting for the speaker so that it can be set to always be on. If the user doesn't want the speaker for a particular call or voice mail message there is a button on the screen to turn it off temporarily on the upper right corner.
3) The dot button used to listen to a voicemail message is a bigger dot. And it remains visible after listening to the message. It changes color rather then completely disappearing after listening to the message.
4) The upper left corner is reserved for only edit or to navigate back buttobs. The phone app has a greeting button in this spot on the Voicemail screen. A better place for recording a greeting would be in settings.http://www.apple.com/feedback/iphone.html
-
Applications for the iPhone and Corporate Support for device usage....
Not all applications are appropriate for internet access only. For example, I use a software package called eWallet to store my personal information in...I would prefer NOT to store this type of information on the internet. I love the interface for this device, but the lack of applications and Apple's unwillingness to open the platform up for developers will be enough for me to return back to a Blackberry or a Treo.
Also, the company I work for is certainly not willing to allow employees to install iTunes to synchronize contacts, calendars and phone information...I think Apple has a huge task ahead trying to break into the corporate world with this device.That is true - if they were aiming this at the corporate world. As you can tell from the activation process that you can't even HAVE a business account and have it work with your iPhone, I don't think that's the direction they are looking at.
-
How do you get started building an extension for CS5?
Hi. I'd like to build a Dreamweaver CS5 extension and don't quite know where to start. Your help is much appreciated. Thanks.
Just noticed this thread: http://forums.adobe.com/thread/666065?tstart=0
-
Can I use the SDK on a PC to develop applications for the iPad, iPhone, etc
I was thinking about paying the $99 a year to join the developer program because I want to download the SDK and try creating applications for the iPhone and iPad; however, can you download the SDK and use it on a PC or does it require that you have a Mac in order to do development work? The xcode4 and interface builder feature looked rather nice but I didn't know if I were to sign up and download if it would all run on my PC (Windows 7)or not.
It will not run under windows, and you need an Intel-based Mac running Snow Leopard to use it. Have you looked at the Mac Mini?
http://store.apple.com/us/browse/home/shopmac/family/macmini?mco=MTQzMDMxODY -
I am a beginner programmHow do I start developing mobile applications for iOS?
I want to start building mobile applications for use on my iPhone. I have little to no experience in software development. What do I need to do to get started?
Learning to program and then becoming familiar with xcode and objective-C is a long road to travel. If you google for xcode tutorials and objective-c tutorials, you might find some. Also, books is another way become familiar with programming for iOS and OSX. Go to Amazon and search for xcode 4 and for objective-c and Cocoa programming - look for the books with high ratings.
For example, one of the links at the right lead to the following helpful post:
The three best places to start;
Read through them in the order listed.
Apple iOS Developer Library / This includes Frank Caggiano's sugjestion of Start Developing iOS Apps Today.
http://developer.apple.com/library/ios/navigation/#section=Resource%20Types&topi c=Getting%20Started
Apples, Programming with Objective-C
http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Programmi ngWithObjectiveC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011210
Programming in Objective-C, By Stephen G. Kochan / I read through a tone of books until I found this one.
http://www.informit.com/store/programming-in-objective-c-9780321887283 -
Slow WI-FI transfer using native YouTube application on the iPhone 3G
Hello all,
I have seen several posts similar to the one that I'm making now, but since my newest discovery brings a small twist to the issue when compared to the other cases, I decided to make a new thread.
My issue is with the native YouTube application for the iPhone 3G, as it is mysteriously slow. A lot of people mention that lowering the router to B/G standards will remedy the issue. However, I do not think this issue is related to this because when I launch Safari on the iPhone and go to apple.com/trailers the speed is lightning fast. I did some WI-FI comparison testing:
PC: XP Pro SP3 running all drivers at newest releases incl. updating motherboard firmware.
iPhone 3G: Firmware v2.1
Connection: 10 Mbit/2 Mbit
Safari cookies, history, and cache cleared after each attempt on both iPhone and PC. Also, I closed Safari, ran CCleaner (just to make sure all temporary data was gone), and reopened Safari on the PC while Powercycling the iPhone 3G between each attempt.
Movie: http://www.youtube.com/watch?v=psYClvuONG4
Length: 1 min. 45 sec.
Load time on PC using Safari: roughly 25 sec.
Load time on iPhone using Safari: roughly 4 (FOUR!) min. 30 sec.
After this I directed Safari on both iPhone and PC at:
Movie: http://www.apple.com/trailers/magnolia/splinter/
Length: 1 min. 38 sec.
Load time on PC using Safari: roughly 5 sec. (for the small size as iPhone format does not seem to be available when browsing with a PC)
Load time on iPhone using Safari: Roughly 10 sec.
I do not know what is going on here. Do the size and/or compression of the two movie formats differ so much from each other that this could explain the normal transfer speed via apple.com/trailers? Or is there an issue with the YouTube application? Maybe the YouTube conversion system? Could it be a routing and/or hardware (on either ISP, ISP carrier or YouTube itself) issue in case there are "localized portals" for YouTube depending on the user's geographical location?
In general, speed is not an issue. Performing speed tests towards a localized server in Denmark using my iPhone give excellent results compared to the connection speed I am paying for, and I do not have issues surfing elsewhere via the iPhone. It is only when I use the native YouTube application on iPhone 3G that my transfer rates are poor.
I really want to solve this problem before I go nuts...
Best regardsAbout a week ago YouTube stopped connecting on my iPhone 3G -- as far as I know nothing changed on my end. The YouTube application seems to function normally, bookmarked videos are still there and play, for example, but it will not update, not search, etc. I get a message that YouTube is not available.
-
I used my iPhone maps it works very well. Is there an application for the iPad that could be used on a boat?
Indeed :-)
This forum is riddled with questions by users that cannot get their computer to do what they want, *despite* the fact they use a very precise and (usually) unambiguous method of telling it want they want it to do -- a programming language. Making it comprehend *natural* language is, by any way of measuring, a number of degrees more difficult.
That said: in what way would a computer program (advanced or "dumb") be able to help the OP? Spell check is one -- but it's not a *fact* that anything written *badly* equals nonsense. In politics, for example, the most eloquent speakers still manage to make a fool of themselves :D The same goes for "grammar". Of course, bad grammar is more difficult to understand -- EVEN for a human. So a computer is bound to fail on that as well.
Fact checking then? I usually can't even find what I want in one go with Almighty Google (which seems to turn things around: if it cannot find "enough" web pages with the exact phrase you asked it, it automatically assumes you are interested in synonyms, antonyms, homonyms, and other *unrelated* stuff! Yeah THANK you but I want to find what I typed in!)
A good starting point would be to define in more detail what this hypothetical software *ought* to do -- that needs to be a bit more concrete than "I want it to do my job for me." -
I tried to update my ipad air from IOS 7.0.4 to 7.1 on iTunes. I clicked download and update, it started to download normally but when download finished iTunes shows error that "The software for the iphone was corrupted during download".
How can I fix this error ?I had the same problem. In the end I downloaded it manually. Here's the steps assuming you are on a Mac and have an iPad Air (Wifi). If not you can find other restore links here.
In the terminal (it kept failing to download in Safari):
curl http://appldnld.apple.com/iOS7.1/031-4521.20140310.D2Ydl/iPad4,1_7.1_11D167_Rest ore.ipsw >>~/Desktop/iPad4,1_7.1_11D167_Restore.ipsw
Once the file has downloaded, move it to ~/Library/iTunes/iPad Software Updates/
Quit and relaunch iTunes.
Should now work for you. -
I tried following the steps in this article. When I attempt to delete iTunes, it says “iTunes” can’t be modified or deleted because it’s required by Mac OS X. What other steps could I take to get my MacBook Air to recognize my iphone again? Neither iTunes nor iPhoto recognize my phone any longer.
iTunes can't be deleted because it comes with OS X. In order to delete it, open Terminal and copy:
sudo rm /Applications/iTunes.app
This will remove iTunes, so then you can reinstall iTunes
Maybe you are looking for
-
Why can't I delete mailbox items before a certain date?
What appears to be wrong with my syntax here? I am trying to delete all emails from the beggining of time up until today's date. I know it seems pointless because I could just execute -DeleteContent without a SearchQuery, but I am trying to prove a c
-
So when I try to update or download an app it says I don't have enough storage. I don't know how to use iCloud and stuff soo what do I do? Help! I don't wanna delete any pics either.
-
MBean calling ejb class loading issue
Hi, I would like to have an mbean call an ejb. I have come against a (predictable!!) class loading problem. The EJB Home cant be bundled with the mbean because the mbean class loader would load the interface, preventing ejb reload( Thats what the err
-
Encryption the column in oracle 10g
Hi, I have a table containing ~ 45 millions records. I have to apply encryption to 37 columns in the table. I tried with one column, that took around 7.5 hrs. to complete. I used the below command for encryption: ALTER TABLE employee MODIFY (first_na
-
Hi all, i have a scenario RFC-> XI -> SOAP-XML. But in SOAP-XML i have to use own namespace für each XML-Tag, e.g. <xyz:name>. Should i write a java mapping programe? Is there another way? regards, Fanglin