Solved

loading dynamic images into flash movie

Posted on 2002-04-16
2
210 Views
Last Modified: 2012-05-04
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
Comment
Question by:volvo
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
axis_img earned 100 total points
ID: 6949220
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
 
LVL 7

Expert Comment

by:axis_img
ID: 6975299
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question