Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] Game Wall Problem....please Help



ok so i created a wall and used the code provided but when i go through it its only slows my character down. im freakin out lol what is my problem.
my .fla is attached and the actions are on my character MC

Thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-03-2007, 02:55 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

HELP How Can I Create A Wall For My Acing Game?
how can i create a wall for my acing game?

Making A Wall For My Racing Game
ok guys,
I am new to the hittest function and was wondering if someone could help me out creating a wall that will make my car stop when it hits it.

I have a speed variable called speed
A Car MC called Car
and a Wall MC called walls

Up Against The Wall Help Please
help me please

I am trying to test equality of the value of a combobox and the current frame with no luck. Here is my code so far:

on (release) {
var a = chooser.getScrollPosition();
var b = spinner._currentframe();
if (eval(a == b+1)) {
gotoAndPlay("prize",1);

}
}


I have tried many variations with no luck.

Wall...
Ok.. I made a character (movieclip), then when it walks into a wall it stop moving. I know its something about the hittest, but i dunno how to work it properly which i tried many times.

I Have Hit The Wall
looking for a photo transition intro like http://www.kizia.com/, or this one http://www.thekatiedaniels.com/ kinda borring, this one too..http://www.friendlyencounters.biz

boring too but you get the idea. Just looking for something like that but way better. Even some fla's on this site, just something....I am at a creative wall!

Thanks.

[MX] Wall?
How do I code for a wall?

WALL HELP Please
Ok, my problem is pretty simple. I have a ball that i want to make move either randomly or in a set fashion, then i would like it so that whenever it hitas a wall it moves in th oposite direction. The ball is called evil_1 and the wall is called Right_Wall. Can anyone help?

Hit A Wall...
I've been trying to get this to work for a few days now, but haven't had any luck. I'm working with a Form Application file to simulate a program. The tree looks something like this...





