473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 4070
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.googlegr oups.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***********@gmail.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***********@gmail.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****************@TK2MSFTNGP12.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***********@gmail.com

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

Nov 17 '05 #5
In message <11**********************@f14g2000cwb.googlegroups .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 IPostBackEventHandler.

Add a Click event:

public event ImageClickEventHandler Click;

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

When creating the HTML, use

this.Page.GetPostBackClientEvent(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.GetPostBackClientEvent(this,"") +
"\" type=\"application/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 RaisePostBackEvent method:

public void RaisePostBackEvent(string eventArgument)
{
if(this.Click !=null)
{
this.Click(this,new ImageClickEventArgs(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***********@gmail.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
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...
1
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
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...
4
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...
3
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...
3
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...
13
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 ...
5
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...
2
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...
1
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.