Solved

problems skipping flash animation header

Posted on 2009-05-18
2
525 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now