Solved

problems skipping flash animation header

Posted on 2009-05-18
2
529 Views
Last Modified: 2013-11-12
I bought a flash header template on the internet. I have very limited experience with flash so please keep that in mind...

I am attempting to skip the flash header animation on all pages but the index page. I have gone into each page I want to skip the header animation and added the &par=skip parameter. See below code for sample.

I have also made the following changes in flash:

-->on the preloader, I added the following to the actionscript (frame 60 is the last frame in the animation):
 
if ((loaded == total) && (_root.par == "skip"))
   {

      _root.gotoAndStop(60);

      } else if (loaded == total) {

         _root.gotoAndPlay(2);
      }

}


--> then I put this code into the first animation of each applicable layer I don't want to see animated as the person navigates the site: I used applicable frame numbers.

if(_root.par == "skip") {
      gotoAndStop();      
      }

So I preview index.html on my computer (dreamweaver-->index.html-->preview in safari) and the changes appear to work just fine. I upload all files, clear the cache, and check it out online. It doesn't work. It gets stuck on the loading page between navigation. Please check out the site and see for yourself:

haitisolarenergy.com

What is causing this problem and how can I fix it?

If you'd like to take a look at the .fla file, please email me ;)

I am NOT an experienced web developer so please give me a good step by step break down.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
                   width="980" height="515">
        
            <param name="movie" value="flash/header_v8.swf?button=2&par=skip" /> 
            <param name="quality" value="high" />
        
            <param name="menu" value="false" />
            <!--[if !IE]> <-->
            <object data="flash/header_v8.swf?button=2&par=skip"
                    width="980" height="515" type="application/x-shockwave-flash">
             <param name="quality" value="high" />
             <param name="menu" value="false" />
             <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
             FAIL (the browser should render some flash content, not this).
            </object>
        
            <!--> <![endif]-->
        </object>

Open in new window

0
Comment
Question by:isabella12
2 Comments
 
LVL 19

Accepted Solution

by:
quizengine earned 500 total points
ID: 24420793
Hi.

Have had a look at the problem and I have a couple of observations.

Firstly, the movie *is* behaving as you describe, but *only* for the first time you click a tab. Anytime thereafter you click a tab, it behaves as you want it to. So if I start from the index page

...loads whole movie, I click 'FAQ' tab
...loads whole movie on the FAQ page, I click home,
...jumps rather than loads, click 'FAQ'
...jumps rather than loads.

So, my guess is that the code in your html that reads

       flash/header_last.swf?button=4

is making the browser think that this is a completely new piece of Flash - specifically it is the

      ?button=4

that makes the browser think this.

So... if you were to remove that parameter from the html, clear your browser cache and try again, I bet you'll find it works. So then, how to get your movie to jump to the right place *without* passing it a parameter ? Well, I suggest that if the movie can discover which html page it is within, then you could code this behaviour into the movie

*pseudo code*

If (page_i_am_in == "index.html") {
 button = 1;
}
If (page_i_am_in == "faq.html") {
 button = 4;
}

etc.

See - http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/

to find out how to get this info into your .swf
0
 

Author Closing Comment

by:isabella12
ID: 31582810
Taking out the button parameter worked...having the correct button indented on each page is not nearly as important to me as not having the flash movie reload each time. So taking it out entirely solved my problem. Thank you!!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question