Solved

loading dynamic images into flash movie

Posted on 2002-04-16
2
211 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ajax and PHP 4 47
Reference key in foreach loop 4 40
pass foreach data in php into jquery ajax 10 51
assigning javascript variable to php variable 8 42
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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