0

I want to replace a flash object that uses a single swf file (map of USA) and uses flash vars identified in the html to dynamically change colors of different states. Using a single file for multiple pages.

I've created an SVG file with each state having an ID name of it's two letter state abbreviation. What I'd like to do is import this using or , then using inline CSS on the HTML page manipulate the SVG image and adjust the fill of certain items.

Inline CSS within the SVG file (or referencing an external CSS file from within the SVG file) will not meet my desire of having one image file to be used on many pages – like the original swf.

Beaten my head against the monitor for a few days now trying a bunch of jQuery and javascript stuff, but sadly I am not proficient enough in js to make this work on my own.

Thanks for any advise or help!


Synchronize event for multiple users using a web application in c#?

I struck with a problem. I am working on a game development using C#, ASP.net web application using MVC4 and Entity Framework.

To brief my problem: I have a web application with a single page with a slider range from 0-100. Consider 3 users logs in the application and each are in their own session accessing the page with the slider.

Say if, user 1 moves the slider from position 0 to 10, the slider corresponding to the user 2 and user 3 has to be synchronized and should get reflected to their UI. vice versa for all. Looks like a multiplayer gaming where the vent of one gets shown for other users.

How to make this happen? I am trying hard cracking my mind to implement it but couldn't. Pls help me out fellow. Please do let me know more further information. I appreciate your help. Looking forward!

4

4 に答える 4

1

あなたが求めていることを完全に理解したかどうかはわかりません。米国のすべての州を含む SVG 画像があり、(インライン) CSS を使用してそれらの州の 1 つまたは複数を「強調表示」しようとしていると思いますか?

そうなると、従来の方法ではうまくいきません。JavaScript は画像を変更できません。CSS も、AFAIK も変更できません。私が知っている唯一の方法は、SVG を多かれ少なかれバイトごとに読み込み、JavaScript で画像を変更した後にそれを base64 エンコードし、次に Image を作成し、data URIを使用してソースを設定することです。

Web にはいくつかの暗号化ツールがあります。JSXGraph、具体的にはJSXCompressorまたはその性質のものを調べることをお勧めします。また、 PNGlibなど、画像を編集するためのライブラリもいくつかありますが、探しているものとはまったく異なります。Google を試してみてください。でも正直なところ、私は今あなたのために何時間もグーグルで検索する気がしません...

少なくとも正しい方向へのキックを与えてくれることを願っています.

于 2012-07-31T19:59:24.810 に答える
0

この質問に答えるには、ブラウザのサポートがまだ必要だとは思いません。私がやったことは、フラッシュバージョンを作成することですhttp://ryanhollingsworth.com/test/map.html

仕組みは、swfを埋め込み、flashvarsを使用して、カラー配列と状態配列の2つの配列に値を割り当てます。その結果、同じswfを複数のページで使用でき、色が異なり、状態の色も異なります。

SVGが追いつくでしょう、すぐに私は願っています:)

于 2012-08-01T19:37:52.523 に答える
0

これは、あなたがやろうとしていることと似ていると思われるSVGの何かです。マウスを上に置くと、状態の色が変わります。そこから学ぶことができると確信しています。

于 2012-07-31T22:04:12.697 に答える
0

ほとんどの場合、<object> を URL フラグメント パラメーターの受け渡しで使用できます。この例を参照してください。

あなたが求めているのは、基本的にSVG パラメーターです(注: 仕様はワ​​ーキング ドラフトであり、既知の実装はなく、構文は変更される可能性があります)。その仕様のデモで使用されるスクリプト フォールバック ソリューションが役立つ可能性があります。

于 2012-08-13T13:32:43.490 に答える