Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2007
    Location
    Left Coast
    Posts
    71
    Thanks
    3
    Thanked 1 Time in 1 Post

    Play button separate from flash player

    I would like to activate a flash video with a play button that is located somewhere else on a web page, other than the player itself, like an image maybe. The player is transparent and is not visible.
    Can anyone help me with coding for that?
    Thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    So when you click the image the player becomes visble and not transparent? I think the best thing to do would be to use javascript to write the flash player to the page dynamically on click of a button. You can do this easily with SWFObject.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2007
    Location
    Left Coast
    Posts
    71
    Thanks
    3
    Thanked 1 Time in 1 Post
    By transparent I mean that I have video shot on a green screen and exported the alpha channel, so the player is there but you don't see it until play is hit then the charector shows.
    Thanks for the tip. Can you help me out with the coding or send me in a direction?
    Thanks

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    First you will need swfobject. Google that, should be the first result.

    Once you figure out how to put flash on a page with swfobject you just need to create a javascript function
    Code:
    <script type="text/javascript">
    function writeMovie()
    {
       var so = new SWFObject("movie.swf", "mymovie", "400", "100&#37;", "8", "#336699");
       so.addParam("quality", "low");
       so.addParam("wmode", "transparent");
       so.addParam("salign", "t");
       so.write("flashcontent");
    }
    </script>
    Then your image would look like
    Code:
    <img src="someimage.jpg" onclick="writeMovie()" alt="">
    You would probably need to have the video autoplay this way it shows up when you write it to the screen.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    Jan 2007
    Location
    Left Coast
    Posts
    71
    Thanks
    3
    Thanked 1 Time in 1 Post
    Awesome, thank you!
    Worked perfectly.
    Last edited by rvchuck; 02-23-2008 at 02:29 AM. Reason: Advice worked


  •  

    Posting Permissions

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