gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Showing a message when Gnash is asked to render AVM2?


From: Petter Reinholdtsen
Subject: [Gnash-dev] Showing a message when Gnash is asked to render AVM2?
Date: Fri, 26 Nov 2010 14:19:12 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

I would like Gnash to show a message in its window (no popup) when it
is asked to render an AVM2 flash file, explaining that AVM2 is not
supported and perhaps ask for donations or something to fund work on
AVM2.

I am not quite sure how to do this, but one of the best ideas so far
was to replace the flash movie with one displaying this message, when
AVM2 is discovered.

I believe I have found a sensible place to put the test and the code
to replace the flash movie being displayed, but have not had time to
figure out how to replace the flash movie.

This is far as far as I got:

diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 95a6fb0..259cac8 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -948,6 +948,15 @@ movie_root::display()

     clearInvalidated();

+    const movie_definition* def = _rootMovie->definition();
+    assert(def);
+    if (def->isAS3()) {
+        printf("this flash contain AVM2 content, and might not work well with 
Gnash\n");
+// Movie *movie = MovieFactory::makeMovie()
+// movie_root::setRootMovie(Movie* movie)
+    }
+
+
     // TODO: should we consider the union of all levels bounds ?
     const SWFRect& frame_size = _rootMovie->get_frame_size();
     if ( frame_size.is_null() )

It this a sensible place to do it?  Can the _rootMovie object be
replaced at this point with a different flash movie?

I do not know how to make the replacement flash movie, but hope
someone of you might know this. :) For testing, I plan to just use a
random flash file I find lying around.

Happy hacking,
-- 
Petter Reinholdtsen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]