On my time line I have 5 frames for 5 different pages on the site. Frame 1 I have an empty mc and a flv player that call this code and everything works fine:
//empty clip
var mc_empty:MovieClip = new MovieClip();
addChild(mc_empty);
//remove instance of the flv player on the stage and put it in the empty mc
var myPlayer:FLVPlayback = flv_player;
removeChild(myPlayer);
mc_empty.addChild(myPlayer);
btn_alchemist.addEventListener(MouseEvent.CLICK, buttonClick);
btn_alchemist.addEventListener(MouseEvent.CLICK, populateAlchemist);
function populateAlchemist (evt:MouseEvent):void {
textLoader.text_txt.text = "Title";
textLoader.subText_txt.text = "Content"
textLoader.link_txt.text = "Extra Content";
}
//function of flv player
function buttonClick(evt:MouseEvent):void{
if(evt.target==btn_alchemist)
myPlayer.source = "alchemist.flv";
Now when I try to put code on another frame I get the textLoader to work fine but I can not clear out and populate my flv player anymore. When I add this code in I keep getting output errors.
//empty clip
var mc_empty:MovieClip = new MovieClip();
addChild(mc_empty);
//remove instance of the flv player on the stage and put it in the empty mc
var myPlayer:FLVPlayback = flv_player;
removeChild(myPlayer);
mc_empty.addChild(myPlayer);
// add event to project buttons
btn_4XPress.addEventListener(MouseEvent.CLICK, buttonClick);
btn_4XPress.addEventListener(MouseEvent.CLICK, populate4XPress);
function populate4XPress (evt:MouseEvent):void {
textLoader4.text_txt.text = "Title";
textLoader4.subText_txt.text = "Content"
textLoader4.link_txt.text = "Extra Content";
}
//function of flv player
function buttonClickXpress(evt:MouseEvent):void{
if(evt.target==btn_4XPress)
myPlayer.source = "4XPress.flv";}
It says there is the conflict exists with definition mc_empty and myPlayer. How can I get around this? Thanks.