473,545 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

flash ActionScript/c#

Ok,
I have created a flash animated button that I want to use as a regular
button in my c# web app.
Using actionscript, do you know how to call the c# functions in the
project?
Thanks for any help,
Trint

Nov 17 '05 #1
6 4077
Hi,

You cannot do that, your button is just a flash movie and it does run in the
client, you do have two way to interact with the "outside" world:
(Preferred)
1- You can access the page where the movie is located, what you can do is
call a method that will either submit the page or do the appropiated action
in the page.
2- Assign the result of an url to a variable, if the url is a page in your
app you could make a call to the app, now the thing I'm not sure of, if is
this request is considered as part of the session you are into, or if it
does create a new session.

The above is true for flash 5, it's been a while since I last coded in it
and something may have changed
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"trint" <tr***********@ gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Ok,
I have created a flash animated button that I want to use as a regular
button in my c# web app.
Using actionscript, do you know how to call the c# functions in the
project?
Thanks for any help,
Trint

Nov 17 '05 #2
It would be very helpful if you could provide an example
of the two options you suggest please. I am working on
this currently and I'm sure there has got to be a way
or flash wouldn't be as popular as it is...I just don't like the static
buttons common in applications.
Thanks,
Trint

.Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
It would be very helpful if you could provide an example
of the two options you suggest please. I am working on
this currently and I'm sure there has got to be a way
or flash wouldn't be as popular as it is...I just don't like the static
buttons common in applications.
Thanks,
Trint

..Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #4
Hi,

I can't I haven't worked with Flash in a while, you could go to macromedia
web site and you will find exam[ples there

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Trint Smith" <tr***********@ gmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
It would be very helpful if you could provide an example
of the two options you suggest please. I am working on
this currently and I'm sure there has got to be a way
or flash wouldn't be as popular as it is...I just don't like the static
buttons common in applications.
Thanks,
Trint

Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #5
In message <11************ **********@f14g 2000cwb.googleg roups.com>,
trint <tr***********@ gmail.com> writes
Ok,
I have created a flash animated button that I want to use as a regular
button in my c# web app.
Using actionscript, do you know how to call the c# functions in the
project?


I'm not sure you want or need to do that, if you want to use it as a
regular button. All you need to do is to make clicking on the button
generate a server-side event via a postback.

Subclass Panel and implement IPostBackEventH andler.

Add a Click event:

public event ImageClickEvent Handler Click;

In CreateChildCont rols, create a literal containing the HTML to display
your Flash object and add it to controls.

When creating the HTML, use

this.Page.GetPo stBackClientEve nt(this,"")

to get the text of a javascript function to cause a postback to the
control and make it the target of the onclick event either of the
<embed> tag or of an <a> tag surrounding the <embed> tag.

eg.

string html = "<embed onclick=\"" +
this.Page.GetPo stBackClientEve nt(this,"") +
"\" type=\"applicat ion/x-shockwave-flash\"" +
".....</embed>";

etc.

I can't remember whether onclick works for <embed> in all or indeed any
browsers, try <a> also. I got some combination of these to work.

Raise the Click event in the RaisePostBackEv ent method:

public void RaisePostBackEv ent(string eventArgument)
{
if(this.Click !=null)
{
this.Click(this ,new ImageClickEvent Args(0,0));
}
}

You then have a button with a server-side click event which renders as a
flash movie.

--
Steve Walker
Nov 17 '05 #6
Steve,
Thanks for your response...I am working with your answer now to see if I
can get this to work.
Thanks,
Trint

..Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1951
by: Matt | last post by:
Hello, I am attempting to get a software prototype UI/demo built in Flash to talk with existing C++ (so I can exchange data and commands between the application-software already developed in the C++ source with its prototype UI/demo to be built in Flash). Can anyone provide examples or guidance for such an effort? More details:
1
460
by: Nexus | last post by:
I've heard people saying that it can be done (Integrating Flash actionscript into ASP .Net apps ???) - does anyone have a lead on where I might find a coding sample or additional info
5
1423
by: Andy G | last post by:
I have a client that is really pushing me to start using Flash MX Professional to replace VS.NET. Main arguement is that it looks better and flows nicer than visual studio developed applcations (this client is a designer not a programmer). I believe that Flash is a 'Tool' not a 'Solution'. My 'Solution' is an ASP.NET application but I would...
4
2579
by: vunet.us | last post by:
I would like to create web charts. My site is using AJAX, so I thought of VML and SVG for chart graphics. But there is a browser compatibility issue. Flash would be a good solution but I do not know ActionScript (only basic animation). Any other ideas or links or feedbacking the 3 above technologies are so welcome... Thank you.
3
1593
by: bizt | last post by:
Hi, I have just started learning AJAX and need to learn a method where I can do the same to what AJAX does for HTML to Flash. Can this be done? Is there maybe a better way of allowing Flash to integrate with server side scripts? Thanks Burnsy
3
8615
by: paolazi | last post by:
Hello I have a problem: I have a database(mysql) with the following fields: test, descr, title I want to display them into a flash file. Now my php file called list.php (which collect the information from my database) is the following: <?php include_once '../library/config.php'; include_once '../library/opendb.php'; ...
13
16070
iam_clint
by: iam_clint | last post by:
Starting a thread for flash tutorials and such.. got a good link? pm me. http://www.kirupa.com http://www.actionscript.org/resourc...ries/Tutorials/ http://www.gotoandlearn.com http://www.flashkit.com http://www.senocular.com http://www.echoecho.com/flash.htm http://www.tutorialized.com/tutorials/Flash/1...
5
5935
by: ASP.NET explorer | last post by:
I have been asked to create some simple animation using Adobe Flash player in ASP.NET(C#) web application. While I am fairly well versed with ASP.NET C#, I absolutely have NO IDEA about how to say "Hello World" in a Flash enabled web page rendered via ASP.NET. Can any one let me get started? ---
2
3729
elamberdor
by: elamberdor | last post by:
Hi All! Well, i'm modifying a dynamic map, with lat and long datapoints, my problem is it loads in text perfectly onto exact points I specify on the map, ..well now I want to load in icons(images) instead of text. (yes i'm being difficult) and i'd like the text to load into a static placeholder symbol instead. Problem is, I can get...
1
1658
by: deluxmilkman | last post by:
What is the major difference between Flash 5 actionscript and Flash 6 actionscript ? I am trying to downgrade Flash 6 site to Flash 5. It doesn't give me error, but it's not working. Thanks
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.