-
1. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Colin Holgate Dec 13, 2012 4:40 PM (in response to FLAdude)You can load externals swfs that have graphics in them. You just can't load in external swfs that have code in them. In your example where you have a game character that you want to have multiple copies of, you could do the same as you would with web based Flash, and use a Loader to load in the same swf repeatedly. Another way you could work would be to have one external swf that has all of the characters you need on its stage. Then when you want to add a character you would just addChild() it from the stage of the loaded swf to the stage of your app.
-
2. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
FLAdude Dec 13, 2012 4:51 PM (in response to Colin Holgate)It will only load one time. After that, even a SWF with NO actionscript in it will cause an "Error #3764: Reloading a SWF is not supported on this operating system."
As of AIR 3.6 you can only load a SWF graphic one time, after that it will fail and make an error. This will happen even if your SWF just has graphics and NO ActionScript.
This worked previously, but with the new AIR3.6 build just released, it is completely broken.
-
3. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Colin Holgate Dec 13, 2012 6:11 PM (in response to FLAdude)Ok, I managed to reproduce what you're saying, with a very simple test case. I'll raise a question about it elsewhere.
-
4. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Dec 13, 2012 6:15 PM (in response to FLAdude)I'm tagging onto this as it could, not to put too fine a point on it, make six months of work utterly redundant, probably cost me a customer and leave me a bit shafted.
Please can you confirm;
What is the limitation on loading external SWF content?
Currently, I have SWF files generated by InDesign that I need to load on the fly as they have InDesign generated graphics in them... They _also_ have InDesign generated garbage actionscript that I do not want but cannot remove.
So...
Are you telling me that I can no longer load these files in? Or, that if I do, I can only load them _once_ per url?
If so...
With several thousand possible graphics, and users who are likely to go back to the same areas several times, I am... well... not very happy.
G
-
5. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Colin Holgate Dec 13, 2012 6:19 PM (in response to Gaius Coffey)For your job that you're already doing there's no problem. You don't have to publish with the beta of AIR 3.6, just publish with the shipping AIR 3.5 instead. Hopefully by the time AIR 3.6 is finished they will have found a way for it to work again.
-
6. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Dec 13, 2012 6:21 PM (in response to Colin Holgate)Ok, so this is a _bug_ and _not_ a policy decision then?
G
-
7. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Colin Holgate Dec 13, 2012 6:23 PM (in response to Gaius Coffey)Let's hope so! I've shown my simple test case to Adobe, hopefully there will be a good answer.
-
8. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
FLAdude Dec 13, 2012 6:28 PM (in response to Colin Holgate)Thanks for spreading the word about this to Adobe, Colin.
@Gaius
From the way they stated in the AIR3.6 release notes it sounded sort of like a policy descision, which is what disturbs me and would be utterly insane. Hopefully that is not the case.
-
9. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Eddy.Li Dec 13, 2012 11:06 PM (in response to FLAdude)I read an article about "Packaging and loading multiple SWFs in AIR apps on iOS" that happen to mention "Error #3764: Reloading a SWF is not supported on this operating system."
Not sure if this applies on your case though.
-
10. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Dec 14, 2012 2:06 AM (in response to Eddy.Li)Hmm...
Reading that blog doesn't make me feel any more relaxed.
So, I have about a gazillion and six generated media files that have ABC that I neither want nor need, but cannot remove. The images are all I use and are simple Shape or Sprite with drawn shapes in them.
Based on that blog, I would need to do something like; "http://<pathtoserver>/<pathtoimage>.swf?cacheBuster="+Math.random() in order to allow for the possibility of a user wanting to use the same logo twice... It is simply _not_ an option to store so many possible logos.
However, the blog is also implying that what I am doing is dangerous in any case. In all modes that are available to me prior to full release, I am able to display and run the loaded SWF without issue. The uncompiled AS warning appears in debug mode, but not when I compile "ad-hoc for limited distribution". Is this a potential stumbling block for release in any case?
G
-
11. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Lorenzo Nuvoletta Feb 6, 2013 2:04 PM (in response to FLAdude)FLAdude, I have same issue as you... simple graphic SWFs with NO code, I want to load and unload them on demand to manage memory better and now in Air 3.6 I can't... this should be a bug not a feature.
-
12. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
JonKaye Mar 3, 2013 8:50 PM (in response to Lorenzo Nuvoletta)@Gaius @FLAdude @ Colin -- now that AIR 3.6 has been released officially, has this issue been resolved in that one can reload SWF's without code? I am using 3.4 now but need to update to 3.6. I didn't see anything about the restriction in the 3.6 release notes, but I am very nervous -- I have a whole bunch of SWF files to load for assets. Thanks!
-
13. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 4, 2013 8:13 AM (in response to JonKaye)I will be doing that tomorrow - watch this space.
G
-
14. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 7, 2013 7:26 AM (in response to Gaius Coffey)So far, so good.
G
-
15. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 15, 2013 12:11 AM (in response to JonKaye)Reloading of pure asset SWFs(having no ABC code) is now allowed on iOS, please download the AIR 3.7 build from here :
http://labs.adobe.com/downloads/air.html
While reloading the pure asset SWF please make sure your SWF doesn't contain any ABC code otherwise it won't get reloaded.
Please share your feedback with us!
Thanks,
Nimisha
-
16. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 15, 2013 12:47 AM (in response to Nimisha1)Hi Nimisha,
That doesn't even come close to resolving my issue, sorry!
For example, we use Adobe InDesign generated Swf assets. There is no way I have found to prevent these from containing ABC code... But I neither want it nor need it nor use it.
There are literally thousands of these. Too many to load once and never again.
What would work better for me is either a) a server-side way to strip ABC code prior to serving or b) (better) a "loadWithoutBytecode" flag to let me notify the runtime that I don't need or want the code or c) (best) a way to prevent Adobe InDesign putting in all this rubbish and unwanted ABC code in the first place.
Thanks
G
-
17. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Lorenzo Nuvoletta Mar 15, 2013 2:05 PM (in response to Nimisha1)Hi Nimisha,
Thank you very much for that.
I was reading the release notes for Air 3.7 and that is not listed, is it because it is stillnot perfectly working yet?
i noticed it still has problems unloading SWF with SWF version:10
-
18. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 18, 2013 12:32 AM (in response to Gaius Coffey)Hi Gauis,
Can you please try any third party tool (like http://www.swixkit.com/ ) to remove DoABC tag from the SWF?
SWIX is a Windows Only tool and using this tool, one can easily remove the DoABC tag from the SWF & re-create the same SWF which has no ABC Code. This is useful for simple asset SWF’s which do not use any classes/ symbols which are required by the Main SWF.
This might be helpful in cases where removal of the DoABC tag won’t affect the working of neither the secondary SWF.
Thanks,
Nimisha
-
19. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 18, 2013 12:35 AM (in response to Lorenzo Nuvoletta)Hi Lorenzo,
What is the issue that you're facing while reloading?
-Nimisha
-
20. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 18, 2013 3:55 AM (in response to Nimisha1)Hi Nimisha,
Thanks for the link, I've downloaded and it does seem possible to get a workable asset SWF for desktop.
To be workable, it would need to run in-tandem with InDesign server as a command-line / API. I have contacted them for information about the achievability of a server-side solution, but... Even if they can help us (which remains a big if - I don't know that my customer wants to be the first to implement a server-side solution based on this) we will need to modify a number of systems to make it work and there will be additional licencing, technical headaches and so on for ongoing maintenance.
Is there a good reason why we can't simply opt in or out of processing byte code from downloaded SWF files?
It seems to me that we wouldn't need to do anything at all, and certainly wouldn't have to introduce a costly third-party product and additional servers, if we could simply ignore the downloaded ABC.
G
-
21. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Lorenzo Nuvoletta Mar 18, 2013 3:59 PM (in response to Nimisha1)I am sorry, it was another issue that indirectly was causing the loader to break...
so far with Air 3.7 SWF seem to unload and reload fine.
-
22. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 19, 2013 3:59 AM (in response to Lorenzo Nuvoletta)Hi Nimisha,
I have downloaded the SDK from labs, but Flash Builder is throwing up a nasty error as follows;
Description Resource Path Location Type unable to open 'E:\sdks\4.6.0_AIR3.7_LAB\frameworks\libs\player\11.5\playerglobal.swc' OSMF2.0.2494 Unknown Flex Problem I built the SDK in the same way as I had previously done for 3.6,3.5,3.4 etc... so...
Is there something I'm missing? I know for 3.6, I had to download a slightly different package as per Colin Holgate's post here; http://forums.adobe.com/message/5129146#5129146#5129146
Can you let me know as I would like to test against 3.7, thanks.
G
-
23. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 20, 2013 12:07 AM (in response to Gaius Coffey)Hi Gauis,
The SDK which is available at Labs is the one which contains ASC 2.0 and it is not compatible with Flex projects. That is why you're facing this Flex problem issue.
We are working to make SDK available on Labs which contains ASC 1.
Thanks for letting us know.
Sorry for the inconvience caused.
-Nimisha
-
24. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 20, 2013 1:09 AM (in response to Nimisha1)Thanks, Nimisha,
Is there a reference somewhere that I can read to understand the difference between the two? It seems a bit bizarre that you need anything different for Flex, which is surely just a collection of ActionScript 2.0 classes and assets as per everything else.
Also, can you respond to this;
"Is there a good reason why we can't simply opt in or out of processing byte code from downloaded SWF files?"
Obviously, from everybody's perspective, it is preferable _not_ to require the introduction of an expensive third-party product and yet another technology to supply what we _already_have_ just in a slightly modified form...
G
-
25. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Divij Kumar Mar 20, 2013 6:00 AM (in response to Gaius Coffey)Regarding the query:
"Is there a good reason why we can't simply opt in or out of processing byte code from downloaded SWF files?"
A downloaded SWF having bytecode is equivalent to having a part of the executable code of your app being downloaded at run-time. This is not allowed by Apple. Refer section 3.3.2.
3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.
Regards,
Divij
-
26. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 20, 2013 6:32 AM (in response to Gaius Coffey)Regarding query:
Is there a reference somewhere that I can read to understand the difference between the two? It seems a bit bizarre that you need anything different for Flex, which is surely just a collection of ActionScript 2.0 classes and assets as per everything else.
The problem here is that ASC 2.0 supports ActionScript only and not MXML.
You can get more info about ASC 2.0 here http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/adob e-actionscript-compiler-20-release-notes.pdf
-
27. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 20, 2013 7:20 AM (in response to Nimisha1)@Nimisha:
Thanks for the explanation, it raises a few questions for me, though! It looks as if it says I am getting sub-optimal performance by building using Flex rather than doing a pure-AS project. That seems like rather a huge jump - is Adobe moving away from Flex?
@Divij:
Thanks for the clarification; I've been trying to get a clear answer to this one for a long while (cf: post #10). To me, the code is not executable as there is no means to execute it... But you're saying just the presence of the ABC in SWF is enough to block approval in the app store. So... Ok. We'll have to bite the bullet on that.
-
28. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
scottobot Mar 21, 2013 10:45 AM (in response to Gaius Coffey)Has someone been able to load a SWF from a remote location that has NO CODE and can actually read any properties of that loaded SWF (i.e. numChildren)? When I do this on iOS with a Standard build --- no matter what property of the loaded SWF I attempt to access --- the app crashes without any error message. Setting properties works fine, it's attempting to get them that causes the crash. This issue occurs with AIR 3.6 and 3.7, but not with 3.4.
I have a simple test case explained here that recreates the issue:
-
29. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Gaius Coffey Mar 22, 2013 2:31 AM (in response to scottobot)@scottobot
Iterating children and removing the first one works for me.
G
@Nimisha
Is there a way to receive notification when an ASC1 version of 3.7 is available for beta?
Thanks,
G -
30. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Mar 22, 2013 2:59 AM (in response to Gaius Coffey)Gaius,
No there is no such way. It will be shown at the http://labs.adobe.com/downloads/air.html once it is available.
Thanks,
Nimisha
-
31. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
scottobot Mar 22, 2013 8:27 AM (in response to Gaius Coffey)@Gaius
Even with 3.6? I didn't get the crash with the recent 3.7 released on March 20th. But still get it with 3.6.
-
32. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Antonio Canepa Jul 23, 2013 4:15 AM (in response to Divij Kumar)Hi All,
I'd like to revive this thread and ask for further clarification of why SWF reloading isn't supported in AoT builds for iOS for SWF assets that have ABC. When we package these assets using ADT it strips the bytecode from these files and packages it within the primary application SWF so I don't think that Apple ToU compliance is an issue any longer. I assume there must be a technical limiation in how the loaded SWF with stripped ABC is linked back up with it's bytecode after loading.
Is this a limitation of the AIR runtime that can be worked around in the future, or something that stems from a technical limitation of how the cross-compiled code actually executes under iOS? In otrher words, can it be fixed in a future release of AIR?
It seems to me that the promise of using AIR is the ability to target web and iOS from the same codebase. If you have an existing application of some complexity targeting web then it's likely loading assets on demand and reloading them later as needed (Ex. we have over 700 items in game that can be equipped on avatars and each is a separate SWF asset). Having to extensively modify the app's asset manager for the iOS platform crates the need for divergent codebases at the core level for each platform. It seems like this is an important flaw to address if Adobe wants to target mobile gaming.
-
33. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Blakflag Jul 30, 2013 12:20 PM (in response to FLAdude)I would also like more information about the issues raised in this thread. What is the current behavior as of Air 3.8? Is there any way to pull from very large collections of swfs (containing ABC) without either the danger of memory filling up or refusal to reload swfs?
What about SWFS lacking ABC? Are those safe again or still under the same new restrictions? This issue is pretty crippling for my use case, which is to port a large legacy application (with ABC in the swfs) to iOS.
-
34. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Antonio Canepa Sep 5, 2013 5:32 PM (in response to Nimisha1)Hi Nimisha,
Do you have insight to my question about why SWF reloading isn't supported under iOS for SWF assets with bytecode? It would be helpful to understand the Adobe roadmap here for AIR under iOS and if this is an issue that may be addressed some time in the future, or a technical limitation due to something within iOS.
-
35. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Nimisha1 Sep 5, 2013 11:30 PM (in response to Antonio Canepa)Hi Antonio,
Currently "swf reloading on iOS doesn't work in AOT mode" is the bug with Runtime so I request you to open a new bug report on this over at bugbase.adobe.com?
Once the bug has been added please post the URL here at the forum so that others affected can add their votes and comments?
Thanks,
Nimisha
-
36. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Antonio Canepa Sep 6, 2013 2:58 AM (in response to Nimisha1)Nimisha,
OK, wow, for some reason after reading this blog post I thought the "SWF Reloading" section was stating that SWF reloading was disallowed by design: http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air- apps-on-ios/
I think it's the phrase "reloading a SWF will not be allowed for AIR apps for iOS in AOT mode" which made me think that Adobe had decided to not allow this behavior, perhaps due to some constraint of iOS. If this is instead a fixable bug with the AIR runtime, then I'll definitely write it up in the bugbase and add the link back here so people can upvote it.
Thanks.
-
37. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Antonio Canepa Sep 6, 2013 3:32 AM (in response to Nimisha1)On a related subject: Do you know if the requirement that SWFs are loaded into a single ApplicationDomain under iOS is because multiple ApplicationDomain support hasn't been implemented under the iOS runtime, or is there some other reason?
I was going to create a separate forum subject for this and write it up in the bugbase if appropriate, but thought you could give me a little more information before I do. We have serious name collision issues with the SWF assets in our product due to the required use of the single ApplicationDomain. None of the other runtimes work this way, so it seems like this is a major flaw for porting existing Flash apps to iOS.
Thanks.
-
38. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Blakflag Sep 17, 2013 9:41 AM (in response to Nimisha1)Did anyone ever find or log a bug about SWF reloading? So far I have searched Bugbase but could not find anything related to it. This is a big problem for me. I wish a developer could comment on why reloading is prohibited.
I did find a workaround but it's far from ideal... it's possible to save swf data into a bytearray and load it back up again (cache the bytes). Obvious downside being the cached bytearrays eats your memory up, although maybe not as much as hanging on to all the movieclips (?)
-
39. Re: What's the solution for using a SWF graphic more than once since reusing your graphics is 'dropped'?
Blakflag Sep 19, 2013 3:01 PM (in response to Blakflag)I just posted a bug about SWF reloading:




