|
Help - extending SWFButton in php: msg#00027web.ming.general
Hi! Trying to extend the SWFButton class in php doesn't work as expected: <?php class A { function A() { echo "I am the constructor of A.<br>\n"; } function bTest() { echo "I am a regular function named bTest in class A.<br>\n"; } } class A_A extends A { function alpha($a){ echo("A_A: ".$a."<br>"); } } class B extends SWFButton { function C() { echo "I am a regular function.<br>\n"; } } $a = new A_A(); $a->alpha('hello'); $a->bTest(); $cm = get_class_methods ($a); $cName = get_class($a); foreach ($cm as $method){ echo($cName.'::'.$method."()<br>"); } $b = new B(); $cm = get_class_methods ($b); $cName = get_class($b); foreach ($cm as $method){ echo($cName.'::'.$method."()<br>"); } $b->C(); $down = new SWFShape; $b->setDown($down); ?> This produces the following result: I am the constructor of A. A_A: hello I am a regular function named bTest in class A. a_a::a() a_a::btest() a_a::alpha() a_a::a_a() swfbutton::swfbutton() swfbutton::sethit() swfbutton::setover() swfbutton::setup() swfbutton::setdown() swfbutton::setaction() swfbutton::addshape() swfbutton::setmenu() swfbutton::addaction() swfbutton::addsound() Fatal error: Call to undefined function: c() in e:\apache\apache\htdocs\php\classtest.php on line 43 I wonder why the ming classes don't accept an extension? Help, Axel |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | _root.onload?: 00027, Laurent Cocea |
|---|---|
| Next by Date: | (no subject): 00027, Laurent Cocea |
| Previous by Thread: | _root.onload?i: 00027, Laurent Cocea |
| Next by Thread: | (no subject): 00027, Laurent Cocea |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |