Passing A Variable From PHP To Flash

May 18, 2003

How do I pass a variable from a PHP script that already contains
a Variable - to my flash movie ?


$Access = True

Now when the Flash movie opens for the first time I want to read the content of $Access...if its true or false - to give user access to view the movie or not.

View 6 Replies


Passing Variable From Flash To Php & Back From Php To Flash

I am looking for some help in passing variable from flash to php & back from php to flash.

View 5 Replies

Jquery - Passing Variable To Flash?

In the html i have this code:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
ID=flaMovie WIDTH=554.6 HEIGHT=57.3>
<PARAM NAME=movie VALUE="main_menu.swf">


And the flash this:

First keyframe:

if (lang == "EN") {


2,3 keyframe only has some graph, and Stop() If lang is EN then i need to go keyframe 2, if not the go to 3.... On IE6 works problem. On FF 3.5 something not ok.. if i hit the refresh button on FF, then sometimes OK, sometimes not OK, sometimes only a part of the graphic shown on keyframe 3...i dont really understand.. Earlier i have no problem with flasvars on FF...something changed with FF 3.x? Any other way to pass variable to flash? (i dont want to use query string..)

View 2 Replies

Passing Session Variables Into Flash

I'm building a login scheme that uses PHP sessions to pass the key variables (i.e. $login and $password). into a flash movie.

Typically, I can easily pass variables into flash movies by calling the PHP scripts via LoadVarNum and using print to send them back.

However, this situation is a little different since the php session commands are actually part of the url that contains the embedded .swf. I have determined that the needed variables are in fact making it to the top level url but not into the .swf.

Does anyone know of an alternative way to pass the variables into the .swf (besides populating them into header since that would reveal the info in the link)???

I'm thinking that there may be an option in the embed command or something.

View 2 Replies

Hide Xml From Users While Passing It Into Flash

We have a little in-house LMS with courses built in Flash. Scores are updated and retrieved with POSTs to PHP scripts which query a MySQL database. All the course content and quiz questions are in xml files. Those XML files are easily accessible from a user's Temporary Internet Files (sort of SCORM style, for those familiar with it) and while you'd have to be pretty desperate to cheat at something like a Fire Safety test, it's still a vulnerability we'd like to solve.

I intend to move the quiz data (and eventually, the course content) into a MySQL database, then probably build the XML in PHP and echo that to the Flash course (as we've been doing to update and retrieve assessment scores). I think I could limit how and when the xml is displayed by passing hashes and shared secrets and whatnot between the PHP page and Flash, but this only limits outside access, and anyone viewing the course legitimately will still see the XML passed around (I think..).

Surely I'm not reinventing fire here. Is there a method or a technology in existence that allows the safe, discrete passage of xml into Flash? Ideally, I'd probably want to pass the questions and possible answers from MySQL to Flash, then pass the chosen answer back and do the marking server-side.. but time is money, and I'm looking for an answer that will require as little rebuilding of the flash framework as possible.

View 1 Replies

Flash - Passing Session To Actionscipt?

I know there is a lot of PHP and Actionscript questions here, but mine is a little differnt. I have a php website that uses sessions and if your not logged in you cannot acces a web page... I want the same for my Flash file, but want flash to see if there is a valid session on the php website and if there is play the flash, if not access denied..!

this if they download the flash file and are not logged into the PHP website they cannot play the file. here is my PHP session I.D I want to use for validation from PHP to Flash..

$member = "{$_SESSION['SESS_MEMBER_ID']}";
here is my PHP authentication that runs on every page
//Start session
//Check whether the session variable SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
header("location: access-denied.php");

View 2 Replies

Passing A JSON Encoded Data From My Flash File?

I'm passing a JSON encoded data from my flash file to php i traced the data output using firebug and i see it's being passed along to php but when i try to return the values back to flash through php i get an empty string can some one expalin why php is behaving like that? here is the code


$data = urldecode(utf8_decode(stripslashes($_REQUEST['data'])));
$decoded_result = json_decode($data);
echo output.'='.$decoded_result;

View 1 Replies

Javascript - Passing Flash Variables In Visual Basic

I have a simple standalone application written in Visual Basic that I'm porting to a browser based application using PHP/javascript. The original VB application has some simple embedded flash games with token and point counters. The token and point values are being passed as variables between the application and the game.

I'm trying to achieve the same effect in my PHP port without modifying the actionscript code( using the variables in actionscript that already exist). Below is Visual Basic code that's loading a value from a database and posting that value to flash using FlashVars:


View 1 Replies

Include Generated XML File Into Flash Vars While ALSO Passing Through Current Functions Into It?

In webpage.php the flashscript is calling a flash script with a flashvar: the playlist file which is a PHP generated XML file: playlist.php, it does that well so long as there are no extra functions in there. Now, in that XML-format playlistfile there needs to be a special function, besides the usual echo("");, namely the very special echo __(""); function that is already declared in webpage.php which needs to do something with the paragraphs residing within that xml file.

However, currently the retrieved file misses the function echo __();and says "no such function declared in that xml-format [playlist.php] file". The php functions that are currently included at the very top of webpage.php somehow do not pass-through-the necessary functions into the playlist file for it to recognise how to handle it, in order for that playlist to get those necessary functions working.

Apparently these are not passed through automatically/properly when residing in the flashvars?? Cause the echo __(""); works fine when called within webpage.php or via a normal php include(""); if those functions are in a different php file. But not working from the playlist.php file.


View 2 Replies

Variable To Flash

Basically I want it so that a person is on a php, they click on a link (i.e. a thumbnail) and then are taken to a new page which has an swf embedded in it.

This new page should pass a variable (for instance, the thumbnail id). I tried to do this by included the php variable in the 'src' tag whre I embed the swf, as I read that Flash will automatically detect that variable if I do. Code:

View 4 Replies

Send Variable To Flash?

I am working on Flash,Php site.Currently the Flash Developer calles my page called createJPG.php and sends me an image data.I recieve this data and create JPG from the Data.

What i want is, when the Flash developer send me data he can show a loader and when create JPG process is complete he can hide the loader.For this i want to pass him variable with value 1 as soon as the CreateJPG process is complete...

How can i pass this varialbe ??

View 2 Replies

Bring A Variable On Flash With AS2?

Can you show me an example of a very easy implementation in AS2 (action script 2.0) to bring a var from a php file. I have a php script who return a value into the var $result when it is executed, how can i use this var on flash?

View 1 Replies

Variable In Flash Object

my question is about flash object code and php.

how do i embed a php varible into a flash <object> coding?

this is my varible : <{$photo.imgsrc_photo}>

this is the flash object code : <param name="FlashVars" value="id=undefinedsrc= < == http://imageURL.jpg == > width=600height=600" >

View 4 Replies

Javascript - Send Xml To Flash As Variable

I have a flash file where I can pass xml from file :

script type="text/javascript">
var flashvars = {};
flashvars.xmlSource = "XML.xml";

Can I send xml from php in varible to flash example:

$xml = "?xml version="1.0 ...";
script type="text/javascript">
var flashvars = {};[code]....

View 1 Replies

Pass Variable FROM Flash To HTML?

I have a rather simple flash application users can make a quick username when connected, and the username is created inside the flash swf.Now, I have a cron job deleting inactive usernames every ten minutes (on my mysql database where these usernames are all stored and accessed by the other people online) which is fine. But it can still get cluttered up if a bunch of people sign off at once, there is still that 10 minute window before the cron job clears them.The users have an option to click log out in the flash application which is fine and works great. But of course many choose not to click log off they just click the browser x.I've looked into onbeforeunload and jquery's .unload but I still need a way to get the username variable that's IN flash INTO the HTML, then use a php script to run the delete username mysql query.EDIT::::: Maybe is there a way to create a UNIQUE string of numbers with php then pass that var to flash to include with the mysql row then since i already have that var since it was created on the html side, just along with the unload, have it delete the row that has that unique id?if i used something like md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']) to make a random iD how could i go about storing the result in a var i could place in the flash vars param then again in the jquery unload or javascript onbeforeunload if that would be better . im just more familiar with jquery

