Solved

problems skipping flash animation header

Posted on 2009-05-18
2
530 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

738 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