Groups | Blog | Home
all groups > flash (macromedia) > september 2005 >

flash (macromedia) : So confused....


Yakyak
9/4/2005 7:20:36 PM
Ok, say I have a button and a swf right next to it, when i click the button, i want to change the swf, can anyone help me with that?
Basically I want to swap the swf.
Chaos_Blader
9/4/2005 10:21:06 PM
make sure your page is PHP enabled. then use

<?php
$movie=$_GET['movie'];
if ($movie=="moviename") {
$swf="movienameswfcode";
}
else if ($movie=="moviename2") {
$swf="movienameswfcode2";
}
else if ($movie=="moviename3") {
$swf="movienameswfcode3";
}
else {
$swf="movienameswfcode4";
}
?>

My Movies Blah Blah

<a href="?movie=moviename" > Link 1 </a>

<a href="?movie=moviename" > Link 2 </a>

<a href="?movie=moviename" > Link 3 </a>

<a href="?" > Link 4 </a>

<?php echo $swf; ?>

Simple.
LSNsaltlamp
9/4/2005 11:13:39 PM
An easier method (in my opinion) would be to create a new movie clip to place
next to your button. The movie clip would consist of multiple key frames each
containing a different movie clip. This would allow you to use a script on the
button such as:

on (release) {
_root.newMC.gotoAndStop (2);
}

Replace newMC with whatever your new movie clip?s instance name. This
particular script would make your new movie clip goto frame 2 which could
contain a different clip than frame 1.
AddThis Social Bookmark Button