Solved

loading dynamic images into flash movie

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
The viewer will learn how to dynamically set the form action using jQuery.
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 …

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now