Solved

Simple Variable Pass

Posted on 2008-06-26
5
191 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 250 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

749 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