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

Similar Messages

  • Flash Player is causing my Web Pages to flash like crazy Need help!

    I need help, I'm running a computer with Windows 98 4.10.1998
    and Running Internet Explorer ver. 6.0.2800.1106IC
    I had some problems I have fix eveything but when I got to a
    web page it wants
    to install and run flash player if I do Install and run, all
    my web pages flash
    like crazy every clickable icon or line flash the screen
    makes it flicker so hard
    it is enough to give you a headache. Ad boxes on the pages
    flash like a lighting
    strorm. How do I fix this? I never had this before, I ran the
    flash player debug file
    that made no change. Help!

    Already checked the Event Viewer. The only thing I could find is this critical level event
    The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
    This only happens when I am running a flash video in IE10. In Chrome everything works fine. I downgraded flash player to 11.4 but with no luck.
    From the event viewer, the reboots started from sometime in september.(this is my parents' pc)
    I think I found the problem. I changed my video card, a 9600GT, a few months ago with a GT630. I switched back to the 9600GT, and it looks like the issue is not happening any more. But it's still verry ackward for the issue to happen only on IE10.
    I'm still testing to be sure that the video card is the problem.

  • Flash Video Player Need Help

    Hello everyone I am hoping someone here can help me.  I am going to school and I have an action scripting class.  For my final project we have to make a flash video player with a custom skin to upload to our websites. We did something similar to this with our first project which we made a player where the movies where embedded in the file itself but this is supposed to be a youtube like flash player where we can call in the files from another source.   
      We kind of got pressed for time and were not able to go into detail with this project so the teacher gave us the code and I put it in exactly how it should be but im pretty sure i have something misplaced or I am missing a step. I get 8 different errors when I go to test the movie. and nothing works.  Can someone please tell me what I am doing wrong or can you point me in the direction of a tutorial on this  as I have been searching for tutorials on this with no luck. 
    Here is my Action Script 3.0 CODE:
    import fl.video.FLVPlayback;
    import fl.controls.List;
    var vid:FLVPlayback = new FLVPlayback();
    vid.source= "fashion.flv";
    addChild(vid);
    vid.skin="SkinOverPlayStopSeekMuteVol.swf";
    vid.x=100;
    vid.y=300;
    vid.skinAutoHide="true";
    vid.width=500;
    vid.height=280;
    var vidList:List = new List();
    vidList.x= vid.x+10;
    vidList.y= 200;
    vidList.width=200;
    vidList.height=100;
    vidList.addItem({label:"Bathroom Behavior",data: "bathroom.flv"});
    vidList.addItem({label:"Chase Scene",data: "chase.flv"});
    vidList.addItem({label:"VMCAD Fashion Design Commercial",data: "fashion.flv"});
    addChild(vidList);
    vidList.addEventListener(Event.CHANGE,playVid);
    function playVid(e:Event):void{     
    vid.source=e.target.selectedItem.data;
    Here is a screenshot of the errors I am receiving.
    Please help me 
    thanks
    Message was edited by: BTwardy

    I don't know if what you posted is all that is in that as file, but you need to declare a package, then call the import statements, then declare the class name.  Like this:
    package {
         import flash.display.Sprite;
         import flash.events.Event;
         import fl.video.FLVPlayback;
         import fl.controls.List;
         public class Main extends Sprite {
              public function Main() {
                   var vid:FLVPlayback = new FLVPlayback();
                   vid.source= "fashion.flv";
                   addChild(vid);
                   vid.skin="SkinOverPlayStopSeekMuteVol.swf";
                   vid.x=100;
                   vid.y=300;
                   vid.skinAutoHide="true";
                   vid.width=500;
                   vid.height=280;
                   var vidList:List = new List();
                   vidList.x= vid.x+10;
                   vidList.y= 200;
                   vidList.width=200;
                   vidList.height=100;
                   vidList.addItem({label:"Bathroom Behavior",data: "bathroom.flv"});
                   vidList.addItem({label:"Chase Scene",data: "chase.flv"});
                   vidList.addItem({label:"VMCAD Fashion Design Commercial",data: "fashion.flv"});
                   addChild(vidList);
                   vidList.addEventListener(Event.CHANGE,playVid);
              function playVid(e:Event):void{     
                   vid.source=e.target.selectedItem.data;
    Then click on your stage in Flash, then open the properties window, and fill the Class text field with:   Main
    Make sure the as file is saved in the same folder as the flv.

  • PHP need help formating date, please.

    I am working on my first database page using repeating fields
    and a
    connection to MySQL, and actually have it working! Yay!
    Now I have a formatting problem, and would appreciate a bit
    of help.
    The first column of the repeating field is a date field,
    which is stored
    as a date type in mysql, and shows up in my table as
    2008-03-12 (which
    is how it was entered into the table). I would like to change
    the
    display to March 12, 2008. I have tried using the date
    function, but
    without success. The text that php is putting in the cell is
    "2008-03-12", which I am guessing is not a valid timestamp. I
    am also
    guessing that this is why I get a date in 1969 when I try
    this...
    The page is here:
    http://www.verodelmar.com/agendas.php
    and the source is here:
    http://www.verodelmar.com/agendas.txt
    Thanks to anyone that takes the time to look!
    Harvey

    Joe Makowiec wrote:
    > On 16 Apr 2008 in macromedia.dreamweaver, eclipsme
    wrote:
    >
    >> The first column of the repeating field is a date
    field, which is
    >> stored as a date type in mysql, and shows up in my
    table as
    >> 2008-03-12 (which is how it was entered into the
    table). I would
    >> like to change the display to March 12, 2008. I have
    tried using the
    >> date function, but without success. The text that
    php is putting in
    >> the cell is "2008-03-12", which I am guessing is not
    a valid
    >> timestamp. I am also guessing that this is why I get
    a date in 1969
    >> when I try this...
    >
    > Use DATE_FORMAT in your SQL statement, thus:
    >
    > SELECT field1, field2,
    > DATE_FORMAT(dateField, '%M %e, %Y') AS myFormattedDate
    > FROM myTable
    >
    >
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format
    >
    > Another option is to convert the date from ISO format to
    a Unix
    > timestamp using PHP's strtotime() function, then
    formatting it using
    > date():
    >
    > <?php
    > // Done in several steps for clarity. Can be done in one
    step.
    > $myUnixTimestamp =
    strtotime($row_Recordset1['mydatefield']);
    > $myFormattedDate = date('F j, Y', $myUnixTimestamp);
    > echo $myFormattedDate;
    > ?>
    >
    >
    http://www.php.net/strtotime
    >
    http://www.php.net/date
    >
    The former I think I understand.
    The latter I have printed out and will look at some more.
    Actually in
    theory I understand, but how to do that in my control panel
    is what I
    need to look at.
    Thanks!
    Harvey

  • Flash lite problem,,,need help soon

    why the protocol ftp is not suported by the flash player
    and how to make flash lite support ftp

    Actionscript 3 supports making ftp client aplications with flash because of binary sockets capability. There is no such facility in as2 (flash lite 2.0/2.1/3.0).
    You can use remoting to develop a ftp like application. also you can use http://wiki.kunerilite.net/index.php?title=Upload/Download_plugin for more help.

  • Flash CS5 Newbie - Need help adding URL link to animated banner

    I apologize if this is a very basic question, but I am a newbie at designing in Flash. I have created a basic animation in Flash CS5 and I need to add a clickable URL link to it. I've tried a few tutorials that looked promising, but none of them solved my problem. I've tried a number of things including converting parts or all of the images to simple buttons or movies and linking them that way as well as typing in code for ActionScript 2 and 3, none of which were successful. The animation plays correctly when viewed in my browser, but when I click on it, the link does not work. I would prefer that the entire banner be clickable to take viewers to the linked website rather than using hyperlinked text. Also, when I open the Code Snippets window, it is empty, no matter what image or frame I've selected. Do I need to import code snippets from somewhere or am I simply going about things the wrong way? Any help is greatly appreciated!

    It all depends whether you're decisively using AS2.0 or AS3.0 .
    In the latter, you would need to use a URLRequest() method in conjunction with a navigateToUrl() call (not sure the exact syntax for navigate to Url, it might be a capitalized "URL" in the method but the request takes a String argument such as http://www.adobe.com)

  • Flash Game Problem Need Help! Action-Script 2.0

    Im making a flash game its a sniper game btw and i am have a problem with after killing the target for it to go to the next frame. I have tried on(press) on(release) for buttons i hae tried lots of different stuff (1.3 hours of trying) and so i was wondering if you could help me out. and here the link to the download for the source .fla yes i uploaded it cuz i really need the help ! thanks for any help! http://fileape.com/?act=download&t=yz6Lhp0oDdAB-7whXWB62WIoACXMVgV7r1flbKy17aJZamyC-vXNFwx tZP6pwXV50NGk3XWK9anDa4m6tBfGEtPOZwKbuZFcaFyGyEGiYqeILdcvVuEZy3QVHX3xY6S170xapkdrZJN9lov4k hxeqJ4_S6aGRpNQWjTT3MhudPLa1ZBAi79CiPqX5kN835lD7vzAU0O6WJZaK6jZBROg2A,,
    or
    http://fileape.com/dl/2gI8YiSW9QGzIgAu
    if the top one doesnt work (the top one shouldnt have a time wait)
    Thanks for all help
    also please if you can find the problem itd be nice to know what it is

    I will not download the .fla - maybe if you hosted the .swf I would view it.
    to change frame use: gotoAndStop(<framenumber>);
    (without the < >, just a number for the fram).
    I recommend you use movieclips for buttons and place all code on the main timeline. For movieclips, give them an identifier name (bottom left int he properties box of the movieclip) then on the main timeline use:
    movieclipName.onRelease = function(){
    gotoAndStop(10);//change 10 to the frame you wish to go to. gotoAndPlay(10) plays from the frame.

  • *Flash CS4*  I need help...

    OK, so...I tried to download a trial of Flash CS4 on my parent's laptop.  I got as far as saving the AkamaiDownloadManagerInstaller to the computer's desktop, but when I click on the link (or whatever) it says "a program needs your permission to continue."  I clicked "Continue," and it shows a loading bar for just a split second, but then goes away.  Uh...I don't know much about computers, so please try to use *small words* when telling me what to do.  My parents have a Toshiba Windows 7 (I think) Laptop.
    Thanks for your help
    Mr. Snickers

    i recently downloaded trails of flash cs4 and web premium package cs4 (took a day to download at high speed starbuck's internet). couldnt get the setup.exe to work or the uninstaller to work. surfing tech support over next couple weeks to try various agents was useless and expensive until i finally reached someone with useful info. all the agents had foriegn accents and read from scripts and web support pages until yesterday, when i reached a guy who told me two things i'll report to various forums addressing this same issue:
    1. download windows uninstaller program from their website (google: windows ininstaller). this program is different from the one that doesnt work in the programs and features area of control panel when you try to uninstall adobe products from there.
    2. windows explorer 8, the newest version, DOES NOT download adobe softare properly and leaves things out, causing all sorts of issues including the setup.exe program not working. download firefox browser from mozella (google: firefox) and use it for all adobe downloads. apparently the old windows explorer 7 will work, but if you already have explorer 8 installed its easiest to just use firefox.
    i'm spending the next couple days downloading the 4.14 G web premium trail with firefox and will report if this works.

  • Flash recovery area, need help!

    Hi! I have some problems with Flash Recovery Area. I use Oracle 10g.
    So,
    1) I tried to change Flash Recovery Area Size from 10 to 15 GB in Enterprise Manager, see: http://my.jetscreenshot.com/2677/20111129-mxmb-117kb
    Applied changes and shutdown DB. After I started DB and see the Flash Recovery Area Size then I can see that it is old one - 10GB and free space is with "-" sign, see: http://my.jetscreenshot.com/2677/20111129-bwlw-101kb
    What I am doing wrong?
    2) Can You pleas explain, what to do step by step with example, how can I delete Flash Recovery files USING ENTERPRISE MANAGER, what steps I need to do? Because my HDD is almost full.
    3) It is possible to delete Flash Recovery files automatic after some time? If Yes, please say how?
    Hope for Your help, best regards, Debuger

    1) Mybe I can't change recovery area size because there somewhere area size is limited to 10gb, because I do not understand why always after restart there is 10gb... :(You are missing something when you bounce, Make sure you have started with same SPFILE, You have to load the same PFILE/SPFILE when you performed changes.
    2) How can I schedule a RMAN job to cleanup? Can You give me all necessary steps to do?You can schedule RMAN archive delete jobs.
    check these links
    http://docs.oracle.com/cd/B19306_01/backup.102/b14191/advmaint.htm#i1006414
    http://docs.oracle.com/cd/B28359_01/server.111/b28301/backrest004.htm

  • Editing a value from a SWF in Flash CC. Need Help.

    Hello! 
    I can use a little help. I have a small .SWF that I use as a graphic design app. There is a slider that goes from  0-500. I want to be able to increase the maximum to say 1000. 
    I have used Sothink SWF decompiler. I have found the one line that refers to the slider's variable.(it is AS3)
         this.pointSlider.setSliderParams(3, 500, 100); It is in Action directory MAIN. I can't seem to edit the number within SWF Decompiler, so I exported it as an FLA. 
    What I've tried. 
    1) in text editor I've opened MAIN and changed the number. 
    How can I recompile this back to an SWF? 
    Or is there a way within the original SWF to just change the number? 
    I did DL the Adobe Flash CC trial. Opened the FLA, but nothing is really happening, just a white screen. 
    Can you please suggest how I can do this? A different program or approach? 
    Thanks in advance! 
    Alex

    and
    I'm brand new to Flash. Besides opening the .fla doc, do I need to anything for the other files associated with it? Everything decompiled into a folder?
    On Publish I'm getting:
    Warning: Source path "$(AppConfig)/ActionScript 3.0/Classes" does not resolve to a valid directory.
    and
    J:\worh folder\FLA\triangulator\Main.as, Line 598, Column 22
    1084: Syntax error: expecting identifier before colon.

  • I just get my new laptop on the 9 of November and when i go to watch a youtube video the stockwave flash is working need help

    When i go to youtube try to watch a video a box pops up saying stockwave flash is not working i really need your help just get this lapton on sunday

    Some system of firefox crashes the Flash plugins. The next links offer differents solutions for this problem.
    # Elemento de lista numeradaAdobe support article under the heading "Last Resort": Adobe Forums: How do I troubleshoot Flash Player's protected mode for Firefox?
    # Elemento de lista numeradaManual steps: https://support.mozilla.org/questions/968190?page=5#answer-509209
    #Elemento de lista con viñetasBatch file to automate the manual steps: https://support.mozilla.org/questions/982093#answer-518078
    Restarting Firefox could help.

  • Flash web gallery NEED HELP

    I have no clue how to program these flash galleries....My
    site www.al-burke.com contains a flash web gallery that I purchased
    online and I have been able to upload it to the site but its says
    movie not loaded. I have all the neccessary files in place I
    believe (gallery.xlm, main.html, main.swf) all under a folder. Can
    anyone please help me out? Thanks

    Does it work when you test it from your local drive? If it
    does, but doesn't work when you post the files to the server, you
    may not have uploaded all of the parts correctly. If it doesn't
    work when testing from the files on your harddrive either, then
    there is a linking issue - have you moved any of the files after
    the gallery was created...? (If so, the links will be broken).
    You also reference a file named "main.html" - this isn't the
    name of the file that's posted - if you created a file named that,
    then changed the name to index.html without updating the links when
    prompted, that will also break the links...
    Hope that helps...

  • Flash Error #1009 -- NEED HELP!

    Okay.  I am relatively new to AS3 and I have been working on creating a visual timer.  My code is very simple, and I can't figure out why Flash Pro CS6  is giving this error message in the Output:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at TMR_fla::MainTimeline/timer1hit()
    My code looks exactly like the following:
    import flash.events.Event;
    stop();
    function timer1move():void {
              timer1.x-= 8;
    var MyInterval1:uint = setInterval(timer1move, 50);
    timer1.addEventListener(Event.ENTER_FRAME, timer1hit);
    function timer1hit(e:Event) {
              if(timer1.hitTestObject(finish1)) {
                        gotoAndStop(2);
                        clearInterval(MyInterval1);
    I cannot figure out why FLash is giving me this error.  Mainly because my code works great!  It does exactly what I told it to do, it goes to Frame 2 and stops.  But in the Output the error message just keeps repeating forever.  I have looked all over this forum and found multiple topics on this problem but none of them help.  Few extra key notes:
    1.  My second frame has absolutely ZERO code.  Just some scribbles on stage to indicate that I've made it to the 2nd Frame.
    2.  My stage for frame 1 looks like this:
    The object on the right is my timer.  The rectangle on the left is my finish.
    Rectangle has an instance name of finish1
    Timer has an instance name of timer1
    I have triple checked the instance names, I know that they are all spelled right.  Can somone help me? 

    If the error is repeating forever, it is probably because you have tha ENTER_FRAME listener continuing on.  If you are in frame 2 and any of the objects that the ENTER_FRAME event handler function is targeting are only in frame 1, then that will be the source of the error.  In your event handler you should remove that listener before you change frames.
    timer1.addEventListener(Event.ENTER_FRAME, timer1hit);
    function timer1hit(e:Event) {
              if(timer1.hitTestObject(finish1)) {
                        timer1.removeEventListener(Event.ENTER_FRAME, timer1hit);
                        clearInterval(MyInterval1);
                        gotoAndStop(2);

  • Creating an embedded Konsole in KDE, need help with "Window Rules"

    Hey guys! I hate that my first post on here is asking for help, but here goes nothing:
    I've been working on creating an embedded konsole that sits on your desktop, without installing any 3rd party software. The konsole will have certain properties set so that it has no title bar, no border, no task bar entry, completely transparent, etc, so that only the konsole text itself is seen.
    I was able to set up the konsole profile and window settings successfully using this link as a guide. The only problem is that using the aforementioned link's method creates a persistent profile that affects all future konsoles.
    My goal is to auto start a single konsole that uses a specified konsole profile and a specified window rule, but doesn't affect any other konsoles I open after startup. I've recently learned that a konsole profile can be specified with the "-profile" option which solves the first half, but I still can't figure out a way to have my window rule apply to only the startup konsole and no others.
    I'm new to Arch and KDE, so any suggestions would be greatly appreciated.
    Thanks!
    -Grey

    Look at http://userbase.kde.org/KWin_Rules and particularly 'Window Matching'.
    Maybe (I didn't test it) using:
    Window title - restrict the match to the title of the window.
    and
    KDE options:
      --caption <caption>       Use 'caption' as name in the titlebar
    Or finding some specific matching rule which applies only to that window...

  • Embeded Flash file .. need to center

    After creating a dynamic site via Flash, I'm experiencing
    issues with centering it on the html page. I've tried all of the
    regular fixes of <align = center>...but it's not reading it.
    Someone told me that it takes a bunch of code to do..but I don't
    recall entering a great deal of code previously.. Could someone
    please help me out on this one?? THANK you!!

    Hi Jacob,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Interactive Site</title>
    </head>
    <body>
    <table width="900" border="0" align="center"
    cellpadding="0" cellspacing="0">
    <tr>
    <td><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    width="900" height="600" title="Interactive Site">
    <param name="movie" value="flashfile.swf" />
    <param name="quality" value="high" />
    <embed src="flashfile..swf" width="900" height="600"
    quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash"></embed>
    </object></td>
    </tr>
    </table>
    </body>
    </html>
    Try this .
    I hope this helps.
    Regards,
    Shanthi

Maybe you are looking for

  • Error, while pushing the data from Oracle to MSSQL.

    Hi, I am facing the below error, while pushing the data from Oracle to MSSQL. ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or inse

  • PSE Install problem

    I have not tried a bunch of times to install PSE 10 on my Windows 7 desktop (32-bit).  It keeps getting to the point where it is trying to install the Shared Technologies package and then fails and does a roll back uninstall.  I have looked at the in

  • Total record in list

    Hi!   i am using alv grid and i got the output. In the list i want to display the total number of records in the alv  grid list.                            thanks.....

  • Maint order budgeting

    Hi, How to carry out budgeting in PM order. Client requirement is 1. Cost ctr wise budgeting - 5 Lacs Pls provide info reg config & transaction steps..like ko22,kpz2 I've not done budgeting before. Kindly guide me. Rgds, Thambi

  • I've set m4v files to "always ask" but it opens in the browser player anyway

    Since one of the latest version, Firefox now has a built-in player for certain flash based videos, like m4v. Now, when I try to download such videos (by copy-pasting the direct url to the file into the url bar) it will just open that video in the pla