Flash menu and Master Pages

Posted on 2007-08-08
Last Modified: 2007-12-19

I'm building a website that uses a master page that contains a flash menu.
my problem is that everytime you click on a menu item it reloads the next page (including the same master page) and the flash menu resets!

I would like to have the flash menu "remember" where it was...

basically looking to find a way of getting the aspx page filename within flash when it first loads so I can tell flash to do certain actions depending on which file is being loaded...

I will try to explain this another way.

default.aspx ---> masterpage.master
default2.aspx ---> masterpage.master
masterpage.master ---> includes the flash menu

I want the flash menu to detect what file is being loaded either default.aspx or default2.aspx
so that when teh page loads either the default movie clip or the default2 movie clip is active...

make sense?

need this asap!

Question by:bensarz
    LVL 39

    Expert Comment

    hi there. i'm no asp expert but i tried something like this recently, and for my own learning i'd like to understand something. is your flash embedded into the aspx pages or is it just calling them.
    you might want to try using frames, that way only the desired frame will reset when a menu item is selected.

    you can try parsing a variable from the aspx page that flash will check to determine what it must do but it will still reload and then go do what it's supposed to do.


    Author Comment

    my flash menu is embedded into the aspx page...
    I want to avoid using frames if possible....
    how would I parse a variable from the aspx for flash to access it?

    once I have the variable in flash... I'm good to go...
    LVL 39

    Expert Comment

    i've only worked with aspx and flash together once, and what i did was use the xml object to load a aspx page that outputted xml which the flash could understand, i'm sure there's a better way if its a simple variable but then you should ask in the .NET forum.
    LVL 9

    Accepted Solution

    To pass variables from html to flash use FlashVars (read more:

    Try adding something like this to your tags including flash on your masterpage:
    Object Tag Example:
    <PARAM NAME=FlashVars VALUE="url=<%=Request.servervariables("url")%>">
    Embed Tag Example:
    <EMBED src="display.swf" FlashVars="url=<%=Request.servervariables("url")%>" ... (other parameters)</EMBED>

    ~ Jakob E


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

    755 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

    21 Experts available now in Live!

    Get 1:1 Help Now