mainScreen-textInputs-8 sub-screens-checkBoxes-3 sub-screens-dataGrids-7 sub-screensEach of the dataGrids sub-screens contain the following:
-a DataGrid (will have XML bound to it later)
-a TextInput (will show what was selected from the datagrid)
-open/close buttons (switches the datagrid's visibility)
-a movieClip that reveals a check or X after a selection is made
-script to include external AS file (same one works on all sub-screens)

Since this is supposed to be a simulation, I need to change the depths of the screens so that when any of the buttons are pressed the datagrid showing the choices is above everything else. I've tried using the DepthManager, but I haven't been able to get it to swap the screen depths dynamically. I've only been able to swap one depth, and then, other screens are covered by the one I was able to move up.

I was thinking (hoping) that I could put something in the external AS file that could set the focus to whichever grid is selected and move whichever screen has the focus to the top of the stacking order whenever one of the buttons is pressed.

Any ideas? My brain is pretty thoroughly fried from looking at this thing. It doesn't seem like it should be this difficult (and I can just picture this being 3 or 4 lines of code that pull it all together), but I'm stuck for now.

Thanks!

Ugh...hitting A Wall...
I'm hitting a wall.
I can load an external swf from an existing swf just fine. But I'm trying to have the new loaded movie jump to a specific "Frame Label" instead of just the default begining.

ANY suggestions or help/assistance/guidance would be GREATLY appreciated.
Thanks in advance,
Dave

How To Setup Wall?
Hi all,

I am trying to make out some walls in my movie...
How can I do the walls?
I tried the hitTest, but I have to include many blocksto make the wall function normally?
Hope someone can help...
Cheers

MKit de HK

Need Some Help With This Virtual Wall
I have this movie that loads images(bricks) into it from a database it is loading well, but i would like some help in making it scroll left to right and looping the scrolling movement.

can anyone lend some assistance

MC Bouncing Off Wall
is there a tute or can someone explain to me please how to make a moving MC bounce off a wall. I can make the MC move and have momentum, but im not sure how to get it bounce off the wall

cheers

Run Into A Wall (or Other Object)
I went through a lot of the tutorials on this site, but didn't find anything that helped me out. I'm kind of at a stopping point here, and need to know where to go next....

You'll see in the attached file that I have a red ball that uses the arrow keys to move it around. There are also some random objects on the screen - I want to know how to make it so that when the ball hits one of those objects, it stops (just as it would in real-life).....

If anyone can get me started on some scripting that would get me going in the right direction, I'd really appreciate it - I'm still pretty new at Flash....

Oh, and I'm using Flash 5 - thanks!!!....

Run Into A Wall (or Other Object)
I went through a lot of the tutorials on this site, but didn't find anything that helped me out. I'm kind of at a stopping point here, and need to know where to go next....

You'll see in the attached file that I have a red ball that uses the arrow keys to move it around. There are also some random objects on the screen - I want to know how to make it so that when the ball hits one of those objects, it stops (just as it would in real-life).....

If anyone can get me started on some scripting that would get me going in the right direction, I'd really appreciate it - I'm still pretty new at Flash, and VERY new at actionScripting....

Oh, and I'm using Flash 5 - thanks!!!....

Run Into A Wall (or Other Object)....
I went through a lot of the tutorials on this site, but didn't find anything that helped me out. I'm kind of at a stopping point here, and need to know where to go next....

You'll see in the attached file that I have a red ball that uses the arrow keys to move it around. There are also some random objects on the screen - I want to know how to make it so that when the ball hits one of those objects, it stops (just as it would in real-life).....

If anyone can get me started on some scripting that would get me going in the right direction, I'd really appreciate it - I'm still pretty new at Flash and VERY new at actionScript....

Oh, and I'm using Flash 5 - thanks!!!....

Collision With Wall
After you've created a movie clip that can be controlled with the keyboard how can you make it so it can't pass through walls?

Wall Collisions
[yeah...school has been interfering with my life..but now that summer vatation's here, I can finally get working again ]

Okay, I've been having some problems with walls. Whenever I walk into one in real life, I am usually stopped. If I press against the wall, I can slide back and forth across the wall, usually leaving a mark on it.

However, in Flash, my movie clips will pass THROUGH walls. How can I get the movie clip to be stopped at a wall and then slide back and forth on it if the MC is pushed against it?

Any my other question is:
How can I stop a hittest from going through a wall? er... How can I stop a movie clip's hittest from going through walls? [sorry if that seems cryptic, but I can't find a better way of explaining it]

Off The Wall Question
OK this has nothing at all to do with flash, but I'm sure most of you can probably answer it, maybe. I'm trying to learn php so I can do some database stuff with my flash movie. I'm at work...all by myself...and one of these machines here is a linux server. I dont think its connected to our network...at least it doesnt seem to be there. I have the user name and password for root access, and I know how to log onto phpMyAdmin..but I have no idea WHERE the database is. In other words, I want to put some php files on it so I Can run them since IIS doesnt like php. Any idea how to find out? phpMyadmin says its running at "localhost." http://sql.motionforwardtech.net is the site for the phpmyadmin. I login there...but it doesnt seem to give me much info. thanks

Grafitti Wall
Hi,

Just wondering how I would go about creating a white board style thing, where people can choose a pen, write a message on a white board, and read others peoples on the same white board, not in real time, just like a guestbook but with a white board.

W.

Wall In The Middle?
hi,
can anyone please modify this simple wall example, so that it works when you press a button. Then can you attatch it, i would really appreciate it!

Thanx.

Wall In The Middle
can anyone modify this simple code so that it works when you click a button. something like this:

on release
{
??????? //what action script do i put in here
}

can you please attatch the working file.

thanks.

Hitting A Wall
trying to figure out a easy way to prevent a movie clip from going threw a wall.. so the user has to go around when using the arrow keys to move it.

onClipEvent (enterFrame) {

if (Key.isDown(37)) {
_x -= 10;
}
if (Key.isDown(38)) {
_y -= 10;
}

if (Key.isDown(39)) {
_x += 10;
}

if (Key.isDown(40)) {
_y += 10;
}
}

sizeOf = _root.wall.getBounds();

i have attached an example
any direction would be great.
thanks

How Do I Create A Wall
Can anyone please tell me how to create a wall so when a car bumps into it, it doesent go through.

I found one using hitTest, but in that if the car goes at high speed, it goes through the barrier. Also, the wall that i have with hitTest is not proper solid, half of the car goes through.

If possible, please also explain what each part of the code means as i am wanting to understand what they mean.

Thank you

Wall Coding
If any of you remember the old NES Gauntlet Game... I am remaking that in flash basically, but right now I am testing on all the movements and shootings and I have come up with a problem. I have a movieclip called user that is moving by checking for what key is down, and that is allowed only when it is not hitting a wall, so I want the person to be able to move but when that person is touching a wall to its left, not be able to move left, and if there is a wall about it not to be able to move up. The answer is probably really simple but I just can't come up with it now, and I dont want to have to divide each wall into slices and have it say if im touch user's left half dont let it move left... I will attach my current moving - shooting - wall project.

Code for Face/User
onClipEvent (load) {
Mspeed = 10;
Sspeed = Mspeed*2;
Marray = new Array(0, 0);
_root.numFire = 100;
MaxFire = 5;
FireTotal = 0;
}
onClipEvent (enterFrame) {
if (!this.hitTest(_root.wall)) {
this._y += Marray[1];
this._x += Marray[0];
if (Key.isDown(Key.CONTROL) and FireTotal<=MaxFire) {
FireTotal++;
_root.numFire++;
_root.firex = Marray[0]*2;
_root.firey = Marray[1]*2;
_root.attachMovie("wizfire", "userF"+_root.numFire, _root.numFire);
}
if (Key.isDown(Key.UP)) {
Marray[1] = -1*Mspeed;
}
if (Key.isDown(Key.DOWN)) {
Marray[1] = Mspeed;
}
if (Key.isDown(Key.RIGHT)) {
Marray[0] = Mspeed;
}
if (Key.isDown(Key.LEFT)) {
Marray[0] = -1*Mspeed;
}
}
}
onClipEvent (keyUp) {
Marray[0] = 0;
Marray[1] = 0;
}

Help Me With Wall Collision Please
i basically know wall detection but when the object itself it moving it does not work!! why????

[F8] How To Do Wall-Sliding?
Hi,
I'm making a racing game, and what I want to happen, is when you hit the wall, unless you are going straight at it, you just slide along it slowly.
This might not make sense, so thing of it this way. In Mario Kart (great game) when you drive into a wall, you don't just stop or bounce back, you just move along it. How would I do this in my game? I know that PI and triganometry is needed.
Thanks,
Lucas

[MX04] Wall...
Alright...i looked at other tutorials and stuff
the hitTest function doesnt work...well it doesnt seem like it does


i made a wall and called it wall_mc
how can i make it so my character (called Edajima_mc) can't pass it?

Drawing On The Wall?
check out this video:

http://youtube.com/watch?v=d7eGypGOlOc

probably not done in flash but... how can i get flash to interact in this way? i'm familiar with the drawing API but do i need to buy a giant 6ft x 6ft wacom tablet or does the guy in the video have a magic pen? is this magic pen available to mere mortals?

cheers.

Particle Wall
Good evening all!

I recently got a book from the local library entitled "Programming Macromedia Flash MX" by Robert Penner, and have been trying to replicate an example that he gave regarding a 3d vector "particle" wall. As I'm trying to learn AS 2.0, I did my best to convert his given script into working .as files. I've gotten most of it to work, however, as I move my cursor along the y-axis on the screen, the object shrinks in size. I've sat here for hours, trying to figure out what stupid lil' thing I've overlooked, but with no success. Could one of you fine fine souls :-) aid me in my education? It appears as though there's some error in the calculation of my "z" variable, or perhaps object scaling? Here's a link to the guilty swf:

http://tylerparkersounds.com/flash/wall.swf

In addition, here are the 3 .as files and the .fla:

http://tylerparkersounds.com/wall_files.rar

I warn you, however, the code form in these class definition files is god awful, and very minimal as, once again, I'm trying to learn the concepts and just threw up the bare bones to get the example working. :-)

For anyone kind enough to shed some light, I'd greatly appreciate your time and effort.

*bows humbly*

Wall Collisions
I would like to develop a class which allows a movieclip to collide with curved walls.

I can't find any resources on the correct maths for doing this. Does anyone have any links, resources, source code, reading I can research?

I have found alot of resources for colliding against straight walls and also for shape-shape collisions. No trouble there and I've used all that for previous games. This application is for creating a pinball area with curved walls.

I'd also like to create a game where a controllable player sprite is steered down a curved tube area, with the sprite realistically rebounding off the walls of the tube.

I am paticularly interested in creating realistic elastic collision reactions (i.e. correct deflection angles and so on)

Thanks in advance for any help or tips.

Man Walking Into A Wall?
I need help if anyone can. I'm am trying to make an RPG, but not a tiled one. Is there a way to make a man who is walking, stop moving in a certain direction when he collides with a certain movie clip, entitled "wall."
I have this code on my character:

onClipEvent (load) {
stop();
xspeed = 0;
yspeed = 0;

}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
play();
_rotation = 0;
yspeed -= 5;
}

