• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Flash header that detects what document that imports it

Hi!

I have created a typical "flash-header" for a website.
This header is animated like an intro and I want the whole animation only to run from the start on the home-page.
On all other pages I want the header to jump directly to the last frame, skipping the whole intro-nonsense.

Is it possible to read wich file is importing the flash-file inside the Flash-file.
Like an actionscript that has short code pile

thisURL = methodToGetCurrentURL();

if thisURL == "index.html" then {
  play();
} else {
  gotoAndPlay("Stop")
}

If that is not possible, then can I simply get the parameter from the import of the flashfile.
in IMPORT of the SWF:
header.swf?startpage=no

in Flashfile:
getURL ("test.swf?startpage=" + startpage);
if (startpage == yes) {
      gotoAndStop("Start");
} else {
      gotoAndStop("stop");
}

I'm a newbie to flash and nothing seems to work very well.
The simpler the solution, the better. Thanx./
Ola.
0
snuttemjuk
Asked:
snuttemjuk
1 Solution
 
trigger-happyCommented:
Hello snuttemjuk,
        Have you considered using javascript for this? Basically what you can do is have flash call a javascript function on the page that will return a variable telling flash what page it is.

http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm
http://www.echoecho.com/flashjavascript.htm

--trigger-happy
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now