Solved

Flash 8 session to php

Posted on 2006-11-02
1
207 Views
Last Modified: 2012-05-05
URGENT
within my flash object i have buttons to change the language which is used for the site

how do i get my button to alter the php's current session variable $session['lang'];

Thanks in advance
0
Comment
Question by:Robinsonx6
1 Comment
 
LVL 11

Accepted Solution

by:
ch2 earned 500 total points
Comment Utility
To pass the session to flash 8, i'd use FlashVars:

            <param name="FlashVars" value="lang=$session['lang']">
            <embed FlashVars="lang=$session['lang']"</embed>

From here in Flash 8 you have set the variable _root.lang

To pass it to php use the next script in your button:

getURL('yourfile.php','_SELF','GET');

From here in php you have $_GET['lang']

in your php write something like this;

$session['lang'] = isset($_GET['lang']) ? $_GET['lang'] : $session['lang'];
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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

772 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

12 Experts available now in Live!

Get 1:1 Help Now