Create movement like snake for iOS

Hello,
i have this function to create a snake like movement
stage.addEventListener(Event.ENTER_FRAME, function()
          head.x = mouseX;
  head.y = mouseY;
  tail.graphics.clear();
  tail.graphics.lineStyle(3, 0x005e00);
  tail.graphics.moveTo(head.x, head.y);
          nodes[0] = {x:head.x, y:head.y};
          for (i=1; i<tail_nodes - 1; i++)
                    var rotation = Math.atan2(nodes[i].y - nodes[i - 1].y, nodes[i].x - nodes[i - 1].x);
                    var pos_x = nodes[i - 1].x + tail_len * Math.cos(rotation);
                    var pos_y = nodes[i - 1].y + tail_len * Math.sin(rotation);
                    nodes[i] = {x:pos_x, y:pos_y};
  tail.graphics.lineTo(pos_x, pos_y);
this work perfectly on computer and browser but when i export the ipa file for testing on my ipad it works jerkily (seems like low framerate).
What is wrong? the event.Enter_Frame? any suggestion to create a similar effect?
Thanks,
Stefano

you should use blitting for that.

Similar Messages

  • Creating a email extension for ios... it keeps flipping the orientation of the app when closing.

    I know, if I need help I should go post on some apple board... but it's information overflow.... and I am not 100% sure it's related to the extension.
    Here's the problem
    I am creating/using an extension to open the MFMailComposeViewController.
    Now, I figured out how to open it and force it to landscape, but the problem is  when I close the email it, my app flips upside down. (landscape left when it was landscape right before, or vice versa)
    My app is set to force landscape left and right... and the mail controller does open in landscape... but it's either upside down (landscape right, when the app is left, or vice versa) or when it closes, it flips the application the other way.
    Has anyone encountered anything like this and ideas on how to fix it?
    My app publish settings, I set to landscape, auto-orient is set to false and it's full screen,
    However, on start up in code... I am setting stage.autoOrients = true and then using the CustomOrientation.as to control the rotation (to force landscape only)
    in my extension, I am showing the MFMailComposeViewController in the
    [[[[UIApplication sharedApplication] keyWindow] rootViewcontroller] presentModalViewcontroller:mailCompser animated:NO];
    and mailCompser is a subclassed MFMailComposeViewcontroller object and I have set it's override to this:
    @implementation MailCompose
    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientati on {
        return (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
    When I launch my app, it starts
    stage.orientation = rotatedRight
    I then launch my extension and the email page for ios appears, in the correct orientation.... if I rotate the device, both the email and the app rotate to rotatedRight or rotatedLeft correctly.
    I then click Cancel, delete draft
    The email window disappears, but now my screen is landscape left.... if I wiggle the device, the sensor picks it up and then rotates the app back right, but this is a major problem.
    I am thinking it has something to do with the rootViewController orienatation, but I don't know enough about objC and xcode to know what to do.
    I have tried googling and searching will little to no luck... but then, the answer could be staring at me and I would have missed it as I am an obj c noob.
    Anyone know how I can fix this?

    Hi,
    I had the same problem and found the following workaround: apart from overriding MFMailComposeViewController's shouldAutorotateToInterfaceOrientation, I also added implementations for
    _preferredInterfaceOrientationGivenCurrentOrientation
    and
    _isSupportedInterfaceOrientation
    in a category of UIViewController in the native code.
    Then, in the Actionscript code, added an event listener for StageOrientationEvent.ORIENTATION_CHANGING (with high priority and use_capture = true) in Actionscript to prevent resizing of the stage, which can occur even if the orientation doesn’t change.
    This fixed it for me, but, as it messes with UIViewController, it makes it tricky to have views which have different orientation behaviour (if you want one view to be able to rotate in all directions, but others only to support Landscape, for example).
    I've posted details and example code here: http://blog.diadraw.com/native-extensions-for-mobile-air-apps-getting-round-the-orientatio n-issue/

  • Creating a Runner game for ios

    Hi All,
    i'm not sure if this is the correct forum to ask this but any help or a point in the right direction would be great.
    Basically I want to know if an infinite runner game can be created in flash for IOS iPhones.
    If it can, can anyone point me in the direction of a tutorial. I have experience in web design but I only have a basic knowledge of Flash.
    I need a tutorial on creating an infinite runner as I don't know where to start.
    Thanks you for the help!
    Cheers,
    Alex

    Sorry I should point out I have Flash CS6.
    Thanks Again

  • Can I create albums in iPhoto for iOS

    My albums in iPhoto on my MacBook are imported to my iPad. But I can't add photos to the albums, I guess because they were created in iPhoto, not iPhoto for iOS. So I thought I would create the albums on my ipad in iPhoto for iOS, and import the old photos to is, and add new ones. But it doesn't appear that you can create albums in iPhoto iOS.  Can this be true?

    You create (tagged) albums in iPhoto iOS by tagging. If you want a new album, you create a custom tag with the name of the album you want, and all photos with that tag will appear in your custom album.
    Or create regular albums in the Photos.app. All albums created in the Photos.app are visible in iPhoto for iOS:

  • Possible to create local "update server" for iOS and apps?

    I use the software update server in OSX Server to locally cache updates, which speeds them up dramatically.
    Unfortunately, the app store is still fairly slow.
    Does anyone know if Apple has implemented the same sort of caching or update server for iOS devices? I think I read that there's a semi-transparent cache if you have an AirPort Extreme in your path to the Internet, but I don't and really couldn't even if I wanted to...
    Thanks.

    If apple would get thier crap together it is supposed to be there already. It is really ******* me off that there little to no effort from apple to get all of this working PRE OS release. Had this worked properly before the OS update schools across the country would probably not been brought to thier knees. I ended up having to block the entier apple domain to keep District Office online.
    Here is apples promise at the iOS launch.
    http://www.apple.com/ios/business/
    Caching Server 2 supports iOS 7.
    By caching purchased content and software updates on a local Mac running OS X Mavericks Server, Caching Server 2 speeds up the download and delivery of content through the App Store, Mac App Store, iTunes Store and iBookstore. Your users get faster downloads of content and updates to their iOS devices directly over your corporate network.

  • Should I create a separate network for iOS devices?

    My family and I are leaving the Windows platform and going Mac/Apple.  Here's what we have:
    3 iPhones, 2 iPads, new iMac (coming from Santa for the kids), new MacBook Pro 15.4 with retina, Roku 3, and possibly thinking of trying Apple TV (to compare to the Roku).
    I have wireless internet through ATT U-verse and their 2Wire router.  I am getting the Airport Time Capsule 2TB today.  My question is...should I setup the airport time capsule as a separate wifi network for all my iOS devices, or should I just extend the current 2WIRE ATT U-verse wireless network?  I think the easiest thing to do would be setup the Airport TC in bridge mode to extend the network.  But I recall reading a blog post where someone set up a separate network on the Airport TC for all his apple products.  This sounded like a great idea because from what I understand, the iOS devices can take advantage of the Airport TC offering a better speed.  Of course, I can't find the article anywhere (Murphy's Law).  My thought is to keep my work laptop (windows) and the Roku 3 on the 2Wire network and the iOS devices on a separate network.
    I'm new to apple products (except the phone haha) so what does the community recommend?
    Thanks in advance,
    AC

    Would the best solution be to extend my current by network running a cable from the LAN port of the uverse router to the WAN port of the airport time capsule?  This would create another wireless AP, correct?  I simply do what you said...use the same wireless name (SSID), security protocol, and password of the uverse router on the airport time capsule and I'm all set.  But I think the airport utility has an option to "Add to an existing network."  Is this the setup I should choose?  I believe you have reference this kb article in another discussion post.  Thanks again for your help.
    This is the way I would do it.. but there is no right and wrong here.. just options with different uses..
    The cable backbone is ideal.
    You are creating another AP.. yes.. and that is why it works.. extend by wireless is slow. You are using wireless in one hop connections.
    Everything else is running over fast ethernet or gigabit hopefully.
    I am not sure if the add to existing network will work correctly.. if you have the TC plugged in by ethernet it should.. but manual setup of this is trivial.
    Bridge the TC as per my previous post.. setup wireless exactly as normal but use same ssid and security setup.. simple to the point of trivial.
    Roaming I must add is perfect in theory.. in practice stuff doesn't always swap "towers" the way you idealize.. it stays stuck to the poorer signal when a better one is right next to it.
    That is the nature of wifi. A voodoo technology.. 80% black arts. and 50% science.. (in voodoo it has poor maths).

  • Creating new DCIM folder for iOS photos?

    Hi all
    I've started a regular backup regime on my ipad and iphone of photos direct to my PC. Basically I copy from device to my PC's HDD via Windows Explorer.
    I noticed about 5 folders under DCIM on there so I copied them and deleted the 4 oldest on my iPhone so that I still have a running folder of current few months of photos.
    But lately I noticed the one folder I still have left on my iPhone is getting bigger and bigger and no new folder is being created.
    This has now grown to about 10GB...
    What I'd like is to be able to have regular new folders created so I can clean out the older photos in one hit.
    I thought I'd do a wipe and restore on my iphone to see if it will change things.. But what it did was create another folder with a different name and all 10GB of photos still under there..
    Seems this file system has a mind of its own..
    Anyone explain how it works and whether there's a way to force it to create and store photos under a new folder on demand?
    Thanks

    Same questions.... same lack of answers anywhere.  Here are some questions I come up to define this some more.  (3rd post in the following link)
    https://discussions.apple.com/message/21868344#21868344

  • How can I creating hyperlinks that work for iOS reader?

    In a pervious thread the notion that hyperlinks withiin a PDF document deployed on an iPad do not work.
    Is there a work around?
    Perhaps <www.mysite.com> ?
    The Word document is a summary prepared by an author with embeded hyperlinks. Works on the desktop but nothing happens in iOS.

    So I use the link tool in Acrobat Pro, add the url, and I'm good to go...
    Would be a useful addition in the next release...

  • Flash CS5.5 or CS6 creating an interactive ebook /app for IOS

    I'm in middle ground here as I'm able to create a simple app for IOS using CS5.5 and was wondering if I'm able to create an interactive IBook ( which is actually an app ) to know what I mean if you go to the Apple Book Store and download the free "Beatles" Yellow Submarine you will see the interactivity.
    When I write middle ground I mean I just finished downloading CS6 and looking at some tutes so if this is possible, which I know I can get the interactivity but its just putting it in book form that I was curious about.
    thx
    RD

    I misunderstood you, because I'm not english speaker. But I will try to answer..
    You develop 1 app. This app will include all that you wants. Page - it's just object. Each object can contain another objects. Like a tree and leafs. So you simply make 1 page with any animations. Page 2 with any animations and etc and combine this to one APP.
    Here is the link, you can get free 8 pages. Will be good if you can spent $1.99  =)))
    http://tinyurl.com/7plewc7
    If you don't have iPad - here is a Russian video review http://www.youtube.com/watch?feature=player_embedded&v=rXb2jswoz0Y
    This all done using Adobe Flash CS5.5 and Exported to Adobe Air, than published to AppStore.
    If you want to offer me some job in this area - just write me PM

  • Missing movies in project since iOS 8 and iCloud Photo Library

    Hi,
    I've been to Europe this summer and created a movie in iMovie for iOS. That was when iOS 7.1.2 was the most current release. Today, I wanted to finish up my project. I'm currently running on iPad air, iOS 8.0.2, latest release of iMovie and iCloud Photo Library is enabled since day one. Opened the project and iMovie complained there was missing movies and offered me to search form them. It found 19 out of 40 or something. ***??? Now my movie timeline is filled with clip with exclamation mark and many transitions with pictures in them are missing too. I tryed to download clip that where in iCloud by tapping the Cloud icon but iMovie still cannot find them. How am I supposed to fix this now? My clips are there but iMovie cannot link to them... Apple, are you reading this forum?
    JF

    I recreated this same question here so it wouldn't show like its solved: Missing movie files in my project since iOS 8 and iCloud Photo Library
    Hope we get an answer.

  • WEB PAGE'S LOADING INTO AN AIR FOR iOS PROJECT

    Hi!
    I have a complicated problem. I try to find a solution everywhere but I didn’t find anything.
    I’m creating a project Air for iOS with Flash CS5 and Flash CS6. I need to find somebody that know how to upload a web page inside an app.
    I try to explain better. There is yet a task for upload an html link, but it just work in a new browser window. In this way, every time I want to see a web page, the app will be close. Is it possible to import all the web page inside the Air for ios project, and not in an external window?
    I'd like the result is like this:
    Thanks a lot.

    hi....
    i used StageWebView class and i wrote this code:
    var webView:StageWebView = new StageWebView();
    webView.viewPort = new Rectangle( 0, 0, this.stage.stageWidth, this .stage.stageHeight);
    webView.stage = this.stage;
    webView.loadURL( "http://www.adobe.com" );
    The web page opens correctly without using the browser but it opens into all project's frames.
    Is it possible to open the web page only in the frame one (for example) ????
    Thanks a lot!!!!!!!!!!!!!!!!!

  • Fortran code for iOS using GCC cross-compiler

    Hello everyone!
    I have some Fortran application, and i want to compile it for iOS. I'm new in iOS development and  as i understand correctly i need to configure GCC (from gcc.gnu.org) with --target=arm-apple-darwin and --enable-languages=c,c++, fortran.
    With --target=arm-elf, --target=arm-apple-darwin i got error, that it's not supported.
    With --target=arm-none-eabi i got cannot compute suffix of object files: cannot compile Maybe is that because i'm setting wrong configure parameters.
    My question is : what is correct ./confgiure parameters to create gcc cross compiler for iOS platform, which supports FORTRAN.
    Is this the only (right?) way to build cross-compiler for iOS platform, or i could use existing LLVM-GCC? Thanks!

    jasonwryan, thanks for the reply,
    I've read the ARM Dev Guide as suggested but I don't believe this will do what I'm aiming to achieve. It seems the ARM Dev Guide will install the arm-linux-gnueabi, which allows cross-compiling applications to run on LINUX built for ARM. I need something like arm-none-eabi (or arm-none-gnueabi - the whole naming scheme is a mess at the moment) which is an ARM compiler for "bare metal" ARM devices. I am aiming to program a simple ARM Cortex M4 microcontroller as opposed to an ARM microprocessor running Linux. Hence arm-linux-gnueabi is quite overkill from my understanding and it might even not work.
    So, if someone could either confirm that what the ARM Dev Guide suggests is indeed what I need to program a bare metal ARM microcontroller, or recommend an alternative path, it would be very appreciated.
    Thanks,
    -Igor

  • Add chapters with iMovie for iOS

    Hi
    Is it possible to add chapters to a movie using iMovie for iOS. I will like to import a mp4 movie file to iMovie on my iPad and add chapter markings so that it's easier to navigate when I  play it on my Apple TV. Is this possible?
    Thanks
    Fresh1

    No.

  • How can I record 2 tracks simultaneously in GarageBand for iOS?

    I am trying to record 2 tracks at the same time, one, a line in for my guitar and the other a vocal mic. I am using an Alesis i/o Dock with my iPad Air 2, everything is updated, and everything is plugged in correctly. When I select either track from the multitrack screen, I can see that both work appropriately. However, when I hit the record button, the screen goes from the multitrack view to the track that is 'highlighted' and the record process goes from there. So if the 'amp' (guitar) track is highlighted, the app take me from the view with both on it to the 'guitar amp' selection, showing the head that I selected. Now, in the past, I have recorded 2 tracks at the same time. I still have the original recording showing both tracks and their settings. Even when I try to match the setting (both were on Left Channel, for example) it doesn't work. On my recent attempt to record (the one this question is about) I put the mic track on Right Channel and the line in on Left Channel, and vice versa. I tried putting them both on the same thinking that maybe that's what I did before because the app might not be able to do both Channels at the same time. I tried using the Mic track in stereo and the Line In on Left and tried it on Right; nothing. Has GarageBand taken this feature out on iOS? I do see if I had a Mac there is an 'Enable Multirack Recording' box to check, but I don't see anything like that for iOS... Can anyone help??

    in one the YouTube Tutorials, it is not possible in iOS. but hopefully in the later version it should be.

  • 3D content for iOS using Flash Builder? Possible?

    Hi,
    Is it possible to use Papervision or Away 3D using Flash Builder 4.6 and compile this succesfully for iOS?
    I have previously had lots of fun with Papervision and I am just wondering if it is possible to create 3D interface content for iOS and/or Android?
    HR

    I think Away3D (and possibly PaperVision) uses Pixel Bender shaders. They don't work on mobile devices, AFAIK. But Stage3D is supposedly coming to AIR mobile soon. That should blow the socks of any software rendering. I think Away3D will be supporting it.

