[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/button_character_instanc...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/button_character_instanc... |
Date: |
Sat, 19 Apr 2008 00:56:25 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/04/19 00:56:24
Modified files:
. : ChangeLog
server : button_character_instance.cpp
button_character_instance.h
testsuite/misc-ming.all: ButtonEventsTest.c
Log message:
* server/button_character_instance.{cpp,h}:
Redesign buttons' "DisplayList" doing proper
load/unload and depth-shift. Execute statically-defined
button actions by pushing them on stack (movie_root
will take care of processing after event).
* testsuite/misc-ming.all/ButtonEventsTest.c:
No more failures in the test. Looking forward for
more tests :)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6327&r2=1.6328
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest.c?cvsroot=gnash&r1=1.16&r2=1.17
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6327
retrieving revision 1.6328
diff -u -b -r1.6327 -r1.6328
--- ChangeLog 18 Apr 2008 22:32:56 -0000 1.6327
+++ ChangeLog 19 Apr 2008 00:56:23 -0000 1.6328
@@ -1,5 +1,16 @@
2008-04-18 Sandro Santilli <address@hidden>
+ * server/button_character_instance.{cpp,h}:
+ Redesign buttons' "DisplayList" doing proper
+ load/unload and depth-shift. Execute statically-defined
+ button actions by pushing them on stack (movie_root
+ will take care of processing after event).
+ * testsuite/misc-ming.all/ButtonEventsTest.c:
+ No more failures in the test. Looking forward for
+ more tests :)
+
+2008-04-18 Sandro Santilli <address@hidden>
+
* testsuite/misc-ming.all/: ButtonEventsTest.c,
ButtonEventsTest-Runner.cpp: Add test for shape-sensible
hitTest agains containing mouse-grabbing sprite, add
Index: server/button_character_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- server/button_character_instance.cpp 18 Apr 2008 22:32:57 -0000
1.95
+++ server/button_character_instance.cpp 19 Apr 2008 00:56:24 -0000
1.96
@@ -365,15 +365,7 @@
void
button_character_instance::restart()
{
- set_invalidated();
- m_last_mouse_flags = IDLE;
- m_mouse_flags = IDLE;
- m_mouse_state = UP;
- size_t r, r_num = m_record_character.size();
- for (r = 0; r < r_num; r++)
- {
- m_record_character[r]->restart();
- }
+ log_error("button_character_instance::restart called, from whom??");
}
void
@@ -383,6 +375,10 @@
std::vector<character*> actChars;
get_active_characters(actChars);
+
+ //log_debug("At display time, button %s got %d currently active chars",
getTarget(), actChars.size());
+
+ // TODO: by keeping chars sorted by depth we'd avoid the sort on display
std::sort(actChars.begin(), actChars.end(), charDepthLessThen);
std::for_each(actChars.begin(), actChars.end(),
std::mem_fun(&character::display));
@@ -431,8 +427,7 @@
//-------------------------------------------------
// Find hit characters
- Chars hitChars;
- get_active_characters(hitChars, HIT);
+ const CharsVect& hitChars = getHitCharacters();
if ( hitChars.empty() ) return 0;
// point is in parent's space,
@@ -446,7 +441,7 @@
for (size_t i=0, e=hitChars.size(); i<e; ++i)
{
- character* ch = hitChars[i];
+ const character* ch = hitChars[i];
if ( ch->pointInVisibleShape(wp.x, wp.y) )
{
@@ -544,14 +539,15 @@
// From: "ActionScript - The Definiteve Guide" by Colin Moock
// (chapter 10: Events and Event Handlers)
-
+ //
// "Event-based code [..] is said to be executed asynchronously
// because the triggering of events can occur at arbitrary times."
+ //
+ // We'll push to the global list. The movie_root will process
+ // the action queue on mouse event.
+ //
- // Immediately execute all events actions (don't append to
- // parent's action buffer for later execution!)
-
- ButtonActionExecutor xec(get_environment());
+ ButtonActionPusher xec(getVM().getRoot(), this);
m_def->forEachTrigger(event, xec);
// check for built-in event handler.
@@ -575,90 +571,164 @@
}
void
-button_character_instance::get_active_characters(std::vector<character*>& list)
+button_character_instance::get_active_characters(std::vector<character*>&
list, bool includeUnloaded)
{
- get_active_characters(list, m_mouse_state);
+ list.clear();
+
+ for (size_t i=0,e=m_record_character.size(); i<e; ++i)
+ {
+ character* ch = m_record_character[i];
+ if (ch == NULL) continue;
+ if ( ! includeUnloaded && ch->isUnloaded() ) continue;
+ list.push_back(ch);
+ }
}
void
-button_character_instance::get_active_characters(std::vector<character*>& list,
- e_mouse_state state)
+button_character_instance::get_active_records(RecSet& list, e_mouse_state
state)
{
list.clear();
- for (size_t i = 0; i < m_def->m_button_records.size(); i++)
+ size_t nrecs = m_def->m_button_records.size();
+
+ //log_debug("%s.get_active_records(%s) - def has %d records",
getTarget(), mouseStateName(state), m_def->m_button_records.size());
+ for (size_t i=0; i<nrecs; ++i)
{
button_record& rec = m_def->m_button_records[i];
- assert(m_record_character.size() > i);
- if (m_record_character[i] == NULL)
- {
- continue;
- }
+ //log_debug(" rec %d has hit:%d down:%d over:%d up:%d", i,
rec.m_hit_test, rec.m_down, rec.m_over, rec.m_up);
+
if ((state == UP && rec.m_up)
|| (state == DOWN && rec.m_down)
|| (state == OVER && rec.m_over)
|| (state == HIT && rec.m_hit_test))
{
- list.push_back(m_record_character[i].get());
+ list.insert(i);
+ }
}
- } // for button record
}
+#ifdef GNASH_DEBUG_BUTTON_DISPLAYLIST
+static void dump(std::vector< character* >& chars, std::stringstream& ss)
+{
+ for (size_t i=0, e=chars.size(); i<e; ++i)
+ {
+ ss << "Record" << i << ": ";
+ character* ch = chars[i];
+ if ( ! ch ) ss << "NULL.";
+ else
+ {
+ ss << ch->getTarget() << " (depth:" <<
ch->get_depth()-character::staticDepthOffset-1 << " unloaded:" <<
ch->isUnloaded() << " destroyed:" << ch->isDestroyed() << ")";
+ }
+ ss << std::endl;
+ }
+}
+#endif
+
void
button_character_instance::set_current_state(e_mouse_state new_state)
{
if (new_state == m_mouse_state)
return;
- typedef std::vector<character*> CharVect;
+ //set_invalidated(); // TODO: optimize
- // save current "display list"
- CharVect old_list;
- get_active_characters(old_list, m_mouse_state);
-
- // load new "display list"
- // NOTE: We don't change state yet, so that set_invalidated() can
- // load the current bounds first.
- CharVect new_list;
- get_active_characters(new_list, new_state);
-
- size_t old_count = old_list.size();
- size_t new_count = new_list.size();
-
- // If the old and new lists have different size,
- // then something obviously changed.
- // (effective equality check done in next loop)
- //
- if (new_count != old_count) set_invalidated();
+#ifdef GNASH_DEBUG_BUTTON_DISPLAYLIST
+ std::stringstream ss;
+ ss << "at set_current_state enter: " << std::endl;
+ dump(m_record_character, ss);
+ log_debug("%s", ss.str());
+#endif
- // Otherwise, something changed if any character
- // in the new set was not in the old one.
- //
- // In this case, we also restart the new character
- // so it looks like we just placed it.
- //
- for (size_t i=0; i<new_count; i++)
+ // Get new state records
+ RecSet newChars;
+ get_active_records(newChars, new_state);
+
+ // For each possible record, check if it should still be there
+ for (size_t i=0, e=m_record_character.size(); i<e; ++i)
{
- bool found=false;
- character* newch = new_list[i];
- for (size_t j=0; j<old_count; j++)
+ character* oldch = m_record_character[i];
+ bool shouldBeThere = ( newChars.find(i) != newChars.end() );
+
+ if ( ! shouldBeThere )
{
- character* oldch = old_list[j];
- if (newch == oldch)
+ // is there, but is unloaded: destroy, clear slot and
go on
+ if ( oldch && oldch->isUnloaded() )
{
- found=true;
- break;
+ if ( ! oldch->isDestroyed() ) oldch->destroy();
+ m_record_character[i] = NULL;
+ oldch = NULL;
}
+
+ if ( oldch ) // the one we have should not be there...
unload!
+ {
+ set_invalidated();
+
+ if ( ! oldch->unload() )
+ {
+ // No onUnload handler: destroy and
clear slot
+ if ( ! oldch->isDestroyed() )
oldch->destroy();
+ m_record_character[i] = NULL;
}
- if (!found)
+ else
{
- // character (re-)appeared on stage -> restart!
- set_invalidated(); // note that restart() below will
trigger set_invalidated() too
- newch->restart();
+ // onUnload handler: shift depth and
keep slot
+ int oldDepth = oldch->get_depth();
+ int newDepth =
character::removedDepthOffset - oldDepth;
+#ifdef GNASH_DEBUG_BUTTON_DISPLAYLIST
+ log_debug("Removed button record
shifted from depth %d to depth %d", oldDepth, newDepth);
+#endif
+ oldch->set_depth(newDepth);
+ }
+ }
}
+ else // should be there
+ {
+ // Is there already, but is unloaded: destroy and
consider as gone
+ if ( oldch && oldch->isUnloaded() )
+ {
+ if ( ! oldch->isDestroyed() ) oldch->destroy();
+ m_record_character[i] = NULL;
+ oldch = NULL;
}
- // effectively change state
+ if ( ! oldch )
+ {
+ // Not there, instantiate
+ button_record& bdef =
m_def->m_button_records[i];
+
+ const matrix& mat = bdef.m_button_matrix;
+ const cxform& cx = bdef.m_button_cxform;
+ int ch_depth =
bdef.m_button_layer+character::staticDepthOffset+1;
+ int ch_id = bdef.m_character_id;
+
+ character* ch =
bdef.m_character_def->create_character_instance(this, ch_id);
+ ch->set_matrix(mat);
+ ch->set_cxform(cx);
+ ch->set_depth(ch_depth);
+ assert(ch->get_parent() == this);
+ assert(ch->get_name().empty()); // no way to
specify a name for button chars anyway...
+
+ if ( ch->wantsInstanceName() )
+ {
+ //std::string instance_name =
getNextUnnamedInstanceName();
+
ch->set_name(getNextUnnamedInstanceName());
+ }
+
+ m_record_character[i] = ch;
+ ch->stagePlacementCallback(); // give this
character a life
+
+ }
+ }
+ }
+
+#ifdef GNASH_DEBUG_BUTTON_DISPLAYLIST
+ ss.str("");
+ ss << "at set_current_state end: " << std::endl;
+ dump(m_record_character, ss);
+ log_debug("%s", ss.str());
+#endif
+
+ // Remember current state
m_mouse_state=new_state;
}
@@ -741,10 +811,17 @@
character *
button_character_instance::getChildByName(const std::string& name) const
{
- // See if we have a match on the button records list
- for (size_t i=0, n=m_record_character.size(); i<n; ++i)
+ // Get all currently active characters, including unloaded
+ CharsVect actChars;
+ // TODO: fix the const_cast
+
const_cast<button_character_instance*>(this)->get_active_characters(actChars,
true);
+
+ // Lower depth first for duplicated names, so we sort
+ std::sort(actChars.begin(), actChars.end(), charDepthLessThen);
+
+ for (CharsVect::iterator i=actChars.begin(), e=actChars.end(); i!=e;
++i)
{
- character* child = m_record_character[i].get();
+ character* child = *i;
const char* pat_c = child->get_name().c_str();
const char* nam_c = name.c_str();
@@ -770,19 +847,50 @@
// do we need this???
//_vm.getRoot().addLiveChar(this);
- size_t r, r_num = m_def->m_button_records.size();
- m_record_character.resize(r_num);
+ // Instantiate the hit characters
+ RecSet hitChars;
+ get_active_records(hitChars, HIT);
+ for (RecSet::iterator i=hitChars.begin(),e=hitChars.end(); i!=e; ++i)
+ {
+ button_record& bdef = m_def->m_button_records[*i];
+
+ const matrix& mat = bdef.m_button_matrix;
+ const cxform& cx = bdef.m_button_cxform;
+ int ch_depth =
bdef.m_button_layer+character::staticDepthOffset+1;
+ int ch_id = bdef.m_character_id;
- for (r = 0; r < r_num; r++)
+ character* ch =
bdef.m_character_def->create_character_instance(this, ch_id);
+ ch->set_matrix(mat);
+ ch->set_cxform(cx); // TODO: who cares about color ?
+ ch->set_depth(ch_depth); // TODO: check if we care about depth,
and why ...
+ assert(ch->get_parent() == this);
+ assert(ch->get_name().empty()); // no way to specify a name for
button chars anyway...
+
+ _hitCharacters.push_back(ch);
+ }
+
+ // Setup the state characters container
+ // It will have a slot for each character record.
+ // Some slots will probably be never used (consider HIT-only records)
+ // but for now this direct corrispondence between record number
+ // and active character will be handy.
+ m_record_character.resize(m_def->m_button_records.size());
+
+ // Instantiate the default state characters
+ RecSet upChars;
+ get_active_records(upChars, UP);
+ log_debug("At StagePlacementCallback, button %s got %d active chars for
state UP", getTarget(), upChars.size());
+ for (RecSet::iterator i=upChars.begin(),e=upChars.end(); i!=e; ++i)
{
- button_record& bdef = m_def->m_button_records[r];
+ int rno = *i;
+ button_record& bdef = m_def->m_button_records[rno];
const matrix& mat = bdef.m_button_matrix;
const cxform& cx = bdef.m_button_cxform;
- int ch_depth = bdef.m_button_layer+character::staticDepthOffset;
+ int ch_depth =
bdef.m_button_layer+character::staticDepthOffset+1;
int ch_id = bdef.m_character_id;
- boost::intrusive_ptr<character> ch =
bdef.m_character_def->create_character_instance(this, ch_id);
+ character* ch =
bdef.m_character_def->create_character_instance(this, ch_id);
ch->set_matrix(mat);
ch->set_cxform(cx);
ch->set_depth(ch_depth);
@@ -795,10 +903,8 @@
ch->set_name(getNextUnnamedInstanceName());
}
- m_record_character[r] = ch;
-
- ch->stagePlacementCallback(); // give this character life
(TODO: they aren't on stage, are them ?)
- //log_debug("Character %d of Button %s, with target %s got a
life", r, getTarget(), ch->getTarget());
+ m_record_character[rno] = ch;
+ ch->stagePlacementCallback(); // give this character a life
}
// there's no INITIALIZE/CONSTRUCT/LOAD/ENTERFRAME/UNLOAD events for
buttons
@@ -812,11 +918,21 @@
m_def->setReachable();
- // Markstate characters as reachable
+ // Mark state characters as reachable
for (CharsVect::const_iterator i=m_record_character.begin(),
e=m_record_character.end();
i!=e; ++i)
{
- (*i)->setReachable();
+ character* ch = *i;
+ if ( ch ) ch->setReachable();
+ }
+
+ // Mark hit characters as reachable
+ for (CharsVect::const_iterator i=_hitCharacters.begin(),
e=_hitCharacters.end();
+ i!=e; ++i)
+ {
+ character* ch = *i;
+ assert ( ch );
+ ch->setReachable();
}
// character class members
@@ -833,11 +949,15 @@
//std::for_each(m_record_character.begin(), m_record_character.end(),
boost::bind(&character::unload, _1));
for (CharsVect::iterator i=m_record_character.begin(),
e=m_record_character.end(); i!=e; ++i)
{
- boost::intrusive_ptr<character> ch = *i;
+ character* ch = *i;
+ if ( ! ch ) continue;
+ if ( ch->isUnloaded() ) continue;
if ( ch->unload() ) childsHaveUnload = true;
//log_debug("Button child %s (%s) unloaded",
ch->getTarget().c_str(), typeName(*ch).c_str());
}
+ _hitCharacters.clear();
+
bool hasUnloadEvent = character::unload();
return hasUnloadEvent || childsHaveUnload;
@@ -993,7 +1113,7 @@
std::ostringstream os;
std::vector<character*> actChars;
- get_active_characters(actChars);
+ get_active_characters(actChars, true);
std::sort(actChars.begin(), actChars.end(), charDepthLessThen);
os << actChars.size() << " active characters for state " <<
mouseStateName(m_mouse_state);
Index: server/button_character_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- server/button_character_instance.h 16 Apr 2008 21:12:51 -0000 1.37
+++ server/button_character_instance.h 19 Apr 2008 00:56:24 -0000 1.38
@@ -24,6 +24,9 @@
#include "character.h" // for inheritance
+#include <vector>
+#include <set>
+
namespace gnash {
// Forward declarations
@@ -43,9 +46,8 @@
public:
button_character_definition* m_def;
- typedef std::vector< boost::intrusive_ptr<character> > CharsVect;
-
- CharsVect m_record_character;
+ typedef std::vector< character* > CharsVect;
+ typedef std::set<int> RecSet;
enum mouse_flags
{
@@ -92,28 +94,6 @@
void set_current_state(e_mouse_state new_state);
- /// Returns all characters that are active based on the current state.
- //
- /// The "_visible" property does not matter here.
- ///
- /// @param list
- /// The vector to push active characters into
- ///
- void get_active_characters(std::vector<character*>& list);
-
- /// Returns all characters that should be active on the given state.
- //
- /// The "_visible" property does not matter here.
- ///
- /// @param list
- /// The vector to push active characters into
- ///
- /// @param state
- /// The state we're interested in
- ///
- void get_active_characters(std::vector<character*>& list, e_mouse_state
state);
-
-
/// Combine the flags to avoid a conditional.
// It would be faster with a macro.
inline int transition(int a, int b) const
@@ -181,12 +161,44 @@
/// These are:
/// - this char's definition (m_def)
/// - the vector of state characters (m_record_character)
+ /// - the vector of hit characters (m_record_character)
///
void markReachableResources() const;
#endif // GNASH_USE_GC
private:
+ CharsVect m_record_character;
+
+ CharsVect _hitCharacters;
+
+ /// Returns all characters that are active based on the current state.
+ //
+ /// The "_visible" property does not matter here.
+ ///
+ /// @param list
+ /// The vector to push active characters into
+ ///
+ /// @param includeUnloaded
+ /// If true, include unloaded but still reachable chars in the
records slot.
+ ///
+ void get_active_characters(std::vector<character*>& list, bool
includeUnloaded=false);
+
+ /// Returns all characters (record nums) that should be active on the
given state.
+ //
+ /// @param list
+ /// The set to push active characters record number into
+ ///
+ /// @param state
+ /// The state we're interested in
+ ///
+ void get_active_records(RecSet& list, e_mouse_state state);
+
+ const CharsVect& getHitCharacters() const
+ {
+ return _hitCharacters;
+ }
+
/// Return any state character whose name matches the given string
//
Index: testsuite/misc-ming.all/ButtonEventsTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- testsuite/misc-ming.all/ButtonEventsTest.c 18 Apr 2008 22:32:57 -0000
1.16
+++ testsuite/misc-ming.all/ButtonEventsTest.c 19 Apr 2008 00:56:24 -0000
1.17
@@ -134,10 +134,10 @@
"var myName = ''+this;"
"if ( _root.buttonChild[myDepth] == undefined )
_root.buttonChild[myDepth] = {nam:myName,exe:1,uld:0};"
"else _root.buttonChild[myDepth]['exe']++;"
- /* "_root.note('Actions in frame0 of '+this+' at depth
'+myDepth+' executed.');" */
+ "_root.note('Actions in frame0 of '+this+' at depth
'+myDepth+' executed.');"
"this.onUnload = function() {"
" var myDepth = -(getDepth()+32769-16383);"
- /*" _root.note(''+this+' at depth '+myDepth+'
unloaded.');"*/
+ " _root.note(''+this+' at depth '+myDepth+'
unloaded.');"
" _root.buttonChild[myDepth]['uld']++;"
"};"
//"_root.note('buttonChilds:'+dumpObj(_root.buttonChild));"
@@ -223,20 +223,20 @@
/* "_root.note('buttonChild is '+dumpObj(_root.buttonChild));"
*/
/* added OVER state char */
- " _root.xcheck_equals(_root.buttonChild.realLength(), 3);"
+ " _root.check_equals(_root.buttonChild.realLength(), 3);"
/* OVER state char loaded */
" _root.check_equals(typeof(_root.buttonChild[13]),
'object');"
- " _root.xcheck_equals(_root.buttonChild[13].nam,
'_level0.square1.button.instance7');"
+ " _root.check_equals(_root.buttonChild[13].nam,
'_level0.square1.button.instance7');"
" _root.check_equals(_root.buttonChild[13].exe, 1);" /*
OVER state char */
" _root.check_equals(_root.buttonChild[13].uld, 0);" /*
OVER state char */
/* UP state char unloaded */
" _root.check_equals(_root.buttonChild[12].exe, 1);"
- " _root.xcheck_equals(_root.buttonChild[12].uld, 1);"
+ " _root.check_equals(_root.buttonChild[12].uld, 1);"
"
_root.check_equals(typeof(_level0.square1.button.instance6), 'movieclip');"
"
_root.check_equals(_level0.square1.button.instance6._name, 'instance6');"
- "
_root.xcheck_equals(_level0.square1.button.instance6.getDepth(), -16398);"
+ "
_root.check_equals(_level0.square1.button.instance6.getDepth(), -16398);"
/* ALL state char still there, not reloaded, not unloaded */
" _root.check_equals(_root.buttonChild[10].exe, 1);"
@@ -269,17 +269,17 @@
"if ( _root.testno == 2 ) {" /* ONLY CHECK buttonChild on first
frame */
/* Added DOWN state char */
- " _root.xcheck_equals(_root.buttonChild.realLength(), 4);"
+ " _root.check_equals(_root.buttonChild.realLength(), 4);"
/* DOWN state char loaded */
- " _root.xcheck_equals(typeof(_root.buttonChild[14]),
'object');"
- " _root.xcheck_equals(_root.buttonChild[14].nam,
'_level0.square1.button.instance8');"
- " _root.xcheck_equals(_root.buttonChild[14].exe, 1);"
- " _root.xcheck_equals(_root.buttonChild[14].uld, 0);"
+ " _root.check_equals(typeof(_root.buttonChild[14]),
'object');"
+ " _root.check_equals(_root.buttonChild[14].nam,
'_level0.square1.button.instance8');"
+ " _root.check_equals(_root.buttonChild[14].exe, 1);"
+ " _root.check_equals(_root.buttonChild[14].uld, 0);"
/* OVER state char unloaded */
" _root.check_equals(_root.buttonChild[13].exe, 1);"
- " _root.xcheck_equals(_root.buttonChild[13].uld, 1);"
+ " _root.check_equals(_root.buttonChild[13].uld, 1);"
/* ALL state char still there, not reloaded, not unloaded */
" _root.check_equals(_root.buttonChild[10].exe, 1);"
@@ -556,27 +556,27 @@
/* buttonChild was initialized with 2 elements */
check_equals(mo, "typeof(_root.buttonChild)", "'object'");
check(mo, "_root.buttonChild instanceof Array");
- xcheck_equals(mo, "_root.buttonChild.realLength()", "2"); /* UP and ALL
states */
+ check_equals(mo, "_root.buttonChild.realLength()", "2"); /* UP and ALL
states */
/* sprite for ALL states */
check_equals(mo, "typeof(_root.buttonChild[10])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
+ check_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
check_equals(mo, "(_root.buttonChild[10].exe)", "1");
check_equals(mo, "(_root.buttonChild[10].uld)", "0");
/* sprite for UP state */
check_equals(mo, "typeof(_root.buttonChild[12])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
+ check_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
check_equals(mo, "(_root.buttonChild[12].exe)", "1");
check_equals(mo, "(_root.buttonChild[12].uld)", "0");
check_equals(mo, "_level0.square1.button.instance6._name",
"'instance6'");
- xcheck_equals(mo, "_level0.square1.button.instance6.getDepth()",
"-16371");
+ check_equals(mo, "_level0.square1.button.instance6.getDepth()",
"-16371");
/* sprite for HIT state not constructed */
- xcheck_equals(mo, "typeof(_root.buttonChild[11])", "'undefined'");
+ check_equals(mo, "typeof(_root.buttonChild[11])", "'undefined'");
/* sprite for DOWN state not constructed */
- xcheck_equals(mo, "typeof(_root.buttonChild[13])", "'undefined'");
+ check_equals(mo, "typeof(_root.buttonChild[13])", "'undefined'");
add_actions(mo,
"stop();"
@@ -626,34 +626,34 @@
/* buttonChild should now have a total of 4 elements (UP,DOWN,
OVER and ALL states) */
check_equals(mo, "typeof(_root.buttonChild)", "'object'");
check(mo, "_root.buttonChild instanceof Array");
- xcheck_equals(mo, "_root.buttonChild.realLength()", "4");
+ check_equals(mo, "_root.buttonChild.realLength()", "4");
/* sprite for ALL states */
check_equals(mo, "typeof(_root.buttonChild[10])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
+ check_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
check_equals(mo, "(_root.buttonChild[10].exe)", "1");
check_equals(mo, "(_root.buttonChild[10].uld)", "0");
/* sprite for UP state */
check_equals(mo, "typeof(_root.buttonChild[12])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
- xcheck_equals(mo, "(_root.buttonChild[12].exe)", "3");
- xcheck_equals(mo, "(_root.buttonChild[12].uld)", "2");
+ check_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
+ check_equals(mo, "(_root.buttonChild[12].exe)", "3");
+ check_equals(mo, "(_root.buttonChild[12].uld)", "2");
/* sprite for OVER state */
check_equals(mo, "typeof(_root.buttonChild[13])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[13].nam)",
"'_level0.square1.button.instance7'");
- xcheck_equals(mo, "(_root.buttonChild[13].exe)", "4");
- xcheck_equals(mo, "(_root.buttonChild[13].uld)", "4");
+ check_equals(mo, "(_root.buttonChild[13].nam)",
"'_level0.square1.button.instance7'");
+ check_equals(mo, "(_root.buttonChild[13].exe)", "4");
+ check_equals(mo, "(_root.buttonChild[13].uld)", "4");
/* sprite for DOWN state */
- xcheck_equals(mo, "typeof(_root.buttonChild[14])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[14].nam)",
"'_level0.square1.button.instance8'");
- xcheck_equals(mo, "(_root.buttonChild[14].exe)", "2");
- xcheck_equals(mo, "(_root.buttonChild[14].uld)", "2");
+ check_equals(mo, "typeof(_root.buttonChild[14])", "'object'");
+ check_equals(mo, "(_root.buttonChild[14].nam)",
"'_level0.square1.button.instance8'");
+ check_equals(mo, "(_root.buttonChild[14].exe)", "2");
+ check_equals(mo, "(_root.buttonChild[14].uld)", "2");
/* sprite for HIT state never constructed */
- xcheck_equals(mo, "typeof(_root.buttonChild[11])",
"'undefined'");
+ check_equals(mo, "typeof(_root.buttonChild[11])",
"'undefined'");
@@ -682,34 +682,34 @@
/* buttonChild should now have a total of 4 elements (UP,DOWN,
OVER and ALL states) */
check_equals(mo, "typeof(_root.buttonChild)", "'object'");
check(mo, "_root.buttonChild instanceof Array");
- xcheck_equals(mo, "_root.buttonChild.realLength()", "4");
+ check_equals(mo, "_root.buttonChild.realLength()", "4");
/* sprite for ALL states */
check_equals(mo, "typeof(_root.buttonChild[10])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
+ check_equals(mo, "(_root.buttonChild[10].nam)",
"'_level0.square1.button.instance5'");
check_equals(mo, "(_root.buttonChild[10].exe)", "1");
check_equals(mo, "(_root.buttonChild[10].uld)", "0");
/* sprite for UP state */
check_equals(mo, "typeof(_root.buttonChild[12])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
- xcheck_equals(mo, "(_root.buttonChild[12].exe)", "5");
- xcheck_equals(mo, "(_root.buttonChild[12].uld)", "4");
+ check_equals(mo, "(_root.buttonChild[12].nam)",
"'_level0.square1.button.instance6'");
+ check_equals(mo, "(_root.buttonChild[12].exe)", "5");
+ check_equals(mo, "(_root.buttonChild[12].uld)", "4");
/* sprite for OVER state */
check_equals(mo, "typeof(_root.buttonChild[13])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[13].nam)",
"'_level0.square1.button.instance7'");
- xcheck_equals(mo, "(_root.buttonChild[13].exe)", "8");
- xcheck_equals(mo, "(_root.buttonChild[13].uld)", "8");
+ check_equals(mo, "(_root.buttonChild[13].nam)",
"'_level0.square1.button.instance7'");
+ check_equals(mo, "(_root.buttonChild[13].exe)", "8");
+ check_equals(mo, "(_root.buttonChild[13].uld)", "8");
/* sprite for DOWN state */
- xcheck_equals(mo, "typeof(_root.buttonChild[14])", "'object'");
- xcheck_equals(mo, "(_root.buttonChild[14].nam)",
"'_level0.square1.button.instance8'");
- xcheck_equals(mo, "(_root.buttonChild[14].exe)", "4");
- xcheck_equals(mo, "(_root.buttonChild[14].uld)", "4");
+ check_equals(mo, "typeof(_root.buttonChild[14])", "'object'");
+ check_equals(mo, "(_root.buttonChild[14].nam)",
"'_level0.square1.button.instance8'");
+ check_equals(mo, "(_root.buttonChild[14].exe)", "4");
+ check_equals(mo, "(_root.buttonChild[14].uld)", "4");
/* sprite for HIT state never constructed */
- xcheck_equals(mo, "typeof(_root.buttonChild[11])",
"'undefined'");
+ check_equals(mo, "typeof(_root.buttonChild[11])",
"'undefined'");
add_actions(mo,
"stop();"
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/12
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/15
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/15
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/15
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/16
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/18
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/18
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/18
- [Gnash-commit] gnash ChangeLog server/button_character_instanc...,
Sandro Santilli <=
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/19
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/19
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/22
- [Gnash-commit] gnash ChangeLog server/button_character_instanc..., Sandro Santilli, 2008/04/22