Call to a member function on a non-object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Captain Dondo

    Call to a member function on a non-object

    Could someone please look at this code and tell me wht is going on?
    This program dies on the "****" line with:
    Fatal error: Call to a member function on a non-object in
    /www/cgi-bin/pivot.php on line 33

    But AFAICT it is absolutely identical to the shape that went before....

    What am I missing?

    $m = new SWFMovie();
    $m->setDimension(2 400,2400);
    $m->setBackground( 0, 0x66, 0x66);
    $m->setRate(24.0 );

    $hit = new SWFShape();
    // bug: have to declare all line styles before you use them
    $hit->setLine(40, 0x7f, 0x00, 0x00);
    $hit->setLine(40, 0x00, 0x66, 0x66);
    $hit->setLine(40, 0, 0x7f, 0);
    //$hit->setRightFill($ hit->addFill(0,0,0) );
    $hit->movePenTo(1200 ,1200);
    $hit->setLine(40, 0x7f, 0, 0);
    $hit->drawCircle(100 0);

    $ps = new SWFShape();
    $ps->movePenTo(0,0) ;
    $ps->setLine(40, 0x7f, 0, 0);
    $ps->drawLine(100 0, 0);

    $c1 = new SWFShape();
    $c1->movePenTo(250, 0);
    $cl->setLine(40, 0x7f, 0, 0);************ ************
    $c1->drawCircle(50) ;
  • s

    #2
    Re: Call to a member function on a non-object

    On Wed, 01 Mar 2006 17:03:51 -0800, Captain Dondo
    <yan@NsOeSiPnAe Mr.com> wrote:
    [color=blue]
    >Could someone please look at this code and tell me wht is going on?
    >This program dies on the "****" line with:
    >Fatal error: Call to a member function on a non-object in
    >/www/cgi-bin/pivot.php on line 33
    >
    >But AFAICT it is absolutely identical to the shape that went before....
    >
    >What am I missing?
    > [snip]
    > $c1 = new SWFShape();
    > $c1->movePenTo(250, 0);
    > $cl->setLine(40, 0x7f, 0, 0);************ ************
    > $c1->drawCircle(50) ;[/color]

    The object's name is $c1 (cee-one) but you've typo'd it as $cl
    (cee-ell).

    hth

    --
    <s@guerril.la.a pe> (to email, remove .ape)
    Apologies for the ad below.
    --

    *** Free account sponsored by SecureIX.com ***
    *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

    Comment

    • Captain Dondo

      #3
      Re: Call to a member function on a non-object

      s wrote:
      [color=blue]
      > The object's name is $c1 (cee-one) but you've typo'd it as $cl
      > (cee-ell).[/color]

      DUH!!!!!
      [color=blue]
      > hth[/color]

      Yes it did......

      Comment

      Working...