SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    Balto, MD
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash for Audio, Javascript for Ease... Hmmm...

    I feel like a bit of a newb...

    I have correctly embedded a .swf file into my page. The file is called voiceover.swf The .swf contains a voice over that I ONLY want to play when someone clicks a link that says "Click here for the voice over."

    I originally wanted the voice over to play automatically whenever the page was loaded. But since the voice over is long, it got really annoying.

    Here is the object and embed stuff for the .swf part:
    Code:
     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase=http://download.macromedia.com/pub/...ersion=6,0,29,0
    width="10" height="10" name="voiceover" ID="voiceover"><param name="movie"
    value="voiceover.swf"><param name="quality" value="high"><param name="LOOP" value="false"><param name="BGCOLOR" value="#000000"><param name="PLAY" value="false">
    <param name="autoplay" value="false">
    <embed src="""voiceover.swf" width="10" height="10" loop="false" quality="high" pluginspage=http://www.macromedia.com/go/getflashplayer
    type="application/x-shockwave-flash" bgcolor="#000000" AUTOPLAY="false"
    play="false" name="voiceover"></embed></object>
     
    
    The problem is that the .swf file automatically plays for about ten seconds every time I load the page.


    The link which has an href = java script:document.voiceover.play() will play the BALANCE of the voiceover when clicked.

    I am thoroughly confused by this.

    I have not invoked script=javascript in the head section of the page, because I am unsure if I need to. And even if I do put something there, I have no idea what it might be.

    I know this post is somewhat topic-straddling in nature. But I figured the average flash person would have more likely seen this than the average javascript person.

    Thanks in advance. Please excuse me while I ice my head.

    Jeff
    Last edited by jeffkenton; Mar 13, 2003 at 14:25.
    ---***---***---
    Good Programming takes a long time and costs a lot of money.

    Bad programming is done by the hour and costs minimum wage.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    Balto, MD
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solved

    I figured out the problem.

    Since the flash was a "multitrack" voice over, and only the first track played, I added a blank frame to the beginning of the movie. That way, the first frame would be devoid of content.

    That solved it.

    It now does not autostart, and the javascript as I quoted below works without any other changes to the page code.

    Take care, and I hope my adventure helps others with similar problems.

    Jeff
    ---***---***---
    Good Programming takes a long time and costs a lot of money.

    Bad programming is done by the hour and costs minimum wage.


Bookmarks

Posting Permissions

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