if (Key.isDown(key.RIGHT)) {
play();
_rotation = 90;
xspeed += 5;
}
if (Key.isDown(key.LEFT)) {
play();
_rotation = 270;
xspeed -= 5;
}
if (Key.isDown(key.DOWN)) {
play();
_rotation = 180;
yspeed += 5;
}

_y = yspeed;

_x = xspeed;

if (!Key.isDown(key.UP) & !Key.isDown(key.DOWN) & !Key.isDown(key.LEFT) & !Key.isDown(key.RIGHT)) {
stop();

}
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
}
}

This bottom part that is in red, is what I added. Thinking that it would work, but it doesn't, the character just keeps walking through the wall movie clip.
I would like for when he hits the wall for him to stop moving in the certain direction even though the walking animation is still playing.
Make sense?
I have tried many different kinds, and I really don't want to mess with a tile game for this one.

Making A Wall
I have a character, but he can go through walls. how do i make it so he can't go through the wall?

Bouncing Of Wall?
Well ive searched everywere I can think of but I cant seem to find how to make a ball or something bounce off a wall. How would you go about doing this?

Help With Photo Wall
I am trying to make a 3d wall like the firefox extension pic lens using papervision. My code right now loads an xml file and then initiates papervision and uses BitmapFileMaterial to load the jpgs. My issue is nothing is showing up. I am not getting any errors or anything. Here is my file so far, but you probably only need to focus on the addImages() function.

