Setting Parameters flash from php

Hi my name is guy.
I would like to set these parameters in flash using a
php/mysql database :
button1.maxQuantity
button1.name
button1.option1Name
button1.option1Value
button1.price ;
How would I go about doing that?
Thank You
Guy
Text

1. The link seems to show what looks like a DataGrid
component. In any case you have a multi dimensional set of data you
need to attach to the send_lv. When the user selects an action to
send the data to the server, you need to assemble it from the
places you have it saved and attach to the send_lv.
2. I am confused about button1. I do not think Flash
Component Button component allow you to add variables. Plus the
name does not seem to mean anything so I cannot correlate it to the
screen. Is it the submission button? Are these the add to cart
buttons?
I think your problem is not so much sending data to PHP it is
more being able to have the data you need to send to PHP available
when the user takes that action. So perhaps you need to work on
displaying what you want to send in the Flash output window and
then worry about getting it to PHP. The LoadVars part is fairly
straight forward.
In general looking at the screen, you have items added to a
list display which represents a shopping cart. At some point the
user will interact to send the data to the server. The data needs
accessed in a way you can attach to the send_lv. Perhaps you can
simply loop through the display list. Or you could keep an internal
array of objects where each object defines the items and this array
is updated when add, edit and delete actions are taken by the user.
For example in the array of object scenario looping a list of
items we will be able to code like this:
send_lv.totalItems = cart.length;
for (var i:Number; i <= cart.length;i++)
send_lv["productId" +i]. = cart[1].productId;
send_lv["price" +i]. = cart[1].price;
send_lv["quantity" +i]. = cart[1].quantity;
On the PHP side you would have in $_POST or $_REQUEST
something like this
totalItems
productId1
price1
quantity1
productId2
price2
quantity2
productId3
price3
quantity3
But if the data is in a nice display component, looping
through the display component will save the overhead of an
additional storage place.
So are we seeing a List component or a DataGrid for the
shopping cart? That will help determine the code to pass the data
to send_lv.