View 2 Replies

Pass A Variable Into Flash Actionscript?

Pass a php variable into flash actionscript below so that can play a video depending on the variable that is passed.

PHP Code:$queryvideo = "SELECT * from products where products_id='$products_id'";
$resultvideo = mysql_query($queryvideo) or die(mysql_error());
$rowvideo = mysql_fetch_array( $resultvideo );


View 6 Replies

Create An Image From Flash Variable?

I have this php code that receives variables form flash to create image which works fine.what i want to do is save that image after its been created on my server instead of showing it as is in the code belowhow do i go abut that to save it in this folder -----flashimages/

* Get the width and height of the destination image
* from the POST variables and convert them into
* integer values

View 2 Replies

Sending Db Info To A Flash Swf Via Variable

I have a client who wants a marquee of their top news story to scroll across the top of the page. the <marquee> tag does not validate - so I thought that flash would be an easy solution.

only problem is I am retrieving my data from a db - and for some reason the loadVariables function is only printing the name of my php variable. Code:

View 1 Replies

Problem With Session Variable And Passing Variable On Insert

I am trying to set a session variable along with my insert statement but on the next page when I do my query I get no results even though I know there are. Code:

View 5 Replies

Passing Multiple Variable Errors...last Variable Vanishes.

I have been trying to figure this one out for a few days now and it is starting to drive me mad. I'm sure this is something simple that I have done wrong but I can't for the life of me figure out what is wrong here. Some background.

