I'm working on a flash based picture gallery for a fairly
specific website. The client submits text and images by way of a
form into a database. PHP later renders an XML index of the paths
to that data which my SWF file downloads. This works great on a
broad level... but every time the player is used, it works the
It would be great if I could have a PHP container html file,
which would be able to pass parameter or two to my SWF file right
off the bat... for instance, and index number... and that would
give me a way to customize the player based on it's path in the
So, the question is, can the html/php container pass a
parameter (or a few parameters) to an SWF file?
Sorry this was so long - I'm not sure why, but I gave a lot
of context this time... :-/
your php file can easily pass this by tagging it onto the end
of the file path string.
if that is your .swf path instead of "whatever.swf," it will
pass the variableA and variableB with values 10 and 20
respectively. Now, as I'm sure you see, you'll have to swap out the
Also, note you'll need the same additions in both instances
where your .swf path is named.
Perfect - and will I have to do anything interesting in flash
to get access to those variables, or will (in the case of your
example) I just automatically have access to "variableA" and
"variableB" in my swf file?