the fla:

ActionScript Code:
import com.rondog.galleries.PhotoWall;

var wall:PhotoWall = new PhotoWall("photos.xml");

PhotoWall.as

ActionScript Code:
package com.rondog.galleries
{
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
   
    import org.papervision3d.events.InteractiveScene3DEvent;
    import org.papervision3d.objects.DisplayObject3D;
    import org.papervision3d.objects.primitives.Plane;
    import org.papervision3d.materials.BitmapFileMaterial;
    import org.papervision3d.render.BasicRenderEngine;
    import org.papervision3d.cameras.Camera3D;
    import org.papervision3d.scenes.Scene3D;
    import org.papervision3d.view.Viewport3D;

    public class PhotoWall extends Sprite
    {
       
        private var camera:Camera3D;
        private var scene:Scene3D;
        private var viewport:Viewport3D;
        private var renderer:BasicRenderEngine;
        private var container:DisplayObject3D;
        private var plane:Plane;
        private var image:BitmapFileMaterial;
       
        private var data:Array;
        private var xmlData:XML;
        private var xmlLoader:URLLoader;
        private var xmlList:XMLList;

        public function PhotoWall(xmlfile:String)
        {
            xmlLoader = new URLLoader();
            xmlLoader.load(new URLRequest(xmlfile));
            xmlLoader.addEventListener(Event.COMPLETE, onComplete);
        }
       
        private function onComplete(e:Event):void
        {
            data = new Array();
            xmlData = new XML(xmlLoader.data);
            xmlList = new XMLList(xmlData.photo);
            for (var i:int = 0; i < xmlList.length(); i++)
            {
                var temp:Object = new Object();
                var id:int = i;
                var source:String = xmlList[i].@source
                var caption:String = xmlList[i].@caption;
                temp.id = id;
                temp.source = source;
                temp.caption = caption;
                data.push(temp);
            }
            initWall();
        }
       
        private function initWall():void
        {
            viewport = new Viewport3D(550, 400);
           
            addChild(viewport);
           
            renderer = new BasicRenderEngine();
           
            scene = new Scene3D();

            camera = new Camera3D();
           
            container = new DisplayObject3D();

            scene.addChild(container);
           
            addEventListener(Event.ENTER_FRAME, drawScene);
           
            addImages();
        }
       
        private function addImages():void
        {   
            BitmapFileMaterial.LOADING_COLOR = 0x0000FF;
            BitmapFileMaterial.ERROR_COLOR = 0xFF0000;

            for (var i:int = 0; i < data.length; i++)
            {
                image = new BitmapFileMaterial(data[i].source);
                plane = new Plane(image,100,100,3,3);
                plane.x = i * 120;
                container.addChild(plane);
            }

        }
       
        private function drawScene(e:Event):void
        {
            camera.lookAt(container);
            renderer.renderScene(scene, camera, viewport);
        }
       
    }
   
}

When I compile my movie, I get this in the output window:

Code:
INFO: Papervision3D Public Beta 2.0 - Great White (December 3rd, 2008)

INFO: BitmapFileMaterial: Loading bitmap from photos/photo1.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo2.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo3.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo4.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo5.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo6.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo7.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo8.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo9.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo10.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo11.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo12.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo13.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo14.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo15.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo16.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo17.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo18.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo19.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo20.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo21.jpg
INFO: BitmapFileMaterial: Loading bitmap from photos/photo22.jpg