Similar Messages

  • High Score Table: Writing a Simple Text File with Flash and PHP

    I am having a problem getting Flash to work with PHP as I need Flash to read and write to a text file on a server to store simple name/score data for a games hi score table. I can read from the text file into Flash easily enough but also need to write to the file when a new high score is reached, so I need to use PHP to do that. I can send the data from flash to the php file via POST but so far it is not working. The PHP file is confirmed as working as I added an echo to the file which displayed a message so I  could check that the server was running PHP - the files were also uploaded to a remote server so I  could test them properly. Flash code is as follows:
    //php filewriter
    var myLV = new LoadVars();
    function sendData() {
    //sets up variable 'hsdata' to send to php
    myLV.hsdata = myText;
    myLV.send("hiscores.php");
    I believe this sends the variable 'myText' to the php file as a variable called 'hsdata' which I want the php file to write into a text file. The mytext variable is just a long string that has all the scores and names in the hiscore. OK, XML would be better way of doing this but for speed I just want to get basic functionality working, so storing a simple text sting is adequate for now. The PHP code that reads the Flash 'hsdata' variable and writes it to the text file 'scores.txt' follows:
    <?php
    //assigns to variable the data POSTed from flash
    $flashdata = $_POST["hsdata"];
    //file handler opens file and erases all contents with w arg
    $fh = fopen("scores.txt","w");
    //adds data to file
    fwrite ($fh,$flashdata);
    //closes file
    fclose ($fh);
    echo 'php file is working';
    ?>
    Any help with this would be greatly appreciated - once I can get php to write simple text files I should be ok. Thanks.

    Thanks for your help.
    I have got Flash working to a certain extent with PHP using loadVars but have been unable to get flash to receive a variable declared in PHP. Here's my Flash code:
    var outLV = new LoadVars();
    var inLV = new LoadVars();
    function sendData() {
    outLV.hsdata = "Hello from Flash";
    outLV.sendAndLoad("http://www.mysite.com/hiscores/test23.php",inLV,"post");
    inLV.onLoad = function(success) {
    if (success) {
      //sets dynamic text box to show variable sent from php
      statusTxt.text = phpmess;
    } else {
      statusTxt.text = "No Data Received";
    This works ok and the inLV.onLoad function reports that it is receiving data but does not display the variable received from PHP. The PHP file is like this:
    <?php
    $mytxt =$_POST['hsdata'];
    $myfile = "test23.txt";
    $fh = fopen($myfile,'w');
    //adds data to file
    fwrite($fh, $mytxt);
    //closes file
    fclose ($fh);
    $mess = "hello there from php";
    echo ("&phpmess=$mess&");
    ?>
    The PHP file is correctly receiving the hsdata from flash and writing it to a text file, but there seems to be a problem with the final part of the code which is intended to send a variable called 'phpmess' back to Flash, this is the string "hello there from php". How do I set up Flash and PHP so that PHP can send a variable back to Flash using echo? Really have tried everything but am totally baffled. Online tutorials have given numerous different syntax configurations for how the PHP file should be written which has really confused me - any help would be greatly appreciated.

  • Cannot pass variables from PHP to actionscript 3.0

    I am using CS3 and I write the following code as to pass variable to flash from PHP
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    PHP file
    <?php
       echo ('values = 8');
    ?>
    But I always get the error and cannot get the values by using trace();
    Before i try to use "myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;" I still get the same error.
    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
              at Error$/throwError()
              at flash.net::URLVariables/decode()
              at flash.net::URLVariables$iinit()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    Can anyone help me?

    The error is fixed.The new version is like that
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    php file
    <?php
       echo "values=8";
    ?>
    The output finally is "null" in flash file. Why does it happen? It should give me 8 when I input trace(myValue);

  • Passing variables from php to flash and the opposite

    Hi guys, im trying weeks now to solve this problem but nothing yet
    If someone could just tell me how to pass variables from flash to php and the opposite i would be thankful!!! Please help!

    I have recently had to learn this, so this may not be the best way but it worked for me
    I suggest looking at the code below stripping out everything you don't need (e.g. the databse stuff) and just get a simple string going back and forward
    have a go and post any problems here and I'll try and help
    in flash i have
    private function getBalanceAndXP():void
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "getBalance";
              variables.fbid = userID;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.addEventListener(Event.COMPLETE, onBalanceComplete);
              loader.load(request);
    private function onBalanceComplete(e:Event):void
              var loader:URLLoader = e.target as URLLoader;
              loader.removeEventListener(Event.COMPLETE, onBalanceComplete);
              var variables:URLVariables = new URLVariables(loader.data);
              _balance = parseInt(variables.balance); // class variable
              _experience = parseInt(variables.experience); // class variable
    public function setBalanceAndXP(balance:int, experience:int):void
                _balance = balance;
              _experience = experience;
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "setBalance";
              variables.fbid = userID;
              variables.balance = _balance;
              variables.experience = _experience;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.load(request);
    and then I have my php file
    <?php
    $func = $_POST["func"];
    $fbid = $_POST["fbid"];
    $balance = $_POST["balance"];
    $experience = $_POST["experience"];
    $numVariables = 0;
    $link = mysql_connect("localhost","username","password");
    mysql_select_db("databaseName");
    if ($func == "getBalance")
              getBalance($fbid);
    else if ($func == "setBalance")
              setBalance($fbid, $balance, $experience);
    mysql_close($link);
    function getBalance($fbid)
              $query = "SELECT balance, experience FROM tableName WHERE fbid = '".$fbid."'";
              $result = mysql_query($query);
              $row = mysql_fetch_row($result);
              writeVariable("balance", $row[0]);
              writeVariable("experience", $row[1]);
    function setBalance($fbid, $balance, $experience)
              $query = "UPDATE tableName SET balance = ".$balance.", experience = ".$experience." WHERE fbid ='".$fbid."'";
              mysql_query($query);
    function writeVariable( $name, $value )
              global $numVariables;
              if ( $numVariables > 0 )
                        echo "&";
              echo $name . "=" . urlencode($value);
              $numVariables++;
    ?>

  • Values from Flash to PHP

    I am using AS2 and passing some values from flash to php,  flash files is on page file1.php   values are passing fine , it pass values when user click button
    when button is pressed {  var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1 "; myVal.send("file1.php", "_parent", "POST"); }
    Problem: when it pass the values , it refresh the page and Flash File is also refreshed and Flash file start from frame 1 and all the values on flash becomes default  in other words when user click "file1.php" is sumbitted , so the page is refreshed What is the solution , that after passing values the page remains or flash reamins as it is ( not refresh the contents )

    use:
    var receiveLV:LoadVars=new LoadVars();
    receiveLV.onData=function(src){
    var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1 "; myVal.sendAndLoad("file1.php", receiveLV,"POST"); }

  • LoadVars-using send to pass a variable from flash to php

    For the life of me, I've tried everything:
    I've researched LoadVars on Adobe forum, used David Powers'
    books, googled 'flash to php', LoadVars, etc. and tried
    sendAndLoad, send, and using $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS but I keep getting this same error. any advice
    please?
    I have a Unix server running Apache/PHP 4 - LoadVars worked
    to load name-value pairs into an array -see thread)
    My goal with this simple app is to prototype being able to
    pass a variable from flash to a variable in php.
    Parse error: syntax error, unexpected T_VARIABLE in
    flash_to_SQL.php on line 5
    Actionscript 2.0 code:
    var c :LoadVars = new LoadVars();
    c.testing = "123FOUR";
    c.send ("
    http://127.0.0.1/flash_to_SQL.php","_self","POST");
    php code: (I also tried $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS)
    <?php
    //mysql 4.1.2, php 4 , NO mysqli
    ecbo $_REQUEST ['testing'];
    /?>

    var formData:LoadVars = new LoadVars();
    formData.fname = "Name";
    formData.send("
    http://www.website.com/flash_php.php",
    formData, "POST");
    <?php
    $name = $_POST['fname'];
    echo $name;
    ?>

  • Flash Builder 4.5 for PHP - show variable from PHP in app

    I have searched for hours and I can't figure this out…
    Is there a way to somehow "echo" my PHP code in my MXML file ?
    I know you can't echo something from PHP to MXML, so here's what I have done :
    I get my informations from my database, I need to show an image and its title, so I put the following code in a variable :
    <mx:Image id="laniraBlanche" x="25" y="65" width="210" height="126" source="'.$row->image_mini.'" click="selectLaniraBlanche()" rollOver="seePicture()" rollOut="outPicture()" />                                              <s:Label x="25" y="155.85" text="'.$row->nom.'" width="210" textAlign="center" height="37" fontSize="19" backgroundColor="#676666" verticalAlign="middle" fontFamily="Georgia" color="#FFFFFF" click="selectLaniraBlanche()" rollOver="seePicture()"  id="laniraBlancheTxt" rollOut="outPicture()" />'
    Then, I return that variable.
    I find the function where my var created is returned from the "Data/Service" tab, I am on Design mode on Flash Builder, and I "drop" my function where I want my image and text to show on my app.
    I tryed dropping it in a "group", it doesn't show anything. I tryed several other options, and nothing worked.
    So my question is, how could I have this code created in PHP show on my application ?
    Thank you  for your help

    I also have Flash Builder 4.5 for PHP and the ANT view does not show when going to Window -> Show View --> Other.  I could not find it in any of the folders.
    However, I was able to add it by hitting Command 3 (CTRL 3 on PC) and typing Ant.

  • Send data from PHP - Flash - PHP

    Hi,
    I have some issue with passing data from Flash to PHP and
    reciprocally.
    when i browse the FlashDataExchange.php file (which includes
    the flash)
    it does not redirect automatically to the 2nd PHP page...
    And i do not get any data on the 2nd PHP page....
    i'm lost, what do i do wrong ?
    thanks for your help.
    Alain
    i have the following AS3 code :
    import flash.external.*;
    myButton.addEventListener("click", sendData2PHP);
    //var link2:String = "
    http://192.160.1.2/test/flashdataexchange.php";
    var link:String = "
    http://192.160.1.2/test/DataExchangeResult.php";
    var request:URLRequest = new URLRequest (link);
    var loader:URLLoader = new URLLoader (request);
    var variables:URLVariables = new URLVariables();
    request.method = URLRequestMethod.POST;
    request.data = variables;
    var curUrl:String = String( ExternalInterface.call("
    function(){ return
    document.location.href.toString();}"));
    function sendData2PHP(evt:Event):void
    variables.lg = myField1.text;
    variables.address = myField2.text;
    variables.field2 = curUrl;
    loader.addEventListener(Event.COMPLETE, onComplete);
    loader.addEventListener(IOErrorEvent.IO_ERROR, sendIOError
    loader.dataFormat = URLLoaderDataFormat.TEXT;
    loader.load(request);
    function onComplete (event:Event):void
    Text1.text = event.target.data;
    My DataExchangeResult.php file looks like that:
    <html>
    <head>
    </head>
    <body>
    <?php
    $lg=$_POST['lg'];
    $ad=$_POST['address'];
    $f2=$_POST['field2'];
    echo "test : ".$ad ;
    ?>
    </body>
    </html>
    and my FlashDataExchange.php file is the following one:
    <html>
    <head>
    </head>
    <body>
    <?php
    echo "-- POST -- <br>";
    echo "Lg : ".$_POST['l']."<br>";
    echo "Address : ".$_POST['address']."<br>";
    echo "f2 : ".$_POST['f2']."<br>";
    echo "<br>-- GET -- <br>";
    echo "Lg : ".$_GET['l']."<br>";
    echo "Address : ".$_GET['address']."<br>";
    echo "f2 : ".$_GET['f2']."<br>";
    ?>
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
    width="400" height="200" id="FlashdataExchange"
    align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="FlashdataExchange.swf"
    /><param
    name="quality" value="high" /><param name="bgcolor"
    value="#006600" />
    <embed src="FlashdataExchange.swf" quality="high"
    bgcolor="#006600"
    width="400" height="200" name="FlashdataExchange"
    align="middle"
    allowScriptAccess="sameDomain" allowFullScreen="false"
    type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>
    </body>
    </html>

    &gt; it does not redirect automatically to the 2nd PHP
    page...
    URLLoader does not ever change the page location, it only
    loads data from the URL. To change pages, you need to use
    navigateToURL(), which can also send POST/GET variables along with
    the URL request.
    &gt; And i do not get any data on the 2nd PHP page....
    A quick look at your code looks correct to me: you are
    listening for the complete event, dataFormat is text, and PHP is
    echoing. However, check for httpStatus event and see if it gives
    you anything interesting... I can't get to the link myself, aka
    404. Also check the securityError event.

  • [WPF] AutoCompleteBox: set parameters from code behind

    Hi,
    I'm using AutoCompleteBox from Codeplex.com
    I would set some parameters from code behind... 
    In XAML, I defined namespace:
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    After using AutoCompleteBox:
    <toolkit:AutoCompleteBox
    x:Name="myAutoComplete"
    ItemsSource="{Binding Source={StaticResource DomainDataViewModel}, Path=SampleProperties, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
    SelectedItem="{Binding Name}"
    ValueMemberPath="Name"
    ItemTemplate="{StaticResource PropertyBoxItemTemplate}"
    MouseLeave="PropertyAutoCompleteBox_MouseLeave"
    >
    </toolkit:AutoCompleteBox>
    If I would set any parameter from code behind, in my.xaml.cs, I not found myAutoComplete, why?
    Thanks.

    >>I inserted the AutoCompleteBox as DataGridTemplateColumn.CellEditingTemplate.
    Then you cannot access it directly from the code-behind as I told you.
    >>I would apply a FilterCustom and a ItemFilter.
    You could handle the Loaded event for the AutoCompleteBox and set any of its properties in there:
    <toolkit:AutoCompleteBox
    x:Name="myAutoComplete"
    Loaded="myAutoComplete_Loaded"
    ItemsSource="{Binding Source={StaticResource DomainDataViewModel}, Path=SampleProperties, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
    SelectedItem="{Binding Name}"
    ValueMemberPath="Name"
    ItemTemplate="{StaticResource PropertyBoxItemTemplate}"
    MouseLeave="PropertyAutoCompleteBox_MouseLeave"
    >
    </toolkit:AutoCompleteBox>
    private void myAutoComplete_Loaded(object sender, RoutedEventArgs e)
    AutoCompleteBox myAutoComplete = sender as AutoCompleteBox;
    //set properties or do whatever here...
    myAutoComplete.ValueMemberPath = "Name";
    dynamic dataObject = myAutoComplete.DataContext;
    //access any properies of the data object in the DataGrid...
    How to do filtering is a completely other question that should be asked in a new thread though. It has nothing to do with your original question.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vecto​r signal analyzer ) to measure such as RF frequency or power on the instrument​? Thanks

    I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vector signal analyzer ) to measure such as RF frequency or power on the instrument?
    I just want to set something on the front panel that will execute the Serial parameters first and then pass these settings to vector signal analyzer
    Thanks
    Phong

    You transfer data with wires.
    Frankly, I'm a little confused by your question. I can't think of any reason why you would want to pass serial parameters (i.e. baud rate, parity) to a GPIB instrument. Please explain with further detail and attach the code.

  • Passing variable from php into flash, help please

    Here are what I'm having:
    <?PHP
    $testVal = "This is a test";
    $test = urlencode($testVal);
    $out = "test=". $testVal;
    echo $out;
    ?>
    // and this is my flash file
    function getData() {
    // Prepare request
    var urlReq:URLRequest=new URLRequest("http://localhost/test.php");
    urlReq.method=URLRequestMethod.GET;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat=URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, completeHandler);
    loader.load(urlReq);
    function completeHandler(evt:Event) {
    var vars:URLVariables = URLVariables(evt.target.data);
    trace(" TEST = ", vars.test);
    trace(" TEST = ", unescape(vars.toString()));
    // and below is the ouput
    TEST = undefined
    TEST = test=This is a test
    I've tried with several different ways to get ONLY the value of the variable - that means I only want to have "This is a test" returned, but I either got "undefined" or the whole thing "test=This is a test", instead.
    I'm new to Flash and PHP. Please help.
    Thanks

    There's no need to write any fake variables out, Flash does not need that. OK, here's a simple PHP script like yours - I called it test.php
    <?PHP
         $testVal = "This is a test";
         $out = "test=". $testVal;
         echo $out;
    ?>
    And the AS to call it:
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    myLoader.load(new URLRequest("http://www.mydomain.com/test.php"));
    myLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);
    function dataLoaded(e:Event){  
        trace( e.target.data.test);
    You will see 'This is a test' traced to the output window.
    HTH

  • Insert using Spatial Index fails when called from PHP

    I have a stored procedure that inserts into a table with a spatial index on one of its fields.
    When I run the procedure from SQL Server Management Studio it runs just fine.
    When I run it from PHP, it returns the error: "INSERT failed because the following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes
    on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations"
    From within Management Studio, I have tried many different combinations of settings, until I wound up with the list I have in the procedure below.
    Within Managment Studio the error changes based on the options I have set, but PHP always replies with: 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'
    I have configured PHP to use the same SQL user as management studio, and I have tried both mssql_query and mssql_execute with bound parameters.
    The spatial index is on the field post.location If I remove the spatial index it works, but I need the spatial index.
    CREATE PROCEDURE insert_post ( @subject AS VARCHAR(250), @body AS VARCHAR(2000), @latitude AS FLOAT, @longitude AS FLOAT ) AS BEGIN
    SET NOCOUNT ON
    SET ANSI_WARNINGS ON
    SET ANSI_PADDING ON
    SET CONCAT_NULL_YIELDS_NULL ON
    SET NUMERIC_ROUNDABORT OFF
    DECLARE @location AS geography = geography::Point(@latitude, @longitude, 4326)
    INSERT INTO post
        subject,
        body,
        location
    ) VALUES (
        @subject,
        @body,
        @location
    END

    Hi Charles
    Your issue looks like it have two basic sources: (1) The connection string properties, (2) The table structure and the data which you try to insert.
    (1) The connection string properties can be specified in various ways.
    You can set most of them during the connection, depending on the provider which you are using. We did not get from you any information about the PHP code, so we have no information regarding this part.
    The connection properties can be changed after the connection was made, which is basically what you have try to do. But we don't know what properties
    are differents (since you .. the PHP code..) but you can check those properties dynamically, insert them to a table and then compare. To check all the properties you can use this post:
    http://ariely.info/Blog/tabid/83/EntryId/153/SQL-Server-Get-Connection-Properties.aspx
    (2) We need to understand your
    table structure and compare it to yours query. Please post your DDL+DML (queries to create the table and to insert some sample data), and the full SP code
    as it is now.
    [Personal Site]  [Blog]  [Facebook]

  • Embedded Flash in PHP - Need help!

    Hello everyone!
    We're having problems embedding Flash-files into our .php-files, so I thought the best place to ask for help would be the official Flash-forums :-) First of all, I'll let you know what exactly we're doing....
    We have a few flash-files which you should only be allowed to view once you're logged in and authenticated to our "portal". You can only view those files over some sort of JavaScript-Popup-Flashplayer thing (personally not too much into JS). The JS-Player requires the flash-files to be available over an exisiting URL (such as http://page.domain/flash/file.swf) - And this is where the whole problem begins...
    After hours of research and conversing with my collegues and the project-management, we decided to use the following technique to still keep those URLs for the JS-Player while preventing the user from simply accessing our "top secret flash movies" by typing in the URL in their browser...
    We move the Flash-folder to a location outside of our document root -> Flash-files can't be randomly accessed or downloaded via the URL.
    We use an Apache-plugin called "mod_rewrite" to rewrite/redirect URLs that look similar to http://page.domain/flash/*.swf to a PHP-file -> We can work with REQUEST_URI to see which flash-file the user wanted to view. Now, inside that PHP file we check wether the user is authenticated or not and either embed the flash-file into the PHP-file or redirect him to an error-page. In theory, the user could still view the flash-file over the URL (without even noticing PHP, since the URL stays http://page.domain/flash/file.swf, hence a perfect fake, no? ;-) ) and everything actually works exactly the way we wanted..........IN FIREFOX!
    Now we went live with our application and we had to realise that one of the only things we haven't tested in other browsers (this being one of them) don't work the way we want and instead of viewing/playing the film, we get to see a white window in the JS-Player, while it's trying to download a file called "filename_swf" (underscore instead of dot?) when you access the movie over the URL (http://page.domain/flash/file.swf).
    How we embed Flash into PHP:
    Headers + outputting the flash-files content....
    header('Content-Type: application/x-shockwave-flash');
    header('Expires: Thu, 01 Jan 1970 00:00:00 GMT, -1');
    header('Cache-Control: no-cache, no-store, must-revalidate');
    header('Pragma: no-cache');
    echo file_get_contents($request);
    As I said, this works just fine in Firefox, however we're sure most of our users will be using IE, in which it doesn't work at all. I personally believe we're missing some sort of header or we have to set a different header depending on the browser...so I thought the best place to ask about Flash Headers would be the actual flash forums. Maybe I'm even totally wrong and missing out something crucial and someone can point me in the right direction...
    Thanks!

    Thank you for your help.
    I have uploaded the skin to the same directory as the video.
    It's now showing. Do I have to reference it on the code?
    http://www.custommlmleads.com/test.html
    skin :
    http://www.custommlmleads.com/VIDEO/SkinUnderPlaySeekStop.swf
    Thank you

  • Can't I stop the HOG Flash from Firefox? I use FlashBlock but a constant fight. Often both cores maxed at 100%,laptop very slow until I kill Flash in Tsk Mangr

    Flash is the problem. It often maxes both cores of my dual core processor and brings processing virtually to a halt.
    Originally, I killed flash in Task Manager whenever i heard my fan come on and also noticed slow system response. This was very distracting and took a lot of time.
    Then I installed FlashBlock, but it doesn't stop Flash unless you tell it for each and every website.
    When reading news, and opening a link, I will hear the fan start, so i click the block button/icon in Firefox to block the site from using flash. Some sites don't launch with the FlashBlock icon. I have to use the manual kill option for them. This extremely frustrating. I understand why Steve Jobs hated Flash.
    I don't like Apple's money-sucking wallet-leach behavior, so I use WinTel and live with the frustrations of which this is the biggest. HTML5 supposedly is the solution, but site builders use flash.
    FireFox needs a flash control switch built in the browser to give control of Flash - block/ask, etc. functionality.

    By the way, Firefox does have a Click-to-Play feature you can use for Flash. That will delay Flash from starting on a page until you approve it. However, the approval is per site, I believe, so you may need an add-on to control it per page.
    To set "Ask to Activate", open the Add-ons page using either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Plugins. Look for "Shockwave Flash" and change "Always Activate" to "Ask to Activate".
    When you visit a site that wants to use the Flash, you should see a notification icon in the address bar and one of the following: a link in a black rectangle in the page or an infobar sliding down between the toolbar area and the page.
    Not a solution, but hopefully will help a bit.

  • Exporting Text data from PHP to Oracle CLOB data (Carriage return - issue)

    This is my original text content in PHP - Data type - Longtext
    SECTION - 1
    This a test description.This a test description.
    This a test description.This a test description.
    This a test description. This a test description.I exported the above content from PHP as a SQL script file (insert into.. ) - export.sql [ insert into table_name (id, text_content) values (1, '') ]
    while exporting data from PHP table into export file.. it replaced the "Carriage return" with "\r\n\r\n" in the insert statement for text_content column
    When I run this INSERT statement in Oracle (for longtext, I have created a CLOB column in Oracle), the following text_content data is inserted into CLOB column in Oracle.
    SECTION - 2
    This a test description.This a test description.\r\n\r\nThis a test description.This a
    test description.\r\n\r\nThis a test description.This a test description.Now I have created a item named P1_TEXT_CONTENT of type TEXTAREA and try to fetch the CLOB data into this page item.
    BUT textarea displays the entire content including "\r\n\r\n" as mentioned in SECTION - 2
    I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
    What are the options we have?
    Thanks,
    Deepak

    DeepakJ wrote:
    I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
    What are the options we have?Run an update on the Oracle table following the inserts to replace the escaped CR/LFs with real ones:
    update foo
    set clob_column = replace(clob_column, '\r\n', chr(13) || chr(10));You might want to experiment to see which characters are actually necessary. As an OS X/Linux user I'd probably just use a single LF chr(10).

Maybe you are looking for

  • How to make a backup without password

    I have tried to create new backups, but every time as they are with a lock on. have deleted itunes on pc n without help. bought a new computer without help. my problem is that I have two girls who have switched phones, the mobile phone that owned the

  • Select option for a character type field

    Hi all as per my requirement i have a selection for a data type char40 Hence in my wddoinit method i used the following code to generate the select options in WD create a range table that consists of this new data element   LT_RANGE_TABLE = WD_THIS->

  • PIX 501 keeps rebooting

    Hi, We have four remote sites with PIX 501's. They are approximately two years old, but we are unaware of how long this issue has persisted. We have found all of them incredibly sensitive to movement. If you stamp on the floor near one of them, it wi

  • How to reinstall IPhoto and garageband

    I have a Macbook Pro OSX Lion. Iphoto and garageband was preinstalled. When I will update it, there is a dialogue box that appears "We could not complete your purchase, product distribution file could not be verified." So I put it in the trash and we

  • What kind of collection show I use?

    if I want the data always stored in ascending order in the collection, what kind of data structure should I use? is there something like binary tree in java? thanks! null