Solved

How can i get a flash variable using c# (ASP:NET)?

Posted on 2008-10-07
3
1,460 Views
Last Modified: 2013-11-08
Hi all,

I have an swf that display some info according with some parameters that i passed throught a cs class. For this in the aspx i have a literal control that I charge in the page_load event (see the code attached).

The idea is that after the swf load completely, it need to have a variable where the user can write what he wants (until here all works fine).

Now the deal is that i need to get in my class what the client wrote in the swf. How can i do this???

Please if someone  knows how can i do this it is very urgent.

Thx a lot

Regards,

Daniel Peralta
string player = "";

        player += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"233\" height=\"46\" id=\"TrackPlayer\" align=\"middle\">";

        player += "    <param name=\"allowScriptAccess\" value=\"sameDomain\" />";

        player += "    <param name=\"allowFullScreen\" value=\"false\" />";

        player += "    <param name=\"movie\" value=\"" + this.Page.ResolveUrl("~/Players/Mp3Player.swf") + "\" />";

        player += "    <param name=\"quality\" value=\"high\" />";

        player += "    <param name=\"bgcolor\" value=\"#000000\" />";

        player += "    <param name=\"FlashVars\" value=\"songName=" + trackName + "&songURL=" + trackUrl + autoplayOption + "\" />";

        player += "    <embed src=\"" + this.Page.ResolveUrl("~/Players/Mp3Player.swf") + "\" FlashVars=\"songName=" + trackName + "&songURL=" + trackUrl + autoplayOption + "\" quality=\"high\" bgcolor=\"#000000\" width=\"233\" height=\"46\" name=\"TrackPlayer\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";

        player += "</object>";
 

stringBuilder sb=new StringBuilder();

sb.Append(player);

myLiteral.text=sb.Text;

Open in new window

0
Comment
Question by:danielnp20
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
HeoQue earned 500 total points
ID: 22671024
you can use florine ( http://www.fluorinefx.com/ ) for messaging between flash and .NET

Thanks,
Amr
0
 

Author Comment

by:danielnp20
ID: 22671069
thx Amr i was reading WebORB but this is more simple...thx again
0
 
LVL 9

Expert Comment

by:HeoQue
ID: 22671352
you're welcome . florine is open source and we are more likely to recommend it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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