Hi,
I am having some issues with buttons sticking on a Flash based website that I built. The buttons sticking and not going anywhere does not always happen on the same pages and only occurs on about half the pages. It happens often on pages that I am loading videos externally as FLV’s on.
For my code I am telling the buttons to go to the next HTML page that I have the SWF’s embedded in.
It will probably make more sense if you see it in action… the web address for the site is: http://www.brianhauser.com/514/cos. Click on the register button to get in (it wont actually register you as we don’t have a database set up yet).
Thanks in advance for any input or problem solving ideas you may have. Below is my AS3 document class…
package{
import flash.display.MovieClip;
import flash.utils.*;
import flash.net.*;
import flash.media.Video;
import flash.events.*;
import fl.transitions.*;
import flash.display.*;
import flash.external.*;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
import fl.video.*;
public class Lesson5_3 extends MovieClip{
var container:MovieClip= new MovieClip();
var container2:MovieClip= new MovieClip();
var container3:MovieClip= new MovieClip();
var background2:MovieClip= new Background2();
var nextBtn:MovieClip= new NextBtn();
var previousBtn:MovieClip= new PreviousBtn();
var pageId:MovieClip= new PageId();
var prevNextDivider:MovieClip= new PrevNextDivider();
var type:MovieClip= new Type();
var checkBox1:MovieClip= new CheckBox1();
var checkBox2:MovieClip= new CheckBox2();
var checkBox3:MovieClip= new CheckBox3();
var checkBox4:MovieClip= new CheckBox4();
var checkBox5:MovieClip= new CheckBox5();
var checkBox6:MovieClip= new CheckBox6();
var checkBox7:MovieClip= new CheckBox7();
var checkBox8:MovieClip= new CheckBox8();
var vid:FLVPlayback = new FLVPlayback();
var lessonFive:MovieClip= new LessonFive();
var header:MovieClip= new Header();
var circlefull:MovieClip= new Circlefull();
public function Lesson5_3(){
addChild(container);
addChild(container2);
addChild(container3);
container.addChild(background2);
background2.y=stage.stageHeight/2;
background2.x=stage.stageWidth/2;
container2.addChild(nextBtn);
nextBtn.y=528;
nextBtn.x=202.8;
nextBtn.buttonMode=true;
nextBtn.addEventListener(MouseEvent.MOUSE_DOWN,navigateToNext,false,0,true);
container2.addChild(previousBtn);
previousBtn.y=528;
previousBtn.x=117.6;
previousBtn.buttonMode=true;
previousBtn.addEventListener(MouseEvent.MOUSE_DOWN,navigateToPrev,false,0,true);
container.addChild(pageId);
pageId.y=547.6;
pageId.x=154.8;
container.addChild(prevNextDivider);
prevNextDivider.y=528;
prevNextDivider.x=167.8;
container.addChild(type);
type.y=134;
type.x=250;
container.addChild(checkBox1);
checkBox1.y=186;
checkBox1.x=99;
container.addChild(checkBox2);
checkBox2.y=208;
checkBox2.x=88;
container.addChild(checkBox3);
checkBox3.y=230;
checkBox3.x=88;
container.addChild(checkBox4);
checkBox4.y=252;
checkBox4.x=92;
container.addChild(checkBox5);
checkBox5.y=273;
checkBox5.x=88;
container.addChild(checkBox6);
checkBox6.y=295;
checkBox6.x=137;
container.addChild(checkBox7);
checkBox7.y=318;
checkBox7.x=88;
container.addChild(checkBox8);
checkBox8.y=339;
checkBox8.x=108;
container.addChild(vid);
vid.source="video4.flv";
vid.skin="SkinOverPlaySeekStop.swf";
vid.skinBackgroundColor = 0x555555;
vid.skinBackgroundAlpha = 0.7;
vid.height=480;
vid.width=640;
vid.x=305;
vid.y=90;
//vid.addEventListener(Event.COMPLETE, onFrame);
container2.addChild(header);
header.y=30;
header.x=845;
container2.addChild(lessonFive);
lessonFive.y=68;
lessonFive.x=902.8;
container3.addChild(circlefull);
circlefull.x=55;
circlefull.y=90;
circlefull.scaleX-=.94;
circlefull.scaleY-=.94;
function navigateToNext(evt:Event):void{
var url:String = "lesson5_3a.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request,'_self');
}//ends navigateToNext Function
function navigateToPrev(evt:Event):void{
var url:String = "lesson5_2a.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request,'_self');
}//ends navigateToPrev Function*/
}//ends public function
}//ends package
}//ends public class