[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

loading dynamic images into flash movie

Hello

I'm using flash MX with php script.

I have created a wheel with spinning images.
Every frame has a image.

My question is how can i create a dynamic wheel so that i do not have to specify the images at creation
of my flash movie but call the variables from my php script.

I want to do this also with text.

Is this possible?????
0
volvo
Asked:
volvo
  • 2
1 Solution
 
axis_imgCommented:
Yes... It is possible. The simplest, and most common method would be to use Flash's loadVariables(url, location [, variables]) function (or maybe it is loadVariablesNum now, depending on whether the target is a number). The URL would be the php script that determines which images to use.

Your php script would determine which images to display, and then print out a single line to the browser. An example of the printout would be:

image1=image1.gif&image2=image7.gif&image3=image4.gif

Your flash movie would then just need to load those images based on the variable name that was passed. So something along the lines of:

var base_image = "http://www.domain.com/images/";
var img1 = base_image + image1;
var img2 = base_image + image2;
...

How you actually decide to implement this is up to you, but this is basically an overview of how it would work.

For more help, look here:

http://www.macromedia.com/support/flash/action_scripts/actions/loadvariables.html

You didn't really specify if you had any PHP specific questions. If you do have questions on how to randomly get the images, etc. then please let us know. In general though, using loadVariables() or loadVariablesNum() is the way to do this.

Good luck.
0
 
axis_imgCommented:
In the future, if you are not going to give an "A" grade, you could at least give an explanation of why it was not worth the A. I do not know you, yet I take the time to try and help you out. The least you could do is give the best grade possible. It doesn't cost you any more to do so, and it shows appreciation for the help.

Have a good day...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now