Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tibberous

  1. End your script with: @unlink($PHP_SELF);
  2. function easeTo (startingX, startingY, endingX, endingY, frame, framesTotal, ease){ if(ease > 0) ease = 1 + (ease / 100); else if(ease < 0) ease = 1 + (ease / 200); else ease = 1; currentX = startingX - ( (startingX - endingX) * Math.pow( (frame/framesTotal) , ease) ); currentY = startingY - ( (startingY - endingY) * Math.pow( (frame/framesTotal) , ease) ); return Array(currentX, currentY); }
  3. <script> colors = new Array('black', 'red', 'green'); function annoyingEffect(tic){ tic %= colors.length; document.bgColor = colors[tic]; setTimeout("annoyingEffect("+(tic+1)+")", 2000); } </script> <body onload="annoyingEffect(0)"> </body>
  4. if(!$_FILES['_image']) return "Error encoding file"; $name = explode('.', $_FILES["_image"]["name"]); $ext = $name[count($name)-1]; $ext = strtolower($ext); if($ext == "jpeg") $ext == "jpg"; if($ext != "jpg" && $ext != "png" && $ext != "gif") return "Invalid filetype.";
  5. Here, I'll help: function ease (startingX, startingY, endingX, endingY, frame, framesTotal, ease){ currentX = startingX - ( (startingX - endingX) * (frame/framesTotal) ); currentY = startingY - ( (startingY - endingY) * (frame/framesTotal) ); return Array(currentX, currentY); } That works so long as ease is 0. Can someone tell me how to add easing?
  6. Here is the header. function ease (startingX, startingY, endingX, endingY, frame, framesTotal, ease){ return Array(currentX, currentY); } Basically it takes 2 sets of points, the starting location of an object and the ending location. It returns the location the object would be at at frame, provided there are framesTotal total frames. Ease simulates easing in or out, causing the object to move slower at the beginning or the end of the function. Anyone know how to write this? I used to know but I forget.
  7. Yep. <object><embed src="filename.swf" type="application/x-shockwave-flash"><param name="movie" value="filename.swf" /></object>
  8. Try this: $size = ( $size > 1024 ? round($size/1024, 2) . "mb" : $size."kb");
  9. You don't have to have a php.ini file. I'm not sure of winnt but with XP you have to start by moving the php.ini to the %systemroot%. Worst case, just run a file search for PHP.ini.
  10. $arr[0][0]='apple'; $arr[0][1]='24'; $arr[1][0]='orange'; $arr[1][1]='2'; $arr[2][0]='banana'; $arr[2][1]='3451'; function compare($ar1, $ar2){ return ($ar1[1] > $ar2[1]); } uksort($arr, "compare"); foreach($arr as $sub){ echo "$sub[0], $sub[1]<br>"; } What is that, your homework problem?
  11. I'd load up the page and 'view source' on it, make sure all the embed / object code is right and that the src path is correct. If everything looks right, try hard coding the src path and see if that helps.
  12. Also, the ` around the databases are not necessary.
  13. He might have magic quotes on his server. If you do that and he does have magic quotes you'll screw up the data. if(!get_magic_quotes_gpc()){ foreach($_POST as $key => $value){ if(gettype($value) == "array") foreach($value as $k => $v){ $varvar = $k; $$varvar = $v; } $varvar = $key; $$varvar = addslashes($value); } } That code will fix you. Make sure you do it for _GET too, or just turn magic quotes on. I can't stand to program without magic quotes, or with register globals off, so I have a page that emulates turning them on. It also connects to the database. If your going to write a lot of code I'd recommend getting one of these, otherwise you'll have to type a lot of useless shit over and over.
  14. Yeah, I made it 5000. I tried switching it to a table, that didn't help either. It works pretty good except for ebay, I'm just trying to get all the bugs worked out.
  15. Whats the error your getting? We can't run it without the database.
  16. I don't think so, it's actually I am trying to overlay the Flash on. If it is layers, what would a good work around be?
  17. I am trying to use absolute positioning to lay Flash over an existing site. IE does it right, Flash displays it right but doesn't give me the event area I should have (ie: I can't click part of my ad). Right now I am using an absolutely positioned div with the embed / object inside it. I tried setting the z-index. Thanks
  18. I am trying to be able to open a new window without it getting popup killed. If I use <a href="" target="blank"> it works fine, but I want to be able to resize the window after. Is there some way I can refer to it in javascript?
  19. Not sure I get you. You have a table with 9 cells. And the cells have onclick events. Do you got any code so far?
  20. I don't think so. You might be able to keep a page up-to-date with sockets and ajax though.
  21. Here it is written using eval. <?php $test1 = "=)"; $test2 = ""; $test3 = ""; $test4 = ":|"; $test5 = ":/"; if( ($face = intval($face)) >= 1 && ($face = intval($face)) <= 5){ eval("\$x = \$test$face;"); $myvalue = $x; echo "<div><b>$myvalue</b></div>"; } ?><form action="<?php echo $PHP_SELF; ?>" method="get"> <div>Enter 1-5 <input type="text" name="face"></div> <div><input type="submit" value="Get my Face!"></div> </form>
  22. <?php $test1 = "=)"; $test2 = ""; $test3 = ""; $test4 = ":|"; $test5 = ":/"; if( ($face = intval($face)) >= 1 && ($face = intval($face)) <= 5){ $myvar = "test$face"; $myvalue = $$myvar; echo "<div><b>$myvalue</b></div>"; } ?><form action="<?php echo $PHP_SELF; ?>" method="get"> <div>Enter 1-5 <input type="text" name="face"></div> <div><input type="submit" value="Get my Face!"></div> </form>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.