[flexcoders] Porting an AIR app to iOS
I have a complex AIR app that is currently deployed to Windows and Mac. I would love to port it to the iPad, and I am beginning to explore this possibility. Before I launch it it however, there are a few basics questions that come up. Some of these might be showstoppers depending on the answer, and getting some answers might save me weeks of experimentation. If anyone can offer feedback I would be grateful. Here goes: - My AIR app makes extensive use of an embedded web browser, via the flash.html.HTMLLoader object. Can I expect this to work when compiled for iOS? - My AIR app makes extensive use of a SQL Lite database via the flash.data namespace. Can I expect this to work on iOS? - How about RESTful web service calls using the flash.net namespace and JSON? Thanks for any help you are able to provide. Kevin
Re: [flexcoders] Porting an AIR app to iOS
2 3 should work fine, 1 will work with minor modifications to make sure it's Optimized for mobile tablet. I don't remover off the top of my head if there is a embedded browser for tablet in air of if you have tainch a headless safari. Cheers, Grant Sent from my iPhone, excuse typos. On Mar 28, 2012, at 2:21 AM, Kevin MacDonald kevinmacdon...@gmail.commailto:kevinmacdon...@gmail.com wrote: I have a complex AIR app that is currently deployed to Windows and Mac. I would love to port it to the iPad, and I am beginning to explore this possibility. Before I launch it it however, there are a few basics questions that come up. Some of these might be showstoppers depending on the answer, and getting some answers might save me weeks of experimentation. If anyone can offer feedback I would be grateful. Here goes: * My AIR app makes extensive use of an embedded web browser, via the flash.html.HTMLLoader object. Can I expect this to work when compiled for iOS? * My AIR app makes extensive use of a SQL Lite database via the flash.data namespace. Can I expect this to work on iOS? * How about RESTful web service calls using the flash.nethttp://flash.net namespace and JSON? Thanks for any help you are able to provide. Kevin
Re: [flexcoders] Porting an AIR app to iOS
Item 1 htmlLoader is not supported on mobile but there is a StageWebView component. check out this blog post : http://www.judahfrangipane.com/blog/2011/01/16/stagewebview-uicomponent/ Regards Margo On 3/28/2012 6:38 AM, Grant Davies wrote: 2 3 should work fine, 1 will work with minor modifications to make sure it's Optimized for mobile tablet. I don't remover off the top of my head if there is a embedded browser for tablet in air of if you have tainch a headless safari. Cheers, Grant Sent from my iPhone, excuse typos. On Mar 28, 2012, at 2:21 AM, Kevin MacDonald kevinmacdon...@gmail.com mailto:kevinmacdon...@gmail.com wrote: I have a complex AIR app that is currently deployed to Windows and Mac. I would love to port it to the iPad, and I am beginning to explore this possibility. Before I launch it it however, there are a few basics questions that come up. Some of these might be showstoppers depending on the answer, and getting some answers might save me weeks of experimentation. If anyone can offer feedback I would be grateful. Here goes: * My AIR app makes extensive use of an embedded web browser, via the flash.html.HTMLLoader object. Can I expect this to work when compiled for iOS? * My AIR app makes extensive use of a SQL Lite database via the flash.data namespace. Can I expect this to work on iOS? * How about RESTful web service calls using the flash.net http://flash.net namespace and JSON? Thanks for any help you are able to provide. Kevin -- Margo Powell Applications Analyst/MS Computer Science Nutrition in Medicine Project Nutrition Education for Practicing Physicians Initiative Department of Nutrition University of North Carolina at Chapel Hill 800 Eastowne Dr, Suite 100 Chapel Hill, NC 27514 919-408-3320 ext 30 margo_pow...@unc.edu www.nutritioninmedicine.org attachment: mmpowell.vcf
RE: [flexcoders] Debug Woes - Redux
So I only have to close the browser every time I make a change and want to test it? That would be better than shutting down the IDE and the server (Tomcat6). Normally I work in FF (11), but I do have IE (8) and can use that for this kind of testing. It was so weird to see it step past code without landing on it or even worse, landing on it and ignoring it. I'll try shutting down the browser in todays (hopefully the last day of) testing. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, March 27, 2012 5:53 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Debug Woes - Redux I've had this kind of problem when the browser tries to cache an old SWF. I have to clear the cache and restart the browser. I sometimes make an edit to the main screen each time I make some other edit so I can immediately see if I've got an old SWF in the debugger. _,_._,___
[flexcoders] Styling List Problem
I have an unordered list on my form. It consists of three addresses. Each address is broken onto several lines (office, street, city, phone) using line break tags. The problem is each of the lines includes the dot at the beginning. It looks like this: *Some Office *123 Sesame St *Chicago, IL *555-1212 *Some other Office *1313 Mockingbird Lane *Spooky Ville, USA *800-555-1212 What I want it to look like is this: *Some Office 123 Sesame St Chicago, IL 555-1212 *Some other Office 1313 Mockingbird Lane Spooky Ville, USA 800-555-1212 Is there any way to eliminate the non-needed extra dots? Jerry Davidson
[flexcoders] Help regarding positioning image in Text Layout Framework
Guys any help would be appreciated alot alot Regards Anas From: anas naeem maverick_0...@yahoo.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Tuesday, March 27, 2012 7:05 PM Subject: [flexcoders] Help regarding positioning image in Text Layout Framework Hello guys Hope every one is doing great. i am a bit new to Text Layout Framework although developing in flex since flex 4 , now my issue is that i want to position an image in a newspaper type layout . Actually i have to place it in a way that for instance if i am having 4 columns then the image should be placed on the top of 2nd and 3rd column and also first and the last columns should remain as it is as if any one had seen times reader (AIR) application in which the image is spanned only on the top of center columns and the columns on both the sides maintain there complete page height. Only the centered columns change their height and width according to image dimensions. The problem's second part is that when i am going to resize the page or change my monitor's screen resolution to different numbers then the image should remain in place i.e it should then also be placed only on the top of 2nd and 3rd column. My Incomplete Solution to the problem I have done the image resizing on the page resizing event and also on switching between different resolutions. The only thing that is annoying me is image positioning on page resizing and switching between diff resolutions. On thing more i am not handling image as inline graphic element i had made a separate container in which i am placing the image on my first page's container (Sprite). So it would be quite helpful for me that you guys suggest me something regarding my problems domain. Although i tried to achieve this thing through inline graphic element but i didn't reached any acceptable solution. I came across Platus Talk's blog and saw his work but that solution wasn't helpful for me completely as he is not dividing his text into linked containers like i am doing. Also i tyepcast my containers column into column state object and after which further type cast it to get the specified column and from there i get a rectangle whose height , width i have to change but if i change its height or width nothing happens to it not a single word even changes its position. Thank you very much in advance. One final thing guys i have only 3 to 4 days left with me regarding my problem and to submit it to the client so i need a solution somehow soon Any type of help will be highly appreciated. With Best Regards Anas Happy Coding. From: Alex Harui aha...@adobe.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Monday, March 26, 2012 7:35 PM Subject: Re: [flexcoders] Re: Tempermental URLLoader.load() Use a network monitor and see what is going on underneath. On 3/25/12 11:49 PM, nagaofthesea nagaofthe...@yahoo.com wrote: Howdy Alex- Yes, everything works as expected when it does work including all the calls with the listeners. In the projects it does NOT work all fails silently!! What the heck could THAT be? -Naga --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@... wrote: Maybe you are adding listeners to the wrong thing? Because you should get those events when it does work. On 3/24/12 4:00 PM, nagaofthesea nagaofthesea@... wrote: Howdy All- PROBLEM: Strange URLLoader.load() behavior: sometimes it works; sometimes it doesn't. Can't step through airglobal.swc to see what's wrong. DETAILS: I am using the latest SDK in several versions of an AIR project. The core code is identical across versions of the project. Most changes are just in the presentation of the data. I am a Cairngorm nut and I have extended it to suit my coding style. I have a master AbstractCommand that addresses everything including listener add/remove, SQLite management, remote services, and File reading/writing. I just override certain functions as needed. In this project I read RSS beginning with the following: override public function execute(event:CairngormEvent):void { trace(LoadFeedCommand.execute() called); var rsso:RSSObject = LoadFeedEvent(event).feedObject; var urlRequest:URLRequest = new URLRequest(rsso.url); loader = new URLLoader(); addListeners(loader); try { loader.load(urlRequest); trace(loader.load() called); } catch(error:Error) { trace(problem with loader.load()); } tModelLocator.displayModel.selectedRSSObject = rsso; } In some of the projects URLLoader.load() works as expected. In others with IDENTICAL code it does not. URLLoader.load() fails into nothingness. The catch clause does not throw an Error. I have added the following listneres in overrided .addListeners() and nothing gets
Re: [flexcoders] Debug Woes - Redux
Not sure if this is already covered, but you could set your web server to include no cache headers so all your files are automatically reloaded every time. This prevents the issue of getting an old file. Tomcat might be a bit difficult to add the headers as it only has rudimentary page serving capabilities as it is meant to be run behind either a standard Apache webserver or other webserver such as IIS that is serving up actual static pages/elements. I tend to use IE as my debug environment for the simple purpose that it launches a new window each time and when you terminate debugging it automatically closes that window. No effort to close window manually (unless you want to set location and size of window - IE remembers last position and size when launching). I use firefox for my general browser. Besides the active X version of the debug player tends to be much easier to work with then the plugin version which has a tendency to crash on occassion resulting in force closing. Sincerely Mark R. Jonkman http://bitsbytesandsawdust.blogspot.com - Original Message - From: Jerry Davidson jerry.david...@illinois.gov To: flexcoders@yahoogroups.com Sent: Wednesday, March 28, 2012 8:59:36 AM Subject: RE: [flexcoders] Debug Woes - Redux So I only have to close the browser every time I make a change and want to test it? That would be better than shutting down the IDE and the server (Tomcat6). Normally I work in FF (11), but I do have IE (8) and can use that for this kind of testing. It was so weird to see it step past code without landing on it or even worse, landing on it and ignoring it. I’ll try shutting down the browser in todays (hopefully the last day of) testing. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, March 27, 2012 5:53 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Debug Woes - Redux I’ve had this kind of problem when the browser tries to cache an old SWF. I have to clear the cache and restart the browser. I sometimes make an edit to the main screen each time I make some other edit so I can immediately see if I’ve got an old SWF in the debugger. _,_._,___
Re: [flexcoders] Debug Woes - Redux
Just wondering... If you copy the variable's value to the variable 'temp' and test that, what do you see? John On 27/03/2012 21:34, Davidson, Jerry wrote: It's happening again. This never happened when I was using Flex 3.5. Make a change in the code. Do a Project | Clean. Make sure the debugging session is over. Do a File |Refresh. Start a debugging session and watch it go past a line: *if*(adjInc 0) /// for negatives/ adjInc = 0; Watch both lines (value at his point in this test is -43) execute. After the assignment watch the value not change to zero, but stay at -43. Repeat above steps 2-3 times with no difference. Shut down Flash Builder and start it again and repeat. No change. I've only got a little hair left and don't think I can pull any more out. 1)How can I force Flex to recognize code? 2)How can I force Flex (Flash Builder 4) to execute -- as in making an assignment -- the code? Jerry Davidson
[flexcoders] SQL lite database and Tablet problem
Hi friends I developed a Air mobile application with flex sdk 4.6.0. I test it in Flash Builder 4.6 simulators in windows.it works fine. but when I install the apk and test it in Samsung Galaxy Tab 10.1 , the sqllite functions seems do not work I save the sqllite database in the following path. I guess the tablet maybe do not allow me to use path. var file:File = File.documentsDirectory.resolvePath(testDb.db); Please help me if you have idea for this. Thanks a lot Mark
Re: [flexcoders] Debug Woes - Redux
adjInc and adjInc are different variables. On 28/03/2012 17:03, John McCormack wrote: Just wondering... If you copy the variable's value to the variable 'temp' and test that, what do you see? John On 27/03/2012 21:34, Davidson, Jerry wrote: It's happening again. This never happened when I was using Flex 3.5. Make a change in the code. Do a Project | Clean. Make sure the debugging session is over. Do a File |Refresh. Start a debugging session and watch it go past a line: *if*(adjInc 0) /// for negatives/ adjInc = 0; Watch both lines (value at his point in this test is -43) execute. After the assignment watch the value not change to zero, but stay at -43. Repeat above steps 2-3 times with no difference. Shut down Flash Builder and start it again and repeat. No change. I've only got a little hair left and don't think I can pull any more out. 1)How can I force Flex to recognize code? 2)How can I force Flex (Flash Builder 4) to execute -- as in making an assignment -- the code? Jerry Davidson
[flexcoders] installing WTP in Flash Builder 4.6 standalone
I'm trying to install WTP in the standalone version of FB 4.6, I add the site: http://download.eclipse.org/webtools/updates and I choose WTP 3.1.1 and I keep getting errors. At first it says: Your original request has been modified. Eclipse XML Editors and Tools will be ignored because a newer version is already installed. Cannot complete the install because one or more required items could not be found. Okay, no problem, I uncheck that and hit next.. I get a bunch of Cannot satisfy dependency: errors. How do I install this in the standalone version? Thanks in advance
[flexcoders] scaling images flex3 vs flex4 problem - help?
Hey all - I have an old player that sort of does the Photoshop navigator / current doc thing -- a smaller example of an image is shown with a larger image, and when the larger image scales UP there's a box that scales down on the navigator image that shows you what part of the zoom you're in. I had this working in F3 with mx components and basically having a slider scale a matrix.transform, the navigator getting the inverse of the transform; it was working great. I've since dropped the mx:Canvas scale I was doing for a spark Group (thinking it's going to migrate to an iPad app in the future) -- and now images aren't scaling correctly. Originally if an image was loaded in that wasn't the exact height/width, the image would be letterboxed with the largest direction being pinned to the sides. When I letterbox the image and try to scale the group holding it in the spark version it doesn't work properly. When the scaling works, the image isn't letterboxed and so the navigator and zoomed in image don't appear the same. Here's the Flex 3 version (partial): mx:Canvas width=100% height=100% id=bigBox mx:Canvas id=big width=100% height=100% mx:Image x=0 y=0 id=bigImage width=100% height=100% scaleContent=true horizontalAlign=center / /mx:Canvas mx:Button right=10 bottom=19 styleName=creativityLogo/ /mx:Canvas and the function for it: public function zoomChange(e:SliderEvent):void{ currentScale = Number(Number(e.value).toFixed(2)); var scaleBig:Matrix = new Matrix(); scaleBig.scale(e.value, e.value); var scaleSmall:Matrix = scaleBig.clone(); scaleSmall.invert(); big.transform.matrix = scaleBig; box.transform.matrix = scaleSmall; borderBox.transform.matrix= box.transform.matrix.clone(); if(e.value1){box.mouseEnabled; box.buttonMode=true}; } and for the Flex 4.6 version: s:SkinnableContainer width=100% height=100% s:Group id=imgLargeGroup width=100% height=100% left=0 top=0 right=0 bottom=0 resizeMode=scale s:Image id=imgLarge width=100% height=100% scaleMode=letterbox smoothingQuality=high horizontalCenter=0 verticalCenter=0 verticalAlign=middle top=0 left=0 right=0 bottom=0 / /s:Group /s:SkinnableContainer and the function for it: public function reactToZoomSlider$Change(ev:Event):void{ var sliderVal:Number = view.zoomSlider.value; maskOutline.visible = (sliderVal 1); currentScale = Number(Number(sliderVal).toFixed(2)); var scaleBig:Matrix = new Matrix(); scaleBig.scale(sliderVal, sliderVal); var scaleSmall:Matrix = scaleBig.clone(); scaleSmall.invert(); //large.content.matrix = scaleBig; //large.transform.matrix = scaleBig; view.imgLargeGroup.transform.matrix = scaleBig; trace(view.imgLargeGroup.transform.matrix); mask.transform.matrix = maskOutline.transform.matrix = scaleSmall; //large.scaleX = view.zoomSlider.value; large.scaleY = view.zoomSlider.value; } Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/
Re: [flexcoders] scaling images flex3 vs flex4 problem - help?
Hmm wondering if I can use a Scale effect instead and set it via the slider... On Mar 28, 2012, at 1:10 PM, grimmwerks wrote: Hey all - I have an old player that sort of does the Photoshop navigator / current doc thing -- a smaller example of an image is shown with a larger image, and when the larger image scales UP there's a box that scales down on the navigator image that shows you what part of the zoom you're in. I had this working in F3 with mx components and basically having a slider scale a matrix.transform, the navigator getting the inverse of the transform; it was working great. I've since dropped the mx:Canvas scale I was doing for a spark Group (thinking it's going to migrate to an iPad app in the future) -- and now images aren't scaling correctly. Originally if an image was loaded in that wasn't the exact height/width, the image would be letterboxed with the largest direction being pinned to the sides. When I letterbox the image and try to scale the group holding it in the spark version it doesn't work properly. When the scaling works , the image isn't letterboxed and so the navigator and zoomed in image don't appear the same. Here's the Flex 3 version (partial): mx:Canvas width=100% height=100% id=bigBox mx:Canvas id=big width=100% height=100% mx:Image x=0 y=0 id=bigImage width=100% height=100% scaleContent=true horizontalAlign=center / /mx:Canvas mx:Button right=10 bottom=19 styleName=creativityLogo/ /mx:Canvas and the function for it: public function zoomChange(e:SliderEvent):void { currentScale = Number(Number(e.value).toFixed(2)); var scaleBig:Matrix = new Matrix(); scaleBig.scale(e.value, e.value); var scaleSmall:Matrix = scaleBig.clone(); scaleSmall.invert(); big.transform.matrix = scaleBig; box.transform.matrix = scaleSmall; borderBox.transform.matrix= box.transform.matrix.clone(); if(e.value1){box.mouseEnabled; box.buttonMode=true}; } and for the Flex 4.6 version: s:SkinnableContainer width=100% height=100% s:Group id=imgLargeGroup width=100% height=100% left=0 top=0 right=0 bottom=0 resizeMode=scale s:Image id=imgLarge width=100% height=100% scaleMode=letterbox smoothingQuality=high horizontalCenter=0 verticalCenter=0 verticalAlign=middle top=0 left=0 right=0 bottom=0 / /s:Group /s:SkinnableContainer and the function for it: public function reactToZoomSlider$Change(ev:Event):void{ var sliderVal:Number = view.zoomSlider.value; maskOutline.visible = (sliderVal 1); currentScale = Number(Number(sliderVal).toFixed(2)); var scaleBig:Matrix = new Matrix(); scaleBig.scale(sliderVal, sliderVal); var scaleSmall:Matrix = scaleBig.clone(); scaleSmall.invert(); //large.content.matrix = scaleBig; //large.transform.matrix = scaleBig; view.imgLargeGroup.transform.matrix = scaleBig; trace(view.imgLargeGroup.transform.matrix); mask.transform.matrix = maskOutline.transform.matrix = scaleSmall; //large.scaleX = view.zoomSlider.value; large.scaleY = view.zoomSlider.value; } Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/ Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/
Re: [flexcoders] SQL lite database and Tablet problem
Hi Mark, I think the problem comes from your path. When using documentsDirectory, Flex will find the testDb.db in default folder: C:\Documents and Settings\userName\My Documents (please read this article: http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_03.html) It will fail if no folder like this be found in your Samsung Galaxy In my opinion, you should try with static link first: For example, var file:File = new File(C:/YOURFOLDER/testDb.db); Good luck Mark Yours sincerely, Khanh Tran --- On Wed, 3/28/12, markflex2007 markflex2...@yahoo.com wrote: From: markflex2007 markflex2...@yahoo.com Subject: [flexcoders] SQL lite database and Tablet problem To: flexcoders@yahoogroups.com Date: Wednesday, March 28, 2012, 12:23 PM Hi friends I developed a Air mobile application with flex sdk 4.6.0. I test it in Flash Builder 4.6 simulators in windows.it works fine. but when I install the apk and test it in Samsung Galaxy Tab 10.1 , the sqllite functions seems do not work I save the sqllite database in the following path. I guess the tablet maybe do not allow me to use path. var file:File = File.documentsDirectory.resolvePath(testDb.db); Please help me if you have idea for this. Thanks a lot Mark
RE: [flexcoders] Debug Woes - Redux
Ive got old eyes (along with the rest of me). How are they different? From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Paul Andrews Sent: Wednesday, March 28, 2012 11:36 AM To: flexcoders@yahoogroups.com Cc: John McCormack Subject: Re: [flexcoders] Debug Woes - Redux adjInc and adjInc are different variables. On 28/03/2012 17:03, John McCormack wrote: Just wondering... If you copy the variable's value to the variable 'temp' and test that, what do you see? John On 27/03/2012 21:34, Davidson, Jerry wrote: It's happening again. This never happened when I was using Flex 3.5. Make a change in the code. Do a Project | Clean. Make sure the debugging session is over. Do a File |Refresh. Start a debugging session and watch it go past a line: if (adjInc 0) // for negatives adjInc = 0; Watch both lines (value at his point in this test is -43) execute. After the assignment watch the value not change to zero, but stay at -43. Repeat above steps 2-3 times with no difference. Shut down Flash Builder and start it again and repeat. No change. I've only got a little hair left and don't think I can pull any more out. 1) How can I force Flex to recognize code? 2) How can I force Flex (Flash Builder 4) to execute - as in making an assignment - the code? Jerry Davidson
RE: [flexcoders] Debug Woes - Redux
I tried replacing a variable (exempt) with a new one (exemptFlg). When I was in debug I would see the old and no longer existing variable name in the Variables window, but not the new one. I didn't get any syntax errors, but it would just treat the variable as if it were a null statement - that is ignore it while the cursor positioning would pass through it. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of John McCormack Sent: Wednesday, March 28, 2012 11:04 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Debug Woes - Redux Just wondering... If you copy the variable's value to the variable 'temp' and test that, what do you see? John On 27/03/2012 21:34, Davidson, Jerry wrote: It's happening again. This never happened when I was using Flex 3.5. Make a change in the code. Do a Project | Clean. Make sure the debugging session is over. Do a File |Refresh. Start a debugging session and watch it go past a line: if (adjInc 0) // for negatives adjInc = 0; Watch both lines (value at his point in this test is -43) execute. After the assignment watch the value not change to zero, but stay at -43. Repeat above steps 2-3 times with no difference. Shut down Flash Builder and start it again and repeat. No change. I've only got a little hair left and don't think I can pull any more out. 1) How can I force Flex to recognize code? 2) How can I force Flex (Flash Builder 4) to execute - as in making an assignment - the code? Jerry Davidson
Re: [flexcoders] SQL lite database and Tablet problem
Mark- Perhaps try applicationStorageDirectory instead of documentsDirectory. -Jeff On 3/28/2012 09:23, markflex2007 wrote: Hi friends I developed a Air mobile application with flex sdk 4.6.0. I test it in Flash Builder 4.6 simulators in windows.it works fine. but when I install the apk and test it in Samsung Galaxy Tab 10.1 , the sqllite functions seems do not work I save the sqllite database in the following path. I guess the tablet maybe do not allow me to use path. var file:File = File.documentsDirectory.resolvePath(testDb.db); Please help me if you have idea for this. Thanks a lot Mark