dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Media Player:How can I pass as a parameter the name of the movie and its full URL?

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    70

    Question Media Player:How can I pass as a parameter the name of the movie and its full URL?

    Hello,

    On the Media Player component,

    1.- How can I pass as an external parameter the name of the movie (Label) and its corresponding full URL (Media file), per each movie of the Play List?

    As far as I understand, the fun file requires that the Play List of the component be in same computer, it do not allow me to enter a URL.

    This is because each web page with the Media Player Component would have a set of videos, that would be in another server. This component has to be "cut and paste" and the movie parameters has to be easy editable by a non technical user at HTLM level in the web site.

    Please bear in mind that I do not know Action Script, I would appreciate a lot if some body can provide detailed intructions or links to tutorials.

    Thanks a lot
    Best regards
    joejac

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Location
    Yugoslavia
    Posts
    147
    How about external XML playlist?

    Try this:

    http://www.km-codex.com/?page_id=85

    (first box km7)

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    70
    Thanks a lot joca_hdj, those are nice resources.

    1.-Unfortunately this goes to a content section of a web page controlled by a small CMS.

    So it is necessary to have the pass of parameters. The user has access to the HTML of the content section of the page, not to all the HTML of the page, and can not upload xml files. Each page would have a Media Player but with different videos, each page would have a video and a paypal button.

    2.-I also face the problem of including the media player inside the body. As Koolmoves generates it requires to have access to the head section of the page, and I do not have access to the head, those are dynamic generated pages.

    Hope I was able to explain myself and get some solution to those needs. Any help is very welcomed.

    Best regards
    joejac

  4. #4
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Quote Originally Posted by joejac View Post
    The user has access to the HTML of the content section of the page, not to all the HTML of the page, and can not upload xml files. Each page would have a Media Player but with different videos, each page would have a video and a paypal button.
    A few questions.....

    1. What cms are we talking about? There are tons.

    2. Does the html of each particular content section in fact contain the variables needed by your player (the url to the video, the video title, whatever paypal variables are needed for the specific purchase)? If so, you could possibly use AS3 to load that native html (since it's assumed by me based on your description that each content sections html is generated dynamically by the cms depending on the content section loaded) as text and use string manipulation to yank out the variables (similar to how I do with my Koolmoves changelog reader) and bring them into your Koolmoves movie.

    A few friendly observations....

    1. This is custom coding...not likely to be found as a response/solution to a forum question.

    2. These issues should have been considered before taking on the project. Since you are talking about a cms system the issues are compounded as most cms systems use an abstraction layer which may obfuscate access to these variables. Usually a flash developer who takes on any module or "block" coding for cms systems will weight the limitations of the target content/containers against their need and decide to either

    a. Integrate with it (if possible). In your case integrating with the html content container if it does in fact contain the variables each player needs.
    b. Bypass the abstraction layer and build custom backends to directly target the stored data (mysql, xml, etc). The cms system is storing the data needed somewhere.

    Based on your own admission of "Please bear in mind that I do not know Action Script" it may be you have bitten off more than you can chew because you will in fact be using quite a bit of Actionscript. I mean this as an honest observation and not as any slight to you. There are no pre-canned solutions for what you want to do and it ALL would be custom coding.

  5. #5
    Member
    Join Date
    Oct 2004
    Posts
    70
    Thank you for your observations and time to answer Chris_Seahorn, I understand that this can be beyond the scope of this forum. I will answer your questions and explain more to see if links to tutorials on how to do this can be provided, sorry for any inconvenience.

    1.- The CMS is a small script (PHP/MySQL) that I did over time, that allow a free modification of a predefined html content zone of the generated html page, nothing complex. It uses FCKeditor to edit that content zone and also allows to open the HTML code for that zone. This content is stored in a simple MySQL table, one record per web page.

    1.1 The limitation of my CMS script is that it do not allow to edit the <head> zone, that it is located in a header included in PHP, and it is common to all generated pages, except for the meta tags: content and keywords. This creates me a problem with the new form of processing the files on KM7, that for each movie I have, for example, to edit the head zone with this:

    Code:
    <script type="text/javascript">
    var params = {loop: "false", base: "imagenes/image/es/sitio/", bgcolor: "#ffe529"};
    swfobject.embedSWF("imagenes/image/es/sitio/myMovieX.swf", "myMovieX", "990", "200", "6.0.65", false, false, params, false);
    </script>
    I do not know how to deal with this.

    2.- So I was looking for some Media Player component that would allow something like:
    Code:
    myKoolPalyer.swf?movieFilename=My Movie A&movieURL=http://www.domainx.com/movies/myMovieA.m4v
    inside a flash object in the content zone with the help of the FCKeditor.

    2.1 With this approach anybody can open the HTML code of FCKeditor and insert same Media Player component but with a different query string, I mean with different movies and URLs on each content zone for each generated web page. There is only one content zone per web page.

    2.2 Paypal is not a problem, I already tested the PayPal Buttons and works good. I did a small script and programmed the buttons to pass to this script the product code and it gets downloaded very nice. PayPal Buttons are very friendly even for beginners. There will be no shoping cart, just one movie, one PayPal button, independent of the Media Player, this is easy.

    3. Since I know my limitations I and testing to see if I can do it, I am doing a test to present to my friend before I compromise to do anything. If he were a customer I would say no from the beginning, but I would like to help my friend with his idea. I always got very nice help on this forum, thanks to Koolmoves and this community I began to learn in this area and I am very grateful.

    Best regards
    joejac

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    AS3 still has the ability to use parameters that are passed by url. You only need to access them differently. Try something like this
    Code:
    var pl:String = '<playlist pause="init"><item label="';
    pl += loaderInfo.parameters.movieFilename;
    pl += '"><video src="';
    pl += loaderInfo.parameters.movieURL;
    pl += '" /></item></playlist>';
    
    mediaplayer1.setXMLPlaylist(pl);

  7. #7
    Member
    Join Date
    Oct 2004
    Posts
    70
    Thanks a million w.brants for your kind help.

    You provided me with code that I will study and implement in the KM Media Player. I will follow the implicit recommendation of Chris_Seahorn and I will try to understand the basic principles of AS3. There is too much to study in web development, I am not very fast with this and there are a lot of tutorials, some of them of a very high level.

    I am very grateful to all

    Best regards
    joejac

  8. #8
    Member
    Join Date
    Oct 2004
    Posts
    70
    Brants, I do not know if this is correct for this forum, please let me know, but aside this topic,

    The cover of your book is wonderful, very beautiful and relaxing. I have a friend that has a book for children, she would like to publish it, but you know, money is a big issue here, editorials charges a lot of money for a small print.

    How is your experience with Lulu?

    Best regards
    joejac

  9. #9
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I don't mind you are asking

    As for the layout, I did everything myself. All the artwork, poems and cover design were done using PhotoShop CS3 and InDesign CS3. The content was uploaded as one single pdf. I calibrated my monitor and used the CS3 CMYK preview so I knew what I could expect.

    I ordered one copy from Lulu.com and one from Viovio.com to judge the quality and check for mistakes or things that needed color correction.
    I don't know how printing quality has evolved since 2007 but back then the printing quality of Viovio was a little superior but they printed a watermark on the background and Lulu didn't.

    Based on this I ordered a batch from Lulu. With my batch there were some problems. What was a bit problematic for them was that my paintings have a lot of light colors that are more difficult to get right. But I must say they handled my problem fine, stayed friendly and came up with a solution.

    The printing quality itself and the finish how things looked were very good in my opinion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center