I decided I needed to learn PHP, I really enjoy it but keep getting stuck on things like this due to my lack of knowledge. So I set myself a challenge to write a PHP CMS system using PHP, mySQL, XHTML and CSS. All was going fine (all be it rather slowly) until I tried to write the page to edit articles in the CMS.

I have the 'ID', 'title', 'venue' and 'article' stored in the database fine. I can pull entries out and display them fine. I now want to edit them using a browser. So I thought I would use the same form I used to add mySQL entries and change ti so that it loads in the article into the form fields depending on the id. (This is chosen through a link saying 'edit). Code:

View 7 Replies

Importing A Field From MySQL Into A Variable In Flash?

I have a query that is giving me the field that I require from my database using PHP.
What is the best way to import this variable into flash? Can I echo the number out on the page and have Flash import it that way? Could I use the Load Variable command? code:

View 10 Replies

Loads Variable Data From A Flash Form

I'm designing an email form processor that loads variable data from a flash form. I'm trying to clean up the php file so it's not to cluttered. I want the mail recipient to receive an visually appealing HTML message, so I've created an html file with the format. I bring this file in as an include(). I was thinking that it would be possible if I could somehow assign a variable to the included file. EG:

Include ("messageHTML.php");
$messageHMTL = include("messageHTML.php");

View 13 Replies

Flash - Pass Variable As FlashVars Via SWFObject?

I am trying to take a PHP variable and pass it along to Flash via Flash vars. My end goal is to pass a string formatted as XML to Flash, but because I'm struggling I've stripped everything down to the basics. I'm just trying to pass a simple PHP string variable to Flash via FlashVars with SWFObject but something isn't right. The page won't load when I try to pass the variable inside of php tags, but it will load if I just pass a hard coded string. The basic structure of my page is that I have some PHP declared at the top like so:


View 2 Replies

Passing JavaScript Variable To Session Variable?

I am trying to update/create session variable when I change the option thru a drop-down box. TThe value is stored in a javascript function. how I can pass this variable to my PHP session variable without using a AJAX request.

View 5 Replies

Passing Variable Into Function - Referencing The Variable?

I have a class which pulls in Twitter feeds and amalgamates them, they are put into an array ,sorted and combined. I then need to convert the 'published' time from unix to human . Within my class construct I have:

function __construct($inputs) {
$this->inputs = $inputs;


Part of this I believe is due to my lack of understanding of PHP terminology, which is making it hard to find anything in the manual . Am I trying to reference the 'published' array? What I need is the correct version of :


View 2 Replies

Passing Variable And Building A Db Ejection Or Put The Variable?

The variables below are passed into itemdetails2.php

PHP Code:

<a href="itemdetails2.php?id=". $content['id'] ."&platename=".$content['platename']."">

In itemdetails2.php I pull the variables from the url making available through out the whole script in itemdetails2.php by:

PHP Code:

<?php $shoename = $_GET['platename'];$id = (int)$_GET['id'];if( $id === 0){ exit('ID can only be an integer');}?>

After I make it available through out the whole script in itemdetails2.php I want to build a sql injection that takes the value of the variable $shoename and put it inside the OutputRating method parameter below

PHP Code:

<?php $ratingData = Rating::OutputRating('paul'); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { echo $ratingData; } ?>

Notice in the parameter it says paul instead of paul I want it to contain the shoename variable value in the url.


PHP Code:

<?php $shoename = $_GET['platename'];$id = (int)$_GET['id'];if( $id === 0){ exit('ID can only be an integer');}?><?php $ratingData = Rating::OutputRating('$shoename'); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { echo $ratingData; } ?>

is that correct to put $shoename variable in there just like I did in the last embed script?

View 1 Replies

Copyrights 2005-15, All rights reserved