gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server/swf ASHandlers.cpp


From: Vitaly Alexeev
Subject: [Gnash-commit] gnash/server/swf ASHandlers.cpp
Date: Sat, 27 May 2006 18:23:12 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         
Changes by:     Vitaly Alexeev <address@hidden> 06/05/27 18:23:12

Modified files:
        server/swf     : ASHandlers.cpp 

Log message:
        added stopAllSounds

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/swf/ASHandlers.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gnash/server/swf/ASHandlers.cpp
diff -u gnash/server/swf/ASHandlers.cpp:1.4 gnash/server/swf/ASHandlers.cpp:1.5
--- gnash/server/swf/ASHandlers.cpp:1.4 Thu May 25 12:22:01 2006
+++ gnash/server/swf/ASHandlers.cpp     Sat May 27 18:23:12 2006
@@ -414,9 +414,12 @@
 bool
 SWFHandlers::ActionStopSounds(as_environment &env)
 {
-//    GNASH_REPORT_FUNCTION;
-    dbglogfile << __PRETTY_FUNCTION__ << ": unimplemented!" << endl;
-    return false;
+       sound_handler* s = get_sound_handler();
+       if (s != NULL)
+       {
+               s->stop_all_sounds();
+       }
+       return true;
 }
 
 bool
@@ -978,8 +981,10 @@
 bool
 SWFHandlers::ActionDeleteVar(as_environment &env)
 {
-//    GNASH_REPORT_FUNCTION;
-    dbglogfile << __PRETTY_FUNCTION__ << ": unimplemented!" << endl;
+
+//             as_value var = env.pop();
+//    as_value obj = env.top(0);
+//             env.top(0).set_bool(false);
     return false;
 }
 
@@ -990,15 +995,13 @@
     as_value var = env.top(0);
     std::vector<with_stack_entry> with_stack;
     
-    as_value oldval = env.get_variable_raw(var.to_tu_string(),
-                                           with_stack);
+    as_value oldval = env.get_variable_raw(var.to_tu_string(), with_stack);
     
     if (!oldval.get_type() == as_value::UNDEFINED) {
         // set variable to 'undefined'
         // that hopefully --ref_count and eventually
         // release memory. 
-        env.set_variable_raw(var.to_tu_string(),
-                             as_value(), with_stack);
+        env.set_variable_raw(var.to_tu_string(), as_value(), with_stack);
         env.top(0).set_bool(true);
     } else {
         env.top(0).set_bool(false);




reply via email to

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