- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a question about Vinod Raghupathy's Intel Software Network article entitled "Flash* and .NET* Integration Using ASP.NET".
I ama beginner at integrating Flash and .NET. I have read through the instructions for communication from Flash to a database. My problem is: how doI pass the id=12345 to getUserData.aspx and then display it? Should i embed .swf to .aspx? which file should i run, the.swf or getUserData.aspx?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here issome information we received from ourengineering contacts:
The swf is embedded in an html or an aspx file which act as a container to the swf file. The swf file can retrieve data in the form of an xml for which it needs the xml string or an uri. In this case Vinod was explaining using uri. The aspx page getUserData.aspx is the uri which gives the xml data to the swf file. This aspx page expects a parameter called id. So we call the page as getUserData.aspx?id=1234. Now how the uri is formed is the question. This is done in the action script in the example Vinod gives.
One more point is, the ASPX page should set the response.contenttype = text/xml. Then only the action script is able to load the XML into DOM.
One by one, here are answers to your questions:
Q. How do I pass the id=12345 to getUserData.aspx and then display it?
A. 1) From Flash, using ActionScript we can pass the id(12345) to the aspx file as a query string. The LoadVariables method can be used in the load action of the flash movie clips onClipEvent event:
onClipEvent(load) {
loadVariables(getUserData.aspx?id=12345,this);
}
2) The getUserData.aspx page retrieves the value of id from the query string as:
Private void Page_Load(object sender, System.EventArgs e)
{
string userId = Request.QueryString(id);
}
Q. Should I embed .swf to .aspx?
A. Yes, the .swf should be embedded into the aspx file using the object and embed tags. Please see the attachment for an illustration.
Q. Which file should I run, the .swf or getUserData.aspx?
A. The aspx file should be run, which will automatically load and run the Flash object embedded within itself.
==
Lexi S.
IntelSoftware NetworkSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's anotherquestion we received about this article. The answer comes from an engineering contact at Intel:
Q. How do I integrate a fully developed html page with swf to my ASP.NET* aspx page?
A. It is not clear to me what exact role the aspx page is intended to play. The article talks about one of the ways a Flash* file can talk with other applications, like an ASP.NET* application. The examples mentioned use aspx, which in turn communicates with a database, as a data source for the Flash* file. Also, an aspx page hosts the Flash* file. If the question is for the Flash* file to communicate with an aspx file to get some data, then the code is as mentioned in the article. If the aspx page needs to just host the Flash* file that is already present in an html, then the aspx can host the html page directly using iframes or object tag.
==
Lexi S.
IntelSoftware NetworkSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because of its age and the fact thatthe topic isonly tangentially related to Intel Architecture, the article discussed here has been removed from the site. This discussionremains here for archival purposes, but we're locking the thread.
==
Lexi S.
IntelSoftware NetworkSupport
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page