Video Wall
I thought I would just put an example of flash comm piece here.

it's a collection of short video greetings left by the ego7 users.

you can refresh the page to see more.

http://www.ego7.com/videowall.swf


a clickable version is available on www.ego7.com

Video Wall
hi all,
Im being asked to make a Flash animation wich will be presented in a huge screen. Actually in a Video Wall. I was wondering wich consideration I should take before I start. Stage size, images resolution etc.. Please, anybody has an idea how to begin?
Thanks a lot
Caludia

MC Collision With Wall
hello i need help. i have an mc move where the x,y of the mouse is clicked...i need to know how to make the mc stop when it hits a wall..like

onClipEvent (enterFrame) {
if (this.hitTest(_root.wall)) {....what goes here..


btw...that code is on my mc..

please help ...


thx

Solid Wall
I am making a labyrinth in Adobe Flash at my school. I have already made the ball, which you must play with through the labyrinth. You click the ball with mouse and move it with your mouse. How I get the walls of the labyrinth to be solid that the ball cant go over the walls?

Is there any way to make it solid? Another idea I had is to make te ball jump one pixel farther from the wall when it touches the wall.

I have tried some several scripts, but all I have achieved is that the ball jumps over the wall, so in a way the wall is solid, but I want the ball to bounce from the wall.

The game is simple. The ball is drawn movieclip and the walls are lines made into movieclip.

Thank you in advance

John





























Edited: 08/20/2008 at 11:00:59 PM by john-asx

Off The Wall Question
heres an off topic question, but i thought u guys/gals wud know!

right i created a website, but if i want to get it online on a .com or .co.uk wot do i do? as far as domains and hosting goes? ne help wud b gr8!

im used 2 usin free space!

cheers

Hit A Brick Wall
Hi all, Im working on a flash menu that dynamically creates buttons. Its coming along quite nicely, until the boss said they wanted the buttons to horizontally align themselves depending on how many characters are in the buttons title. All the variables will be passed to flash from a .cfm, in the format &category=Home|Link|Stuff& etc, then in a big long for(i = 0, i<length of array, i++) statement I split the categories, subcategories, url, etc variables using an array.split("|"). In the cfm, there will be a string &widthvar=10|13|12|11|14|10&, or something like that, and Ive split it up, and so far each duplicate of the button is recieving the correct value, so button0's widthvar = 10, button1's =13 and so forth. the variable xstart is used to state the starting point x position of the original clip.

anyway this is the code im trying to use to set the x position of the duplicate buttons...its part of the for() section, straight after the statements that create the numbered duplicates, and set the widthvar for each one....

setProperty("button"+i, _x, xstart+(i*(("button"+i+".widthvar")*10)+20));

so it picks the button, sets its x to the original position plus its number times its own widthvar times the width of a character plus a two character width buffer.
It doesnt work though, it just piles the buttons on top of each other, it seems to evaluate that statement as Nan.

Its a doozy!!!!

Anyone? Any ideas how to fix it, or perhaps incorporate the buttons individual withvar variable to move it? thats the thing that really annoys me, when I dbug>list variables, it shows me a nice little list of
button0.widthvar = 10
button1.widthvar = 13
button2.widthvar = 12

and so forth, so why cant I utilise those lovely little widthvars?

GRAAARRGGGHHAHSHDHASSSDapplesauce

Falling Wall
pretty logical... how do you make a falling wall?

3d Wall Of Images
I'm trying to create a wall of movie clips that looks like it is bending along a steady curve. Following the tutorials in the 3d section of this site I can get my images to load along a circle but I can't seem to grasp how to set the distance between the objects.

I don't know if I am explaining this right, but what I want to do is place all the movie clips next to each other and have them appear as if they are existing in 3d space.

This is the tutorial i am referencing... http://www.kirupa.com/developer/acti...ra_panning.htm

Hit A Brick Wall
Hi all, Im working on a flash menu that dynamically creates buttons. Its coming along quite nicely, until the boss said they wanted the buttons to horizontally align themselves depending on how many characters are in the buttons title. All the variables will be passed to flash from a .cfm, in the format &category=Home|Link|Stuff& etc, then in a big long for(i = 0, i<length of array, i++) statement I split the categories, subcategories, url, etc variables using an array.split("|"). In the cfm, there will be a string &widthvar=10|13|12|11|14|10&, or something like that, and Ive split it up, and so far each duplicate of the button is recieving the correct value, so button0's widthvar = 10, button1's =13 and so forth. the variable xstart is used to state the starting point x position of the original clip.

anyway this is the code im trying to use to set the x position of the duplicate buttons...its part of the for() section, straight after the statements that create the numbered duplicates, and set the widthvar for each one....

setProperty("button"+i, _x, xstart+(i*(("button"+i+".widthvar")*10)+20));

so it picks the button, sets its x to the original position plus its number times its own widthvar times the width of a character plus a two character width buffer.
It doesnt work though, it just piles the buttons on top of each other, it seems to evaluate that statement as Nan.

Its a doozy!!!!

Anyone? Any ideas how to fix it, or perhaps incorporate the buttons individual withvar variable to move it? thats the thing that really annoys me, when I dbug>list variables, it shows me a nice little list of
button0.widthvar = 10
button1.widthvar = 13
button2.widthvar = 12

and so forth, so why cant I utilise those lovely little widthvars?

GRAAARRGGGHHAHSHDHASSSDapplesauce

Video Wall
Ok,

Look at this URL:
Click here

My attempt to recreate this involved a movieClip called "MyClip" that sit's on the main timeline, inside this I have the MediaDisplay component, and another movieClip (a red square) called "box"

It loads the video file in a grid format BUT I have no control over Delay, colour etc. Plus the flash player seems to stuggle.

Does anybody have any any idea's?????

cheers


Here is my code:

code]
yspacing = MyClip.box._height;
xspacing = MyClip.box._width;
grid_col = 10
grid_row = 10
depth = 0;
MyClip.box._visible = false;

//Create grid
for (i=0; i<grid_col; i++) {
for (var k = 0; k<grid_row; k++) {
MyClip.duplicateMovieClip("box"+depth, depth);
cur = this["box"+depth];
cur._x =(xspacing*i);
cur._y =(yspacing*k);
trace("box"+depth)
depth++;
}
}
[/code]

As3: Stop At Wall
How would I make it so that when a movieclip collides with a wall (another moveiclip), it stop and cannot go past it? Thanks =D

Wall Detection And Speed
I'm having trouble in the game I am creating. The character seems to keep clipping through the wall occasionally. The way it works, the little rectangle in front of square runs hitTest on enterFrame constantly. You can glitch it by hitting the rotate and forward keys repeatedly and it inches it's way into the wall.

http://www.ikast.net/users/toolgod/Zelda.html

Any suggestions on how to fix this? If anyone needs more info or the code using, I'll feel free to offer it up for examination.

Also, on a side note. Does the Flash run better if it is a lot of duplicated square movie clips or larger portions of less movie clips? I plan to have 8000+ movie clips running in this game.

Download Wall Paper
Hi!!
Ho can I make people download a wall paper from my flash site?

Thanks!!

Download Wall Paper
Hi!!
How can I make someone dowload a wallpaper from my flash site?

Thanks!!

Stop At Wall Problem
Here is the code. The _root.m== statements come from another mc that uses a spinner to randomly pick the number to move. The object is moving in increments of 11. The problem is that when the hittest is performed, the object moves one set (11) through the wall before stopping. How do I change the code to make the object stop when it hits the wall, not after it hits the wall? I have tried several variations and read some other posts, but do not understand how to make the correction.


onClipEvent (enterframe) {

face1y = getProperty(_root.face1, _y);
face1x = getProperty(_root.face1, _x);

//_root.nflmv is increment variable from spin mc.
if(nf1mv>=_root.nf1mv){mov=0;}
else
{mov=11;
nf1mv=nf1mv+11;}

//perform hittest
if ((_root.face1.hitTest(_root.game2.border1))||(_roo t.face1.hitTest(_root.game2.border2))||
(_root.face1.hitTest(_root.game2.border3))||(_root .face1.hitTest(_root.game2.border4)))
{mov=0;}

//_root.m are direction variables from random mc
else
if(_root.m==1){setProperty (_root.face1, _y, getProperty (_root.face1, _y) - mov);}
else
if(_root.m==2){setProperty (_root.face1, _y, getProperty (_root.face1, _y) + mov);}
else
if(_root.m==3){setProperty (_root.face1, _x, getProperty (_root.face1, _x) - mov);}
else
if(_root.m==4){setProperty (_root.face1, _x, getProperty (_root.face1, _x) + mov);}
}

Thanks in advance for any help.

pkw

Copyright © 2005-08 www.BigResource.com, All rights reserved