PDA

View Full Version : Embedding flash in an ASP page Help


mextest
05-02-2008, 05:02 AM
Hello everyone,

Not sure if this is the right place to post this but here it goes...

I am currently trying to get my actionspeak flash component (from http://www.aspnetflash.com/) to communicate with my webpage, which it is doing... except after the postback event is fired to call the C# function ive set the page reloads, which i dont want (i know thats what postback is, but im just hoping there is another way to call a function without using the postback method)

what my problem is, im trying to create a live streaming flash application, that when the users press "start streaming" to the rtmp server it will trigger a function on my asp page which will in turn take a snapshot of the first frame of the streaming flv file using ffmpeg.

ASP.net Code:

protected void Flash1_ActionScriptEvent(object sender, ASPNetFlash.ActionScriptEventArgs e)
{
filename = e.EventArgument;
CaptureScreenshot();
}

it all works, the filename variable populates with what I called my flash filename in the program... but then after the capture screenshot code runs (it works too) it ends, and the page is refreshed, which reloads the swf file, ending my live stream publish and taking out all the filenames.

is there any other way which i may be able to trigger off a my CaptureScreenshot(); function in a web service or something from a button click in the actionscript? sorry if this is a stupid question, im very new to actionscript.

if anyone has any better ideas of how i could go about this, for eg using bitmap.draw(); or something along those lines feel free to post :) cos im very much a n00b at this stuff.

Thanks in advance,

mextest@gmail.com