0

I'm working with wordpress,and trying to paste video url to video player I have php script that get from I database video url.

$post_id = $_GET['post_id'];

global $wpdb;

$query = "SELECT * FROM wp_posts WHERE wp_posts.post_type = 'attachment' AND wp_posts.post_mime_type LIKE '%flv%' AND wp_posts.post_parent = $post_id";

$result = $wpdb->get_row($query);

$video = $result->guid;

Can someone help me with this,to finish this thing.

HTTPService id="video_url" resultFormat="text"

VideoPlayer x="10" y="10" width="384" height="308" source="HERE I NEED TO LOAD DINAMICLY VIDEO URL" id="videoDisplay" autoPlay="false"

Video url is pulled when page loads. Script that pull data from database and player are on the same page.

Can someone help me with this please.

1 Answer 1

1

If you are getting the video's id on the same script that displays the player you can parse the data to flex application using flashvars. In this case there is no need for the HTTPservice. You will use php to get the id and then, when you will display the player you will send to it the id:

Check this link for detailed info on how to set the flashvars.

And this one to see how you work with flashvars in flex4.

Sign up to request clarification or add additional context in comments.

8 Comments

It looks great,which files should I put wordpress theme folder.How to compiler it in right way?
do you have a "release" folder under your project's folder?
I figure that out,and it is working great,I have only just left to send image from flex to my php script that will save that image,not sure how to send image via http:service,any idea please?
Ok,just how to send image via http:service in flex?
Ok,I manage to send an image,now I have a problem,I need to return some result,it is text result,and in other script I need to return an array,and I need to paste result from php into label.Can you help me with this,please.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.