Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problems skipping flash animation header

Posted on 2009-05-18
2
Medium Priority
?
539 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 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

971 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