I have a couple errors to deal with in a script and this one is bugging me the most. Is something missing from this code? -----edit---- The error I get Fatal error: Call to a member function on a non-object in /home/user/public_html/videos/include/function.php on line 151 [code]function video_to_frame($fpath,$name,$mov,$chnl) { <----------------------------------------------------------------------line 151 global $config; $frcount=$mov->getFrameCount(); if ($frcount > 0) { $ff_frame[1]= $mov->getFrame(rand(3,$frcount)); $ff_frame[2]= $mov->getFrame(rand(5,$frcount)); $ff_frame[3]= $mov->getFrame(rand(7,$frcount)); for($i=1;$i<=3;$i++) { while (!$ff_frame[$i]) { $ff_frame[$i]= $mov->getFrame(rand((2*$i+1),$frcount)); } } } else { $ff_frame[1]= $mov->getFrame(rand(3,40)); $ff_frame[2]= $mov->getFrame(rand(5,40)); $ff_frame[3]= $mov->getFrame(rand(7,40)); for($i=1;$i<=3;$i++) { while (!$ff_frame[$i]) { $ff_frame[$i]= $mov->getFrame(rand((2*$i+1),$frcount)); } } }[/code] Thanks in advance. -Dave