A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: javascript to swf

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    3

    Helllp!

    Hi guys, I'm trying to load movies into an existing flash movie (so I dont have to have the page reload each time) but I get a java errror (object does not support this..)

    Here's the code.. bit of a noob, what am I missing?

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Flash movie control with Javascript. oooh.</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Arial, Helvetica, sans-serif}
    .style2 {
    font-size: 12px;
    font-weight: bold;
    }
    .style3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    }
    .style4 {color: #000000}
    -->
    </style>
    </head>

    <body>

    <p align="center">
    <span class="style1">
    <span class="style2">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="example" name="example" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="371" height="371">
    <param name="movie" value="Rockbox.swf">
    <param id="example" value="example">
    <param name="example" value="example">
    <param name="quality" value="high">
    <embed src="Rockbox.swf" id="example" name="example" swliveconnect="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="371" height="371"></embed>
    </object>
    </span></span></p>
    <p align="center" class="style3"><a href="javascript:example.TLoadMovie('1', 'RockBox.swf');" class="style4">Play Original Movie</a></p>
    <p align="center" class="style3"><a href="javascript:example.TLoadMovie('1', 'RockBox2.swf');" class="style4">Play 2nd Movie</a></p>
    <p align="center" class="style3"><a href='javascript:example.TLoadMovie("1", "ContactBox.swf")'>Play 3rd Movie</a>

    </body>
    </html>

  2. #2
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    With mozilla flavors get element by id is required.

    If your targeting the _root level you don't need T



    If you target a sprite/mc
    1 can not be a numeric name for the sprite.
    2 must be wrapped in quotes

    http://www.adobe.com/support/flash/p...ash/index.html

  3. #3
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    Dude you dragged up a 4 year old unrelated thread?

    I've split them.

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