Maybe you are looking for

  • Error during installation of a new SLD

    Hello people, During installation of a new SLD I got different kind of errors in the Log. Does anyone has a suggestion what to do? <b>#79</b> 09/10/2007 14:04:01.536 [Thread-74] INFO com.sap.lcr.pers.delta.importing.ImportHandler: Finished full impor

  • Not getting cleared with internal working of JSF

    Hi All, I have started with basics of JSF and created some simple apps using netBeans. However I am not getting cleared with the exact internal working of JSF i.e. how the things are implemented in JSF libraries: jsf-api and jsf-impl. Please advice o

  • Messages stuck in QRFC inbound and outbound queues by system error

    Hi Experts, We faced a big problem in our PI server which stopped all the traffic in the iDoc to File interface. Both the QRFC queues (inbound - SMQ1 as outbound - SMQ2) where stuck by a system error. In IDX5 of PI we saw two inbound iDocs on exact t

  • Linking to a specific frame from html?

    Hello all: Does anyone know if it is possible to have an html page that links to a swf file, but ALSO goes to a specific frame or label within that file? I'm trying to avoid having to start the Flash file from the very beginning, but I can't say that

  • Can't rout channel sends to auxes

    I am trying to set up a template for live recording. In this template I want to be able to mix monitors as well as record. I am using a PreSonus FirePod which has 8 analogue inputs and 8 analogue outputs plus 2 channels of spdif i/o. I am trying to r