go to the frame 1

go to the frame 2

go to the frame 3

go to the frame 4

go to the frame 5

go to the frame 6

go to the frame 7

go to the frame 8

go to the frame 9

go to the frame 10

go to the frame 11

go to the frame 12

 

Stop

 

 

Last thing I need to make is for my XML raltive link to change when receiving the PassFlash();

 

 

JavaScript
 
ActionScript

<!--
var movieName = "testcommand";

function thisMovie(movieName) {
// IE and Netscape refer to the movie object differently.
// This function returns the appropriate syntax depending on the browser.
if (navigator.appName.indexOf ("Microsoft") !=-1) {
return window[movieName]
} else {
return document[movieName]
}
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
if (typeof(theMovie) != "undefined") {
return theMovie.PercentLoaded() == 100;
} else {
return false;
}
}


 

stop();

text = "Label Copy";

// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

// Array of songs
var sa:Array = new Array();

// Currently playing song
var cps:Number = 17;

// Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
}
playSong();
}

xml.load("songs.xml");

function playSong():Void
{
s = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
mute.gotoAndStop("on");
if(cps == sa.length - 1)
{
cps = 0;
s.loadSound(sa[cps].earl, true);
}
else
{
s.loadSound(sa[++cps].earl, true);
}
trackInfo.text = sa[cps].track;
playPause.gotoAndStop("pause");
textPos = 0;
}

 

These are my main two functions:

goTheFrame
function go(theFrame) {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).GotoFrame(theFrame);
}
}

FlashVar
function PassFlash(){
thisMovie(movieName).SetVariable("text", "TC2_52869");
}

}

 

Know I'm Sending to flash. Important look at the Yellow that talks to the JavaScript Function then goes to flash.

by using:

<a href= "#" VALUE="Goto Frame 1" ONCLICK="go(1) + PassFlash()" >go to the frame 1 </a>

//-->
</SCRIPT>

 

 

Where the Flash Movie is inside the HTML document

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab','name','testcommand','width','363','height','24','id','testcommand','src','javascript-to-lash2','play','false','loop','false','quality','high','scale','SHOWALL','swliveconnect','true','pluginspage','http://www.macromedia.com/go/flashplayer/','movie','javascript-to-flash2' ); //end AC code
</script>
<noscript>
<OBJECT
CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" name="testcommand"
WIDTH="363"
HEIGHT="24"
ID=testcommand>
<PARAM NAME="MOVIE" VALUE="javascript-to-flash2.swf">
<PARAM NAME="PLAY" VALUE="false">
<PARAM NAME="LOOP" VALUE="false">
<PARAM NAME="QUALITY" VALUE="high">
<PARAM NAME="SCALE" VALUE="SHOWALL">
<EMBED
NAME="testcommand"
SRC="javascript-to-flash2.swf"
WIDTH="363"
HEIGHT="24"
PLAY="false"
LOOP="false"
QUALITY="high"
SCALE="SHOWALL"
swLiveConnect="true"
PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/"> </EMBED>
</OBJECT>
</noscript>