<?php if (is_uploaded_file($_FILES['Filedata']['tmp_name']) && ($_FILES['Filedata']['size'] < 60000)){ // warning, copying uploaded files to your web folder, may enable an attacker to compromise the // security of your website. // use this example entirely at your own risk. // no responsibility will be accepted for any use or misuse of this example file.
// check the uploaded file type is jpeg if ("image/jpeg" != mime_content_type($_FILES['Filedata']['tmp_name'])) { // we only allow jpg echo "Error: filetype not allowed"; } else { // file is allowed file type and is within allowed size. // leave it with the assigned temporary name and move to the upload folder. // in this way a potential attacker should not be able to overwrite existing web files. $uploadDirectory="upload/"; // the temporary name is something like /tmp/phpXXXXXX where XXXXXX is a random string // substr is used to remove the leading php from the name. $tmpbasename = substr(basename($_FILES['Filedata']['tmp_name']),3); $uploadFile=$uploadDirectory.$tmpbasename.".jpg"; // force jpg extension. // now copy the uploaded file to the web area. // only do this if you are 100% sure the file does not constitute a security risk. copy($_FILES['Filedata']['tmp_name'], $uploadFile); // note that // $_POST["title"] contains the user entered title and // $_POST["desc"] contains the user entered description // these post variables were defined using G_fr.postData in the swf file. // these items could be added to database entry for the uploaded file if desired. echo "OK: " . $uploadFile; } } else { // file too large or possibly dangerous file. echo "Error: file too large"; }?>
onSelfEvent (load) {
// number of images
numimages = 4;
// total width (not worked out yet)
total = 0;
// the image we are expanding (none yet)
expanding = Null;
// gap between images
gap = 10;
// approach factor (high will be slower expand/contract)
rate = 0.9;
}
onSelfEvent (enterFrame) {
// woth out total width if required
if (total == 0) {
// add up the widths
for (var i = 0; i < numimages; i++) {
image = this["image"+i];
var w = image.Mask.initw;
total += w;
}
}
// work out how big (percentage) we want the expanded image to be
// when fully expanded it will be 100%
var expandingw = 0;
if (expanding != Null) {
// approach 100%
expandingw = expanding.Mask.w;
expandingw = (expandingw-100)*rate+100;
if (expandingw > 100) {
expandingw = 100;
}
expanding.Mask.w = expandingw;
}
else {
// nothing being expanded
expandingw = 0;
}
var wanted = 0;
for (var i = 0; i < numimages; i++) {
var image = this["image"+i];
var w = image.Mask.w;
if (image != expanding) {
// we are not expanding this one, so shrink it toward small size
initw = image.Mask.initw;
w = (w-initw)*rate+initw;
if (w < initw) {
w = initw;
}
}
image.Mask.w = w;
wanted += w;
}
// wanted is now the sum of the sizes of images
// but they must add up to the total (so overall size stays the same)
// so work out a scale factor
var factor = (total-expandingw) / (wanted-expandingw);
// set the image sizes and positions to suit
var x = 0;
for (var i = 0; i < numimages; i++) {
var image = this["image"+i];
if (image == expanding) {
image.Mask._xscale = expandingw;
}
else {
image.Mask._xscale = factor*image.Mask.w;
}
image._x = x - (image._width - image.Mask._width)/2;
x += image.Mask._width;
x += gap;
}
}
onSelfEvent (load) { _vX = 40;
_vY = 0;
_vrotation = 90;
_fX = 5;
_frotation = 5;
}
onSelfEvent (enterFrame, includingFirstFrame) {
if (_x >= 160) {
_aY = 30;
_fX = 0;
_frotation = 0;
}
if (_x >= 380) {
_vX = 0;
_x = 380;
_vrotation = 0;
}
if (_y >= 300) {
_aY = 0;
_vY = 0;
_y = 300;
_fX = 20;
_frotation = 20;
}
}
حرکت توپ از روی سکو و سقوط آن بروی زمین، با رعایت شرایط فیزیک ماده. و محیط.
using code:
به تصویر ضمیمه شده توجه کنید،مرسی ازینکه مثالهارو با کدهاشون میزاری برای بچه ها چون کمک زیادی به یادگیری راحت تر داره براشون و اینکه کدهارو اینجا میزاری بیشتر کمک میکنه
به تصویر ضمیمه شده توجه کنید،
مشاهده پیوست 94272
تمامی فایلهایی که مربوط به سؤیش بوده و تا اینجا در پست ها معرفی گردیده اند،
از طرق نشان داده شده کدها قابل مشاهده بوده،
بررسی نمائید،
موفق باشید.
function init() { dotsArr = []; //clear array
pillsArr = []; //clear array
powerpill = false; //init var
if(currlevel == 1){gamelevels.gamelevel1()}; //check level
if(currlevel == 2){gamelevels.gamelevel2()};
if(currlevel == 3){gamelevels.gamelevel3()};
if(currlevel == 4){gamelevels.gamelevel4()};
if(currlevel == 5){gamelevels.gamelevel5()} ;
if(currlevel == 6){gamelevels.gamelevel6()} ;
if(currlevel == 7){gamelevels.gamelevel7()} ;
if(currlevel > 7){ //if all maps are done
gamelevels.gamelevel1(); //start again from 1
currlevel = 1
defspeed = pspeed = 4.8; //but a little faster
ghostspeed = 4;
};
}
//lets make some ghosts
function make_ghosts() {
t = 0;
_root.mapSize = _root.colums * (_root.offset *2); //(re)set mapsize according to # of colums
for (i= 0; i<= mapindex.length;i++) { //loop thru array
if(mapindex == 8){ //and check what number/ object
ghost.duplicateMovieClip("ghost"+ t, getNextHighestDepth());
mc = eval("ghost"+t);
mc.gpos = i; //set ghosts default position
mc.go_home = false; //has not been eaten yet
mc.gspeed = ghostspeed; //set speed
mc._x = (i % colums*24) plus offset; //position ghost
mc._y = (Math.floor(i/colums)*24) plus offset;
my_color = new Color(mc.body); //set color
my_color.setRGB(collsArr[t]);
mc.OC_getfreePos(); //now move it around
t++;
}
maxghosts = t -1; //set # of ghost
}
pacman.onEnterFrame = go_pacman; //run pacman
}
function go_pacman() {
for (i=0; i<dotsArr.length;i++) { //loop thru dotarray and check if eating dots
if (variable(dotsArr).hitTest(pacman)){
variable(dotsArr).removeMovieClip(); //remove dot mc
dotsArr = dotsArr.OC_splice(dotsArr); //remove dotname from array to reduce the loop
score = score plus 10; //add score for pill
}
}
for (j=0; j<pillsArr.length;j++) { //loop thru pillsarray...
if (variable(pillsArr[j]).hitTest(pacman)){ //and check if eating pills
variable(pillsArr[j]).removeMovieClip(); //remove pill mc
pillsArr = pillsArr.OC_splice(pillsArr[j]); //remove pillname from array to reduce the loop
powerpill = true; //set powerpill to true
pspeed = defspeed plus 1; //make pacman go faster
for (i= 0; i<= maxghosts;i++) { //change ghosts color and look
if(variable("ghost"+i+".go_home") == false){
variable("ghost"+i+".eyes")._visible = false;
variable("ghost"+i+".body")._visible = false;
variable("ghost"+i+".bluebody").gotoAndStop(1); //stop blinking
variable("ghost"+i+".bluebody")._visible = true;
}
}
clearTimeout(pill_Timeout); //clear any previous Timeout
pill_Timeout = setTimeout(stop_pill,10000); //(re-) set Timeout
clearTimeout(blink_Timeout); //clear any previous Timeout
blink_Timeout = setTimeout(go_blink,8000); //(re-) set Timeout
score = score plus 50; //add score for pill
}
}
//handle extra lives
if(lastscore != score){ //check lastscore to make shure not to loop
if(score%10000 == 0 ){lives_mc.nextFrameAndStop()}; //extra live every 10000 points
lastscore = score; //update lastscore
}
if(dotsArr.length == 0 && pillsArr.length == 0){ //if all dots and pills are gone,.. get next level
freeze(); //freeze pacman and ghosts
nextlevel_TimeOut = setTimeout(next_level, 3000); //get next level
};
//handle pacman movement
if (Key.isDown(Key.right)) {
if (!walls.hitTest(pacman._x +offset,pacman._y,true)) {pacman._x+=pspeed};
} else if (Key.isDown(Key.left)) {
if (!walls.hitTest(pacman._x -offset,pacman._y,true)) {pacman._x-=pspeed};
} else if (Key.isDown(Key.up)) {
if (!walls.hitTest(pacman._x,pacman._y -offset,true)) {pacman._y-=pspeed};
} else if (Key.isDown(Key.down)) {
if (!walls.hitTest(pacman._x,pacman._y +offset,true)) {pacman._y+=pspeed};
}
pacman.OC_checkTunnel(); //check for tunnels
}
function stop_pill() { //if pill stopped working
for (i= 0; i<= maxghosts;i++) { //change color back
if(variable("ghost"+i+".go_home") == false){
variable("ghost"+i+".eyes")._visible = true; //show eyes
variable("ghost"+i+".body")._visible = true; //show color body
variable("ghost"+i+".bluebody").gotoAndStop(1); //stop blinking
variable("ghost"+i+".bluebody")._visible = false; //hide bluebody
}
}
powerpill = false; //set powerpill to false
pspeed = defspeed; //reduce pacmans speed
ghostScore = defghostScore; //reset ghostscore to default
}
function go_blink() { //if pill stopped working
for (i= 0; i<= maxghosts;i++) { //change color back
if(variable("ghost"+i+".go_home") == false){
variable("ghost"+i+".bluebody").gotoAndPlay("blink");
}
}
}
function pac_dead() { //if pacman died,...
paclives -= 1; //reduce life
lives_mc.prevFrameAndStop();
freeze(); //freeze pacman and ghosts
reset_TimeOut = setTimeout(reset_level, 3000); //reset level
}
function reset_level() {
clean_up(); //clean up ghosts & co
if(paclives > 0){ //if lives left,..
make_ghosts(); //make ghosts
pacman.init(); //init pacman
}else {
game_over(); //end game
}
pause_mc._visible = false; //in case paused, hide pause mc
pause_mc.pausedgame = 0; //and set it to not paused
}
function game_over() { //check score for highscore
gotoAndStop("game_over");
}
function freeze() {
for (i= 0; i <= maxghosts; i++) { //stop ghosts
delete variable("ghost"+i).onEnterFrame;
}
delete pacman.onEnterFrame;
}
function clean_up() {
for (i= 0; i<= maxghosts;i++) { //remove ghosts
mc = variable("ghost"+i);
mc.removeMovieClip();
}
}
function next_level() {
clean_up()
currlevel ++; //increase currlevel
gotoAndPlay("reload"); //and reload
}
//show_ghostscore when eating a ghost
function show_ghostscore(x,y,show_gs) {
t++;
ghostscore_mc.duplicateMovieClip("ghostscore_mc"+ t,getNextHighestDepth());
dupB=eval("ghostscore_mc"+ t);
dupB._x = x; //spawn at _x
dupB._y = y; //spawn at _y
dupB.showscore = show_gs; //show score for this ghost
}
onSelfEvent (load) {
paclives = 5; //set # of lives for pacman
currlevel = 1; //set default level
score = lastscore = 0; //set score
defspeed = pspeed = 3.6; //set pacman speed,...
ghostspeed = 3; //set ghost speed,... Note: (24 % ghostspeed) must be 0
defghostScore = ghostScore = 100; //set start score for eating ghosts
offset = 12; //set offset (walls mc_width/2)
ghost._visible = false; //hide original
ghostscore_mc._visible = false; //hide original
var pill_Timeout //init interval
var blink_Timeout //init interval
dotsArr = new Array; //create array to save all dot names
pillsArr = new Array; //create array to save all pill names
collsArr = new Array; //create array for ghost colors, add more if needed
collsArr = ["0xFF0000","0xFF6600","0x00FF00","0xFF00FF","0xFFFF00","0x00FFFF","0x990099","0xFF99FF"];
}
onFrame (3) {
setLabel("reload");
}
onFrame (5) {
init();
stop();
}
onFrame (10) {
setLabel("game_over");
stop();
}
onSelfEvent (load) { this._visible = false;
//add some stuff to pause the game
MovieClip.prototype.pauseEnterFrame = function() {
if (typeof this.onEnterFrame == "function") {
this.tempOef = this.onEnterFrame;
delete this.onEnterFrame;
}
}
MovieClip.prototype.resumeEnterFrame = function() {
if (typeof this.tempOef == "function") {
this.onEnterFrame = this.tempOef;
delete this.tempEnterFrame;
}
}
pausedgame = 0;
Butts = new Object();
Butts.onKeyUp = function() {
if(Key.getCode() == 80) {
if(pausedgame == 1){
_parent.pacman.resumeEnterFrame();
for (i= 0; i<= _root.maxghosts;i++) {
variable("_root.ghost"+i).resumeEnterFrame();
_parent.pause_mc._visible = false;
pausedgame = 0;
}
}else{
_parent.pacman.pauseEnterFrame();
for (i= 0; i<= _root.maxghosts;i++) {
variable("_root.ghost"+i).pauseEnterFrame();
_parent.pause_mc._visible = true;
pausedgame = 1;
}
}
}
}
Key.addListener(Butts);
}
function gamelevel1() { _root.colums = 25;
_root.mapindex = [1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,1,
1,0,1,1,1,0,1,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,0,1,
1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,
1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,
1,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,1,
1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,
1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,
1,0,1,1,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,1,1,0,1,
1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,
1,0,1,1,1,1,1,0,1,0,1,1,8,1,1,0,1,0,1,1,1,1,1,0,1,
1,0,1,0,0,0,0,0,1,0,1,8,3,8,1,0,1,0,0,0,0,0,1,0,1,
3,0,0,0,1,1,1,1,1,0,3,3,8,3,3,0,1,1,1,1,1,0,0,0,3,
1,0,1,0,0,0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1,1,0,1,1,
1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,
1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,
1,0,0,2,0,0,1,0,0,0,0,0,9,0,0,0,0,0,1,0,0,2,0,0,1,
1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,1,0,1,
1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,
1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1];
_parent.make_ghosts();
}
function init() { for (i= 0; i<= _parent.mapindex.length;i++) {
if(_parent.mapindex == 9){
this._x = (i %_root.colums*24) plus _root.offset;
this._y = (Math.floor(i/_root.colums)*24) plus _root.offset;
}
}
}
onSelfEvent (load) {
init()
}
function go_dup () { for (i= 0; i<= _root.mapindex.length;i++) {
if(_root.mapindex == 0){
dot.duplicateMovieClip("dot"+ i, i);
mc = eval("dot"+i)
_root.dotsArr.push("dots.dot"+i);
mc._x = i %_root.colums*24;
mc._y = (Math.floor(i/_root.colums)*24);
}
}
}
function init() {
dot._x = 0;
dot._y = 0;
dot._visible = 0;
go_dup();
}
onSelfEvent (load) {
init()
}
function go_dup () { for (i= 0; i<= _root.mapindex.length;i++) {
if(_root.mapindex == 1){
dot.duplicateMovieClip("dot"+ i, i);
mc = eval("dot"+i);
mc.t = i;
mc._x = i %_root.colums*24;
mc._y = (Math.floor(i/_root.colums)*24);
}
}
}
function init() {
dot._x = 0;
dot._y = 0;
dot._visible = 0;
go_dup();
}
onSelfEvent (load) {
init()
}