Solved

Simple Variable Pass

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

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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.

691 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