views:

54

answers:

1

Hi,

I would like to use a flash menu in Asp.net 2.0. However, I have two problems:

  1. How do I keep the menu static so the animations do not refresh with page clicks? Example would be like a 'frames' but within ASP.NET 2.0... Do I use the old HTML Iframes approach?? Or can I use something more contemporary using AJAX or something like that? This one stumps me... Should I user custom controls or AJAX ??

  2. Among other things, I'd like to change the menu swf based on security role of user in ASP.net 2.0, so I would need to pass variables to Flex / Flash application. I have resolved to do this with SWFOBject (for embedding Flash) but if there is another way / easier or more standard please let me know...

Thanks for your help! Craig

+1  A: 

To get the menu to stay static you'll either need an iframe or use ajax like UpdatePanel. I don't think this is a good solution though. If you have a Flash widget on an otherwise HTML page, then the Flash widget should refresh along with the rest of the page. You shouldn't make the page an iframe or ajax just to avoid reloading the Flash widget (but your design might be better with ajax anyways, regardless of Flash usage--it's rarely better with an iframe).

Regarding options, passing via FlashVars is the easiest/fastest way. Since it's security related you could have the Flash menu make an HTTP/AMF/whatever call out to ASPX to get the data, but I think that would be overkill, just make sure the widget is just a menu and doesn't actually do anything that would cause a security hole (i.e., make sure the pages it links to are secured, not just the menu).

Sam
Sam, My SWF menu needs to load content based on user clicks, but it also will animate based on url. So, it's not a widget but a static menu that refreshes a portion of the page.. is it possible to use an update panel? I think an iframe is the only answer?
CraigJSte
Also one other question Sam.. I have to use Frameset with HTML page, then call the ASPX pages with Interaction to SWF file, so I pass variables back to HTML page with loadvars() and javascript to parse the URL... but sending data back to the SWF file to do animation and changes will be with flashvars.. does that sound right ( I guess there is no question there except advice )
CraigJSte