Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Linking to an If Statement with Hash Location Problem

$
0
0

Hi Everyone!

 

We have a project with multiple pages that we’ve developed in Edge Animate. The site is nearly complete and will go live tomorrow. You can see it as it is now at www.edgewaterharbornj.com/dforum. I have also created a simple version with just the 2 pages we have trouble with, and posted it in my Dropbox. You can download the native files here:

 

https://dl.dropboxusercontent.com/u/60666794/publish_LifeDev.zip

 

We have a problem with one of our links between two of the pages.

1) When the user can clicks on the area under the logo on the home page, he should go to the 4th picture (restaurant at night), with the 4th button activated. Instead, they sometimes go to the 1st picture (river in the sun), with the 4th button activated. This sometimes works and sometime fails, especially in Firefox.

2)They can also click on the LIFESTYLE button in the top nav, which takes them to the 1st picture (river in the sun) with the 1st button activated, which always works.

 

Code explanation:

 

We’re using a hash link and an “if” statement to differentiate between clicking the LIFESTYLE button in the top nav and clicking the area under the logo on the home page.

 

Our hash link out of page 1:

window.open("life_simple.html#photo_mask", "_self");

 

Our if statement (in Stage/creationComplete) in page 2 that manages scrolling a group of images:

 

 

if(location.hash) {

 

sym.getComposition().getStage().$("photo_mask").animate({scrollTop:267 0},750);

}

 

We have another if statement in page 2 Stage/compositionReady to manage the button states:

 

 

if(location.hash) {

 

sym.activeBtn="but_4";

sym.getSymbol("but_4").play();

sym.getSymbol("havenSym").play();

sym.getComposition().getStage().getSym("but_1").stop("onHover");

}

else {

sym.activeBtn="but_1";

sym.getSymbol("but_1").play();

}

 

I hope all this makes sense!


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>