Flash header that detects what document that imports it

Posted on 2004-11-14
Last Modified: 2010-04-03

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 {
} else {

If that is not possible, then can I simply get the parameter from the import of the flashfile.
in IMPORT of the SWF:

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

I'm a newbie to flash and nothing seems to work very well.
The simpler the solution, the better. Thanx./
Question by:snuttemjuk
    1 Comment
    LVL 14

    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    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…
    The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now