How can I get to know that the device is iphone or ipad using actionscript3.0?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check out the Capabilities class: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html
There’s no 100% method to test if something is a specific device (Adobe say to not do it), mainly because you can end up with a ball of spaghetti code that’s not future proof (e.g. the resolution/dpi roughly doubled between the iPhone 3GS and the iPhone 4, and who can say what the iPhone 5/6 etc will have).
What you could use are
cpuArchitecture,manufacturer,os,pixelAspectRatio,screenDPI,screenResolutionX,screenResolutionYandtouchscreenTypeto help try and figure it out.There’s also
ContextMenu.isSupportedas the context menu (what shows when you right-click on a swf) doesn’t show up on smart phones or tablets (no right-click)