• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

getting current address

Community Expert ,
May 04, 2008 May 04, 2008

Copy link to clipboard

Copied

I've designed this animated navigation bar which is common to each page on the site. I'm trying to figure out some action script that would get the current web address so that the nav button, which is a movie, would go to a specific frame and hold.

For example something like this written in english not code:
if url = http//www.mysite/about html go to and stop on frame 10 of movie clip named about

I'd include an if statement for each of the 10 main pages of the site so that the nav buttons would go to their on position at frame 10 and stay there until a new page was called up.

Hope you follow that and that the script would be fairly simple.
TOPICS
ActionScript

Views

673

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

if you're reloading your navigation bar with each html file you need to use javascript to return the html page to flash (or you can use flashvars). you can use the externalinterface class to receive javascript calls into flash.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

Thanks for the reply. So any examples of this out there? I'm still completely lost.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

use google to search for: javascript retrieve url

and the flash help files have sample code for the addCallback() method of the externalinterface class.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

still haven't figured this out.

If I could simply get the filename of the page the swf lives on then I could write a simple if statement that would play the appropriate movie clips to the ending frame.

Here's a link to the site I'm working on. The nav elements roll out into the page as you mouse over them. The amber power lights turn a bright green when the elements reach their ending position. All I want to do is to have the current page hold the appropriate tray in it's ending position.

http://byzintek.com/LaconicSite/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

LATEST
if you want the complete url, remove the 2nd locationVar line.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines