View Full Version : Unable to navigate flash on index.html
glworks
03-31-2008, 09:53 PM
I bought a template and have edited it using Adobe Photoshop CS3 and Flash CS3. I upload it to my server using Dreamweaver CS3. I am uncertain if the page that appears on Internet Explorer also appears on Firefox and Netscape browsers. Also, when I view my .swf file on my local folder everything appears to be fine, but on the website only the main page appears unable to navigate. The tabs at the bottom should display rollovers as it shows in my local folder. My biggest concern is that the page will not navigate.
My website is http://glphotographs.com/ and it should look like this template: http://www.flashmint.com/show-template-2062.html
matbury
04-01-2008, 12:58 AM
The most common cause of this problem is that you code is executing before everything's had a chance to load in and initialise. Flash movies stream by default so you have to stop your code from running until everything's there.
Here's an example of the start of a document class in AS 3.0 that might sort out your problem:
package {
import flash.display.Sprite;
// any other classes you need...
public class YourClass extends Sprite {
// data vars
public function YourClass() {
// stop the movie from running until it's finished loading
addEventListener(Event.ENTER_FRAME, loadProgressHandler);
}
private function loadProgressHandler(event:Event):void {
var loaded:int = this.root.loaderInfo.bytesLoaded;
var total:int = this.root.loaderInfo.bytesLoaded;
// trace("loaded: " + loaded + " - total: " + total);
if(loaded >= total) {
removeEventListener(Event.ENTER_FRAME, loadProgressHandler);
init();
}
}
private function init() {
// You're ready to roll! ...
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.