Solved

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

Posted on 2008-10-07
3
1,451 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

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

18 Experts available now in Live!

Get 1:1 Help Now