Skip to main content
Known Participant
September 24, 2011
Question

XML in iOS app

  • September 24, 2011
  • 1 reply
  • 902 views

Hi,

I read somewhere (and you don't even have to read it because nowadays everybody seems to know this) that you may not at all include an interpreter into your app or Apple will reject.

Now I'm making educational software where the app explains all kinds of mathematical problems to the kids. Its software to instruct kids.

This is mostly timeline based stuff and initially we intended to put every separate lesson into 1 separate .swf file.

This would be nice for pc, mac, android,.... but on iOS it wouldn't work because you cannot subload swf files with code in.

So another workaround would be to create some kind of description file which contains a description of what animation the app should play and then the app could dynamically load in and out lessons (from within the app, not over http connection)

The app would at no moment require internet connectivity, only getting its data local (so running unmanaged code would not be possible)

For example, the beginning of such a lesson could be described as

1: show title("title_lesson1.jpg",slot1);

2: fadein (slot1);

3: playsound("intro");

.....

This is not really CODE but a description of the animation to play. It would be saved inside the resources of the app and the app then loads this description and play the lesson itself.

Any idea if this would be with or against the rules ?

It is clearly not the case that we load code over the internet. The description file only describes the animation to play + some sounds etc...

If we can use that way, then we can dynamically load in the needed images and sounds for each lesson without having to load them all at once on startup (and get a memory full crash)

We have +- 100+ lessons, so there will be need for memorymanagement.

Or does anyone know/suggest another solution.

Kind regards,

Bart

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
September 24, 2011

What you say will work. The only part you didn't talk about is when you want to play just a range of the swf that you're loading. To do that you would either need an enterframe function that watched what frame the loaded swf was at, or you might use addFrameScript to add a stop action to the frame where you want it to stop. I'm not sure if that would work though, but it might.

I have an app that does load and play long animation swfs, and in my case I want the next swf to load and continue the playing. I use an enterframe function that is like this ('swf' is a variable that contains the loaded swf, 'nextscene' loads in the next one I need):

function checkend(e:Event){

if(swf!=null){

if(swf.currentFrame>=swf.totalFrames-1){

swf.stop();

nextscene();

}

}

Known Participant
September 24, 2011

I think I explained something wrong. When I told TIMELINE BASED I didn't mean flash timeling, but using a time based timeline  (TimelineMax by the way)

So its more like scripted animation described by some kind of explanation file which is then played by the app.

Colin Holgate
Inspiring
September 24, 2011

So long as TimelineMax doesn't require any code in the loaded swf, things should work ok, in an App Store compatible way.