A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: ¿From HTML jump into spesific Keyframe in Flash?

  1. #1
    Senior Member
    Join Date
    Jan 2001
    Location
    Barcelona
    Posts
    129
    Hello there,

    To explane myself I have to do a example:

    1) By klicking a Button from a normal HTML Webside i open, in the same Browserwindow, a Flash (swf)-Site. Until here, NO problem.
    2) Here´s what I like to do...
    Is it possible, maby with help of JavaScript, to jump directly into a spesific keyframe, label or instance from the Flashmovie?

    Hope I explanet myself,
    Thanks Fery

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    148
    on the button pass the frame you want to go to as a query string, ie:

    <a href="flashPage.htm?flashLabel=label2">click me</a>

    Then in your page that contains the flash file stick this bit of javaScript:

    <script>
    query = location.search.substring(1);
    document.write "<OBJECT classid='clsid27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH=550 HEIGHT=400>";
    document.write "<PARAM NAME=movie VALUE='Movie1.swf?" + query +"'>";
    document.write "<PARAM NAME=quality VALUE=high>";
    document.write "<PARAM NAME=bgcolor VALUE=#FFFFFF>";
    document.write "<EMBED src='Movie1.swf?"+query+"' quality=high bgcolor=#FFFFFF WIDTH=550 HEIGHT=400 TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>";
    document.write "</OBJECT>";
    </script>


    This will stick a variable called 'flashLabel' in the root of the movie with the value of 'label2'. You can use that to jump to a scene or do what ever.

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