?
Solved

Simple Variable Pass

Posted on 2008-06-26
5
Medium Priority
?
193 Views
Last Modified: 2010-04-21
I have a PHP page (1) within an iFrame.    A click on page 1 loads the iFrame with another PHP page (2) with an SWF contact form.    I need to pass a variable (from 1) using the GET method (or a different method)  to the SWF on page 2.         The variable needs to load into the SWF and change a dynamic text field to its value when the SWF loads.
0
Comment
Question by:homemadebyx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 25

Expert Comment

by:Marcus Bointon
ID: 21883637
Well you need to submit the value to page 2 from a form or link on page 1, which is a simple proposition. On page 2, your swf will be loaded by a PHP script, and it should embed the param that the swf wants within the swf's <object> tag (a 'flashvars' attribute IIRC). So page 2's PHP will have something vaguely like:

<object type="application/x-flash" src="movie.swf">
<param name="flashvars" value="<?php echo $varpassedfrompage1; ?>" />
</object>

I don't remember the exact syntax for flash embedding, but it should not be too dissimilar to this.
0
 
LVL 3

Author Comment

by:homemadebyx
ID: 21887271
thanks Squinky for the hint, but it didn't work.   After further research i found a working solution here,

http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_22460578.html?sfQueryTermInfo=1+flashvar+get

Thanks for the assistance,

x
0
 
LVL 25

Accepted Solution

by:
Marcus Bointon earned 1000 total points
ID: 21887561
What do you mean it didn't work? That answer does exactly what I suggested, embedding the submitted value into a flashvars param tag.
0
 
LVL 25

Expert Comment

by:Marcus Bointon
ID: 21887579
Ah, I just spotted that EE trashed the content that I included in my original post. Thanks EE, great job...
0
 
LVL 3

Author Closing Comment

by:homemadebyx
ID: 31471553
Squinky,

I'm sure you must be right.   It does appear very simular.   I don't know what EE might have done with your solution, but i'd like to make sure credit goes where credit is due.   I really appreciate your help.      

On a side note, i don't know how comfortable you are with actionscript, but i'm struggling to find help on another question,

http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_23519598.html

Thanks again,

x
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 …
Suggested Courses

752 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