Loading FLV in Flash using PHP
Hello,
I am using flash CS3 and am trying to load a flv using PHP.
I have a PHP webpage with a SWF in it. In that SWF is a
FLVPlayback component. I would like to be able to set the source
for the FLV using a php URL e.g.
http://www.example.com/index.php?v=12345
I have searched for hours but still have not come up with a
way of how to do this.
Does anyone know. Any help would really, really be
appreciated.
Thankyou
Is the problem in the actionscript or in the PHP?
IE - did you trace out the "video" variable to know that it
is getting there?
If the variable is getting into the Flash, then trace out the
contentPath of myFLVPlayer after it is set to make sure that things
are working correctly. (To trace out on the server, I usually place
a dynamic text box in the swf and set its .txt = what I want to
see)
If contentPath doesn't work, you can always use the
myFLVPlayback.load() function - IE myFLVPlayer.load(video);
If things are getting set correctly, then you are having a
pathing issue, and need to make sure that the path for the load is
set correctly.... IE contentPath = "path/to/flv/"+video;
Similar Messages
-
How to overwrite the xml file by flash using Php
Hi
i am creating getting data from the xml file ... and i am
doing some Alteration in the xml file by flash after that flash
producing the xml file i finished upto this process...
nw i neeed to overwrite the xml file.... using Php.....
can any one give me some idea ... to solve this issue
~~SKFlash Player cannot write XML files at all. but using
php+flash we could do it . -
Can't convert MP4 to .fLV for flash using encoder CC 2014
Hi
Seriously adobe, I wish I never upgraded to CC, it's been a nightmare.
I need to convert an MP4 to an .flv for flash pro CC. Encoder CC no longer supports this, which is UNBELIEVABLE....
I use a third party vendor for video in flash banner advertising and it only supports .flv files.
Can someone tell me what other programs allow me to so the MP4 to FLV conversion?> Can someone tell me what other programs allow me to so the MP4 to FLV conversion?
The previous version of Adobe Media Encoder or After Effects, which you can have installed alongside the current version:
removal of FLV and F4V export features from Adobe Media Encoder, After Effects, and Premiere Pro -
How to find out FLV duration using PHP?
Is there any way I can use PHP to find out the duration of a
FLV file on its web server?
Thanks.> Is there any way I can use PHP to find out the duration
of a FLV file
> on its web server?
AFAIK, no. But since some people have found a way to extract
similar
information from SWF files, maybe there is a chance to pull
something
like that off with FLVs.
Alternatively you could create a flash movie that has the
single purpose
of loading an FLV and sending the duration to a PHP script
using the
LoadVars class and its sendAndLoad() method.
Christian Scholz-Flöter -
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;
?> -
I'm working on a site using php. When I place flash files in
the page, I can view it with no problems. It's another story when I
load everything up on a server. All I see is a white box where the
flash movie is. I'm using Dreamweaver CS3 on a MacBook Pro. Any
advice I can get would be much appreciated.You have a number of problems on that page.
1. The Flash in the banner appears but the Flash in the body
does not. I'm
not sure why, but will examine further.
2. The menu will fall behind the Flash element in the body
when it expands.
This will render your site non-navigable.
3. Because you have used all-javascript menus, your site will
not be
spiderable by search engines, since they cannot find the
links in the
submenus when it is embedded in the javascript.
4. Also, because of those menus, you render your page
non-accessable, since
screen assistive devices do not render javascript. In
addition, anyone
coming to your site with javascript disabled will not be able
to navigate
it.
You can maybe deal with #1 by reading this -
All Active content on a page will always rise to the top, so
to speak,
including Flash, certain form elements, Java applets, and
Active X controls.
This means that each of these will poke through layers. There
is not a good
cross-browser/platform reliable way to solve this issue, but
if you can be
confident in your visitors using IE 5+ or NN6+, then you can
use the Flash
wmode parameter (however, Safari does not support this
properly!).
Adobe articles:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15523
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14201
As for the rest, you should always have redundant, plain text
navigation
available on your site (or a plain text link to a sitemap
page). But there
are ways to do those menus where none of this is a problem -
I'd rather see
you use those methods than this one (which is also a ton of
code).
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"jeremygouine" <[email protected]> wrote in
message
news:[email protected]...
> Here is the link:
>
>
http://glowingtreeproductions.com/BCS/media.php
>
> This is not the particular page it is going on, but it
should suffice for
> the
> moment. I have a friend who got it working, but he said
he didn't do
> anything
> I wasn't already doing. So, I have no clue. The biggest
problem for me
> is I
> can't get any Flash files to work when they are uploaded
on my server. I
> appreciate all the help I can get.
> -
I NEED HELP! Making a flash email form using php.
Hi, my name is Sean, I'm making a flash contact form using php for a website.
I'm having a hard time with the php. Can some one help?
Click here to download my source.Satellite A505-S6005
ACPI Flash BIOS version 1.40 for Satellite A500/A505 (PSAT6U/PSAT9U)
When you execute the download file (sat6v140.exe) it decompresses into several files in the sat6v140 folder.
Among those, is the readme.txt attached, which explains how to create the CD.
Burn a CD or DVD from an ISO file
-Jerry
Attachments:
readme.txt 14 KB -
Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.
Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.
-
Can I load ms word file in flash using JSFL?
What I want to do is,
Load a .doc file in flash using jsfl
Read it and save its data in xml
Is it possible?If you have a problem with Word, ask Microsoft. But I suspect you only came here to post your spam link!
-
How can I load and save text using FileReference class
Let me start by saying I have no intention of using php and I can't wait until flash cs5 comes out with its new read/write capabilities
I want to load and save XML files (stored on my local hard-drive) in AS3.
I am using the FileReference class.
Firstly I have noticed that when using FileReference.save if you replace an existing file instead of writing over the file data is appended to the end of the file. Can I make it so the file is overwritten (as it should be) or make it impossible for the user to save in such a situation.
Secondly I want to load in text from an external file using FileReference.load I know that somehow you use FileReference.browse first to get it to work but I want to know exactly how to do it.
I have looked for a tutorial about loading text in this manner and have not found one.
Any help would be much appreciated especially if you could point me in the direction of a relevant tutorial
Thanksthe filereference class is for downloading and uploading files.
if you want to load xml, use the xml class.
and, if you want to write to an xml file and don't want to use server-side code, wait. -
I am getting this back:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at AS3_Flash_Poll_PHP_MySQL_fla::WholePoll_1/completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
PHP code:
<?php
// ---------------------------------------- Section 1 -----------------------------------------------
// IMPORTANT!!!! Connect to MySQL database here(put your connection data here)
mysql_connect("ginaty05.fatcowmysql.com","fall2010","@regina") or die (mysql_error());
mysql_select_db("poll_2010") or die (mysql_error());
// When Flash requests the totals initially we run this code
if ($_POST['myRequest'] == "load_numbers") {
// Query the totals from the database
$sql1 = mysql_query("SELECT id FROM votingPoll WHERE choice='1'");
$choice1Count = mysql_num_rows($sql1);
$sql2 = mysql_query("SELECT id FROM votingPoll WHERE choice='2'");
$choice2Count = mysql_num_rows($sql2);
$sql3 = mysql_query("SELECT id FROM votingPoll WHERE choice='3'");
$choice3Count = mysql_num_rows($sql3);
echo "choice1Count=$choice1Count";
echo "&choice2Count=$choice2Count";
echo "&choice3Count=$choice3Count";
// ---------------------------------------- Section 2 -----------------------------------------------
// IF POSTING A USER'S CHOICE
if ($_POST['myRequest'] == "store_choice") {
//Obtain user IP address
$ip = $_SERVER['REMOTE_ADDR'];
// Create local variable from the Flash ActionScript posted variable
$userChoice = $_POST['userChoice'];
$sql = mysql_query("SELECT id FROM votingPoll WHERE ipaddress='$ip'");
$rowCount = mysql_num_rows($sql);
if ($rowCount == 1) {
$my_msg = "You have already voted in this poll.";
print "return_msg=$my_msg";
} else {
$sql_insert = mysql_query("INSERT INTO votingPoll (choice, ipaddress) VALUES('$userChoice','$ip')") or die (mysql_error());
$sql1 = mysql_query("SELECT * FROM votingPoll WHERE choice='1'");
$choice1Count = mysql_num_rows($sql1);
$sql2 = mysql_query("SELECT * FROM votingPoll WHERE choice='2'");
$choice2Count = mysql_num_rows($sql2);
$sql3 = mysql_query("SELECT * FROM votingPoll WHERE choice='3'");
$choice3Count = mysql_num_rows($sql3);
$my_msg = "Thanks for voting!";
echo "return_msg=$my_msg";
echo "&choice1Count=$choice1Count";
echo "&choice2Count=$choice2Count";
echo "&choice3Count=$choice3Count";
?>
AS3 code:
stop(); // Stop the timeline since it does not need to travel for this to run
// Assign a variable name for our URLVariables object
var variables1:URLVariables = new URLVariables();
// Build the varSend variable
var varSend1:URLRequest = new URLRequest("parse_my_poll.php");
varSend1.method = URLRequestMethod.POST;
varSend1.data = variables1;
// Build the varLoader variable
var varLoader1:URLLoader = new URLLoader;
varLoader1.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader1.addEventListener(Event.COMPLETE, completeHandler1);
// Set variable to send to PHP here for the varloader below
variables1.myRequest = "load_numbers";
// Send data to php file now, and wait for response using the COMPLETE event
varLoader1.load(varSend1);
function completeHandler1(event:Event):void{
count1_txt.text = "" + event.target.data.choice1Count;
count2_txt.text = "" + event.target.data.choice2Count;
count3_txt.text = "" + event.target.data.choice3Count;
// hide the little processing movieclip
processing_mc.visible = false;
// Initialize the choiceNum variable that we will use below
var choiceNum:Number = 0;
// Set text formatting colors for errors and success messages
var errorsFormat:TextFormat = new TextFormat();
errorsFormat.color = 0xFF0000; // bright red
var successFormat:TextFormat = new TextFormat();
successFormat.color = 0x00FF00; // bright green
// Button Click Functions
function btn1Click(event:MouseEvent):void{
choiceNum = 1;
choice_txt.text = choice1_txt.text;
function btn2Click(event:MouseEvent):void{
choiceNum = 2;
choice_txt.text = choice2_txt.text;
function btn3Click(event:MouseEvent):void{
choiceNum = 3;
choice_txt.text = choice3_txt.text;
// Button Click Listeners
btn1.addEventListener(MouseEvent.CLICK, btn1Click);
btn2.addEventListener(MouseEvent.CLICK, btn2Click);
btn3.addEventListener(MouseEvent.CLICK, btn3Click);
// Assign a variable name for our URLVariables object
var variables:URLVariables = new URLVariables();
// Build the varSend variable
var varSend:URLRequest = new URLRequest("parse_my_poll.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
// Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE, completeHandler);
// Handler for PHP script completion and return
function completeHandler(event:Event):void{
// remove processing movieclip
processing_mc.visible = false;
// Clear the form fields
choice_txt.text = "";
choiceNum = 0;
// Load the response from the PHP file
status_txt.text = event.target.data.return_msg;
status_txt.setTextFormat(errorsFormat);
if (event.target.data.return_msg == "Thanks for voting!") {
// Reload new values into the count texts only if we get a proper response and new values
status_txt.setTextFormat(successFormat);
count1_txt.text = "" + event.target.data.choice1Count;
count2_txt.text = "" + event.target.data.choice2Count;
count3_txt.text = "" + event.target.data.choice3Count;
// Add an event listener for the submit button and what function to run
vote_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
// Validate form fields and send the variables when submit button is clicked
function ValidateAndSend(event:MouseEvent):void {
//validate form fields
if(!choice_txt.length) {
// if they forgot to choose before pressing the vote button
status_txt.text = "Please choose before you press vote.";
status_txt.setTextFormat(errorsFormat);
} else {
status_txt.text = "Sending...";
processing_mc.visible = true;
// Ready the variables for sending
variables.userChoice = choiceNum;
variables.myRequest = "store_choice";
// Send the data to the php file
varLoader.load(varSend);
} // close else after form validation
} // Close ValidateAndSend function ////////////////////////This error means that you are trying to set the text field but there is no data in the variable. As a first step, try to identify where this is happening, eg Is it the first call, or once you have submitted your data or only if you try to submit data second time?
Trace out the data that is returned for both completeHandlers to see if there is a missing var. Try this for "load_numbers" and "store_choice". Do it twice for "store_choice". Do you get back what you expected?
You could also try altering the php to return some fixed dummy variables, eg choice1Count=11&choice2Count=22&choice3Count=33, etc. If this works then you know that the error is in the PHP.
It looks to me like the issue is when you submit the data a second time and just get back the return_msg - the handler then tries to assign the choice1Count etc but doesn't have any count data back from the poll.php.
Test that there is data before assigning it, eg
if(event.target.data.choice1Count){
count1_txt.text = event.target.data.choice1Count;
count2_txt.text = event.target.data.choice2Count;
count3_txt.text = event.target.data.choice3Count; -
hi all
It would be appreciated if any one let me know how to edit
bitmap which is imported in flash using xml and save the edited
bitmap back to xml in flash.
Is it posible to save the bitmap data in flash?
thanks in advanceYes you can... but like I said before you need to upload the
data from the changes you make to a server.
In terms of the solution... its unlikely that you'll find one
specifically for your needs. You will have to learn whatever you
don't know how already and maybe adapt some existing examples to
your needs.
To change the visual state of a movie clip... you just do all
the regular things that you want to do to it using flash... scale,
rotation, drawing API , textfields etc in actionscript. If you
don't know how to how to do that stuff, then you need to learn that
first. That's basic actionscript.
You can capture the visual state of a movieclip using the
BitmapData class. That includes a loaded jpeg. You can also
manipulate bimatp data using the same class. You should read up on
that if you don't know how to use it or check out the examples
below for uploading info.
For uploading to the server:
Here's an as2 solution that took 15 secs to find using
google:
http://www.quasimondo.com/archives/000645.php
If you're using as3, google search for "jpeg encoder as3" and
look through that info. There are also historical answers in the
forums here related to this type of thing that might help as
well. -
In my SWF fie, I have an externally loaded FLV file.
I now want to add another FLV that will load and play
automatically when the first one is finished.
I actually want the SWF to jump to a new scene when the first
movie is done.
How can I do that/ what the actionscript?
StevenHey Steven,
I am not very sure but just giving a shot answering it...
You can use FLVPlayback.complete event to detect the
comepletion of first flv and set the path of other flv on complete.
Something like this:
import mx.video.*;
my_FLVPlybk.contentPath = "
http://www.helpexamples.com/flash/video/clouds.flv";
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
if (my_FLVPlybk.contentPath == "
http://www.helpexamples.com/flash/video/clouds.flv")
my_FLVPlybk.play("
http://www.helpexamples.com/flash/video/water.flv");
my_FLVPlybk.addEventListener("complete", listenerObject);
Hope that works... -
Hi,
this is my first post.
I have probelms including an flv video into my fla.
I work with flash mx 6.0 on mac (but i have the same problem
on win), and I'm not able to include mu flv video into my scene.
Can anyone help me or send me a link to the documentation?
Thanks in advance, great job everyone!
maoI don't think you can preload an flv other then using a
buffer. If you figure it out let us know.
There is another message board...
http://www.gotoandlearn.com/forum/viewforum.php?f=5
not sure they'll be more helpfull -
I'm using a remote hosting service for my FLV storage (
http://www.blip.tv). When I load
FLVs remotely into my player, they just seem to load infinitely
without play control. All except for 1. There is 1 video that
actually loads and plays just fine, which indicates to me it might
not be a problem with the host.
Below are testing-purpose links. (This is a php script which
passes the flv link to my player). The first one will work and load
correctly, the second link loads forever.
http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BehindLacros seEp3249.flv
http://behindlacrosse.com/videos.php?video=http://blip.tv/file/get/Treschonde-BLSummer2006 2549.flv
I've tried this with several different flv's, and only that
first one above ever loads. I'm not doing anything complex with my
code, I use the following actionscript:
_root.playback.play(vidurl);
I've traced the vidurl variable to ensure that the urls are
correct. So I'm really stumped on this one.
One more interesting note.. in Firefox, on that website
linked above, if you click on any of the other videos in the list,
they won't load. It's like the player locked up. But in Internet
Explorer, you can still click other videos to bypass the currently
loading one.
Any help or suggestions at all? I appreciate anything.This is the way I work with videos.
Each video is in a differente frame.
Name you FLV playback like movie1, movie2, etc.
You may have a frontpage that links to each video or place a
button on the keyframe where you want specific video to play. For
example, on movie1, place a button. On movie2, place another
button.
The code below is used assuming you customized your video
controller.
// in a MovieClip named Video Controller insert a play, pause
and stop buttons and a slider//
stop();
import mx.video.*;
movi1.contentPath = "EditedFlash/Text_Edited.flv";
movi1.playButton = VideoControl.my_playButton;
movi1.pauseButton = VideoControl.my_pauseButton;
movi1.stopButton = VideoControl.my_stopButton;
movi1.seekBar=VideoControl.my_seekButton;
var cuePt:Object = new Object ();
cuePt.time =0.5;// title - no voice//
cuePt.name = "Pt1";
cuePt.type = "actionscript";
movi1.addASCuePoint(cuePt);
movi1.addASCuePoint(3.2, "Pt2");
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object): Void{
if(eventObject.info.name=="Pt1"){
_root.Texto.gotoAndStop("uno");
if(eventObject.info.name=="Pt2"){
_root.Texto.gotoAndStop("dos");
movi1.addEventListener("cuePoint", listenerObject);
//second cue point//
movi1.addEventListener("cuePoint", listenerObject);
listenerObject.complete = function(eventObject:Object):Void {
_root.Texto.gotoAndStop("uno");
movi1.addEventListener("complete", listenerObject);
Hope this helps.
Maybe you are looking for
-
ANOTHER RANDOM HARD FREEZING IN 10.9.1
Experiencing hard freezes except without the spinning ball. This started 3 months AFTER I had some bad RAM removed which was deemed the cause of the hard freezes before. The difference this time is that I can move the cursor, but still am unable to f
-
I've never had this problem before, until the last two movies I've rented. Subtitles come on during a foreign language part, and then remain onscreen indefinitely. I've turned off closed captioning on both my Apple TV and on my TV, to no avail. I wou
-
Capturing Motion Video and a SNAP with one CWIMAQ Device
Hello, I am using Measurement Studio 6.0 controls and I am trying to accomplish a Continous Acquisition and a periodic interval SNAP Capture with only one CWIMAQ control. I have A CWIMAQ control attached to a 1 CWIMAQViewer this starts to acquire whe
-
I am trying to add a cloudy sky to a picture and following the instructions on the Digital Photo CD Layers and Selections. I cannot find however the adjustment layer icon although I can achieve a red overlay with the magic brush selection mask option
-
Notification created on date ERDAT
Hello, When I check table QMEL for ERDAT (Created on), the newer notification shows older dates than the older notification. e.g. Notification ...... ERDAT (created on) 200000131 ..... 12.07.2009 200000134 ..... 14.07.2009 200000138 ..... 14.07.2009