Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Flash Button Link To Html Page

    Hello everyone! I have two problems. My first is, my site takes too long to load, is there a way to make it load faster? My second is I have an order button on my Flash website that should open an html order form on a separate page. My website is a Flash .swf file that I had to embed in Dreamweaver for the host to be able to upload it. I know the button works in Flash and Dreamweaver when I test it in the browser is because it is looking for the path where I have the order form saved on my computer (F:\Metomorphis Restoration Website\metamorphosisdpr email order form.htm). But what code can I use to make it look for the form to link it on the web. I have tried everything that I know and all of it is wrong. I have been to many forums and any questions pretaining to this are not answered. My site is http://metamorphosisdpr.com/. Please help me.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2

    Default

    Hello again. I solved the second question that I had about the link to my html page by continuously playing around with my flash program and the ftp client during the uploadng of the site to the host. Now, if someone would please help me with the problem of a faster upload of the website on the internet. I know I need to take some of the "junk" out of the source file, but I don't know for sure what is junk and what is not (%20 maybe?). But what else can you tell me about making the site load faster? Do I even need a preloader? My site is http://metamorphosisdpr.com/. Thanks
    Last edited by msbay01; 06-28-2007 at 06:53 AM. Reason: added question.

  4. #3
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    A preloader is misleading in respect to the fact that it is needed at all. The flash player streams content which means once enough of a file is downloaded the file will play while the rest of the file continues to load. The same thing as playing .mp3 files with the flash player. Preloaders are basically eye candy for the user to understand what is going on. The flash file or image will load regardless of a preloader in existance or not. With that said, preloaders are pretty easy to understand. It's simply a matter of checking bytes loaded vs total bytes in an enterframe event.......actionscript wise. There are other methods that use a couple of frames playing in a loop to cheick the same data. One other thing, when a .swf is published, only the content used in the movie is published with the file. Unused content in the library is arbitrary and does not need to be deleted, except for tidyness. Here is an example of a preloader function I wrote that is pretty easy to use. Keep in mind that when testing a preloader, it needs to be in an online environment. Testing locally files load too quickly for the preloader to even be seen.

    Preloader function designed for a two scene project. Scene one is the preloader function on the first frame. Scene two is the main movie with a frame label the function can target...

    Code:
    stop();
    function myPreloader(targetFrame) {
    	createEmptyMovieClip("holder", 9999);
    	centerX = Stage.width/2;
    	centerY = Stage.height/2;
    	holder.createTextField("display", 100, centerX, centerY, 40, 20);
    	holder.display.border = true;
    	holder.display.background = true;
    	this.onEnterFrame = function() {
    		total = int(_root.getBytesTotal());
    		download = int(_root.getBytesLoaded());
    		percent = int(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%";
    		_root.holder.display.text = percent;
    		if (total == download) {
    			_root.gotoAndPlay(targetFrame);
    			_root.holder.unloadMovie();
    			delete this.onEnterFrame;
    		}
    	}
    }
    //Usage..... function name("frameLabel");
    myPreloader("movieStart");
    hope its useful
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial