Question

I am attempting to catch all of the url requests made to our server from a mobile app and store those values.

When the app is in an online state, I will download the values and store them to an on disk library and then when in offline mode I can redirect the loaders to the on disk location of the files instead of the server based ones.

I will NOT have access to all of the loaders or the classes that contain them, since they are shared classes.

Was it helpful?

Solution

I think the cleanest solution would be to create a custom Loader class to wrap flash.display.Loader and then simply change the import statements in the the project files.

You could even use compiler conditionals if you only wanted to use that class in your mobile project. The compiled desktop/browser project would remain unchanged.

if(CONFIG::MOBILE) {
    import Loader;
} else {
    import flash.display.Loader;
}

Remember you'd have to define the constant CONFIG::MOBILE for that to work. Depending on how you compile your code (Flash Builder, Flash Pro, FlashDevelop, etc) there different ways of doing that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top