Tuesday, December 6, 2011

Publishing Problem. MC doesn't work...

thanks in advance to any one who takes the time to read
this......



I have a flash movie that has some buttons on it that all do
basically the same thing. Click on a button, and two things happen:


1. A new child movie is loaded onto the stage, and

2. a html page is loaded into a different frame.



If I Ctrl-Enter to run the movie, everything works fine, the
new movie clip is played, and a browser window opens looking for
the the html file (nothing happens in the browser, but I am not
sweating that part yet. Maybe I ought to be?).



My problem lies in when i move it to the internet site
(hosted by godaddy). when I try to access it there, using firefox,
the buttons don't do squat, and I get ''Wating for
%26lt;www.mysite.com%26gt;''....with no change to either the movie clip
or the HTML frame.



I've tried publishing it with ''access local files only'' and
access network files only''.....both are giving me the same problem.



any ideas as to what this could be?



I think i correctly attached the code I am using. This is
authored in CS3, AS3

Another thing i'd like to add is that I've been doing this
for about 2 weeks now. If you think this code is sort of jacked,
i'd appreciate you telling me a better way I could construct this.



thanks again!

John

Attach Code



stop();

var bannerLoader:Loader = new Loader();



function handleClick( pEvent:MouseEvent ):void

{

bannerLoader.unload();

//trace(''This is inside the handleClick Function of Frame
1'');

if ( pEvent.target == home_btn )

{

//trace(''clicked on home_btn'');

//set up variables for SWF file and load it.

var homeRequest:URLRequest = new
URLRequest(''HomeBanner.swf'');

bannerLoader.load(homeRequest);

//set up variable for URL and load it to the mainWindow yaya

var homepageRequest:URLRequest = new
URLRequest(''/home.html'');

navigateToURL(homepageRequest,''mainFrame'');



}

else if (pEvent.target == services_btn )

{

//set up variables for SWF file and load it.

var servicesRequest:URLRequest = new
URLRequest(''ServicesBanner.swf'');

bannerLoader.load(servicesRequest);

//set up variable for URL and load it to the mainWindow

var servicespageRequest:URLRequest = new
URLRequest(''/services.html'');

navigateToURL(servicespageRequest,''mainFrame'');

}

else if (pEvent.target == projects_btn )

{

//set up variables for SWF file and load it.

var projectsRequest:URLRequest = new
URLRequest(''ProjectBanner.swf'');

bannerLoader.load(projectsRequest);

//set up variable for URL and load it to the mainWindow

var projectspageRequest:URLRequest = new
URLRequest(''/projects.shtml'');

navigateToURL(projectspageRequest,''mainFrame'');

}

stage.addChild(bannerLoader);

}



home_btn.addEventListener(MouseEvent.CLICK, handleClick);

services_btn.addEventListener(MouseEvent.CLICK, handleClick);

projects_btn.addEventListener(MouseEvent.CLICK, handleClick);

No comments:

Post a Comment