Reputation: 39456
Overview:
I have a SWF banner ad template which loads in JSON from a platform that I have developed and then cycles through some products that were specified in that JSON. Each product is made up of your standard title, price and image.
On the platform, the user has the ability to modify the JSON feed via some UI tools such as image upload, title change etc.
Once they've done this, they can save and preview the ad. The preview is a SWF file embedded on the current page with some FlashVars that reference the location of the JSON they just created.
The request:
The user wants the ability to be able to archive all versions that they have created locally (as SWFs on their drive).
I offered a few solutions such as:
Unfortunately, they are pushing to have a single SWF downloaded which they can save as an encapsulated file. The idea is that this eliminates an abundance of files down the track, as well as the ability to place components in the wrong directories, etc.
Question:
I need to use PHP (if possible) to do the following:
Is this possible? If so, how?
Upvotes: 2
Views: 127
Reputation: 15955
I've heard of companies using the mxmlc
compiler to encapsulate a monolithic build creating custom SWFs server-side.
This has been leveraged to build SWFs on the fly which would otherwise require heavy loading of resources.
The approach:
PHP script would alter an ActionScript file, setting variables and [Embed]
resources.
PHP script would call mxmlc
command line compiler to build the SWF, essentially the same as Flash Builder would compile a pure ActionScript project.
Perhaps an ANT task could automate the build.
References:
Upvotes: 3