Solved

Simple Variable Pass

Posted on 2008-06-26
5
188 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
  • 3
  • 2
5 Comments
 
LVL 25

Expert Comment

by:Squinky
Comment Utility
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
Comment Utility
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:
Squinky earned 250 total points
Comment Utility
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:Squinky
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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…
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…

763 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

9 Experts available now in Live!

Get 1:1 Help Now