-
Link to a specific point in a Flash movie from an html page?
I want to place a link in html that goes to scene 2, frame 43 of my swf located on a defferent domain. Is this possible?
light4u
Design & Marketing
http://www.dreamteammedia.com
-
Senior Member
yes, but not straight.
I wil discribe it global, to help you on your way.
If you don't succeed let me know (and else to)
As usual you need to embed it in HTML, in this case using SSI:
in page_1st-domain.html
<A href="http://2nd.com/mov.shtml?kickstart=43">
in http://2nd.com/mov.shtml
Code:
<HTML>
<HEAD>
<TITLE>unicycle.net</TITLE>
<SCRIPT language="JavaScript" type="text/javascript">
<!--
function start() {
var obj=sherlock("yourmov");
if(obj) {
if swf is completly loaded {
eval('obj.TGotoFrame("/", <!--# if kickstart is defined echo kickstart else echo "1"-->');
}
}
}
function sherlock(n, d) {
var p,i,x;
if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n])&&d.all) x=d.all[n];
for(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=sherlock(n,d.layers[i].document);
return x;
}
// These are only needed for Netscape browsers:
function flashGetHref() {
return location.href;
}
function flashPutHref(href) {
location.href = href;
}
function flashGetTitle() {
return document.title;
}
function flashPutTitle(title) {
document.title = title;
}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad="start();">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="400" id="yourmov" ALIGN="">
<PARAM NAME=movie VALUE="http://2nd.com/mov.shtml">
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=best>
<PARAM NAME=scale VALUE=exactfit>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=devicefont VALUE=false>
<PARAM NAME=bgcolor VALUE=#0000FF>
<EMBED src="http://2nd.com/mov.shtml" menu=false quality=best scale=exactfit wmode=transparent devicefont=false bgcolor=#0000FF WIDTH="550" HEIGHT="400" NAME="yourmov" ALIGN="" swLiveConnect=true TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
</BODY>
</HTML>
Wait a while, and I post another (better) option.
-
Senior Member
In this post I'm very precise, except for the last swf bit since I'm still Flash4 user (even while I have MX).
in page_1st-domain.html
<A href="http://2nd.com/mov.shtml?kickstart=43">
in http://2nd.com/mov.shtml
Code:
<HTML>
<HEAD>
<TITLE>dus</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=main WIDTH=99% HEIGHT=100%>
<PARAM NAME=movie VALUE="http://2nd.com/mov.swf?kickstart=<!--#echo var="QUERY_STRING" -->">
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=high>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=bgcolor VALUE=#000000>
<EMBED src="http://2nd.com/mov.swf?kickstart=<!--#echo var="QUERY_STRING" -->" menu=false quality=high wmode=transparent bgcolor=#000000 WIDTH=99% HEIGHT=100% TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" align="middle">
</EMBED>
</OBJECT>
</BODY>
</HTML>
Then in the 1st frame of mov.swf make
Code:
if kickstart = 0
goto and play kickstart
endif
this will be the most compatible and easiest way.
-
Senior Member
Okay last one (I hope)
make it <A href="http://2nd.com/mov.shtml?43">
that contains
src="/mov.swf?kickstart=<!--#if expr="$QUERY_STRING"--><!--#echo expr="$QUERY_STRING.html"--><!--#else --><!--#echo "2"--><!--#endif -->" width="550" etc.
then in frame 1 not the if/else, but only
go to and play kickstart
-
I am not understanding. Thanks for the reply but your code crashes my browser every time.
www.Domain1.com is where I need to place a link so a user can get to frame 43 of word_search.swf
www.Domain2.com is where the word_search.swf is.
Here is the code for the swf I want to link to:
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<TITLE>word_search</TITLE>
</HEAD>
<BODY bgcolor="#000066">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="650" height="400">
<param name="movie" value="word_search.swf">
<param name="quality" value="high">
<embed src="word_search.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="400"></embed>
</object>
</BODY>
</HTML>
From domain one how do I link to frame 43 of word_search.swf
Thanks
light4u
Design & Marketing
http://www.dreamteammedia.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|