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




Get A Simple Key Movment Here



this is a code for a simple key movment you can go in all directions.--------------------------------------------------------------------------onClipEvent(enterFrame){ if(Key.isDown(Key.UP)){ this._y -= 5; }} onClipEvent(enterFrame){ if(Key.isDown(Key.DOWN)){ this._y += 5; }}onClipEvent(enterFrame){ if(Key.isDown(Key.LEFT)){ this._x -= 5; } }onClipEvent(enterFrame){ if(Key.isDown(Key.RIGHT)){ this._x += 5; } } -------------------------------------------------------------for people who dont understand this code to change the speed where the "5" is change that to make it go faster or slower.hope it works.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-25-2005, 05:56 PM


View Complete Forum Thread with Replies

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

Get A Simple Key Movment Here
this is a code for a simple key movment you can go in all directions.
--------------------------------------------------------------------------
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
this._y -= 5;
}
}
onClipEvent(enterFrame){
if(Key.isDown(Key.DOWN)){
this._y += 5;
}
}
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 5;
}
}onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
this._x += 5;
}

}

-------------------------------------------------------------
for people who dont understand this code to change the speed where the "5" is change that to make it go faster or slower.
hope it works.

Movment By X And Y
hello everybody.

I need to creataa "movie-clip" that will move
from first _x and _y positions to new _x and _y.

1. the movment suppose to be animative.
2. the movemet suppose to come after the "onmouseup" event
3. the movment suppose to occur only if the "movie-clip"
hit specipic _x and _y area.


I tried so many methods but it won't work.
It's very important for my work.
I'll appriciate any kind of help.

Xy Movment
Hello everyody.

I'm trying to create a "movie-clip" that will move in
animation from first _x and _y positions to new _x
and _y position.

That's only if it hits certain _x and _y area.

I tried so many methods but still nothing...

I really need some help. Appriciate.

Movment
Say I have a box on my page, how would I make it follow the cursor?

Key Board Movment
Im having problems trying to move my charachter left using the key board I got this animated gif and I want it to stopped when i start then move when i press the left arrow key and then stop when i let go? does anyone know how to do this please give me a reply all help appreciated thanx

Soundlevel - Movment
Hi!

I hope someone can help me with this little problem...

I have a script that looks like this...

this.onEnterFrame=function(){
activity=localMic.activityLevel;

//go left
if (activity >=5) {
currentX = this._x;
this._x = currentX - 10;
_root.gubbe._rotation = 270;

}
//go rigth
if (activity ==26) {
currentX = this._x;
this._x = currentX + 10;
_root.gubbe._rotation = 90;
}

How do I make it understand that _root.gubbe (Movieclip) shoul go rigth when the soundlevel is higher than 26 but left when the level is equal or lower than 25?

Please help me it would really mean a lot to me.

Movment Question
EDIT - FIXED FIRST PROBELM just need whats below now

I am making a code where when you move, not only does the object move, but it plays and animation of the character moving, and it works fine, HOWEVER, i need to know how to make the animation stop once you let go of the key you are pressing for example i have the MC "jet" set up like this (each number is a keyframe)



1: Direction up
2: Direction up movment (has a MC on it of the character walking in the up dirrection with the gotoAndPlay(1); at the end.
3: Direction Right
4: Direction Right movment (has a MC on it of the character walking in the right dirrection with the gotoAndPlay(1); at the end.


heres the code im using IN the jet Mc



Code:
onClipEvent (enterFrame) {



if (Key.isDown(Key.RIGHT)) {
if (right == 2) {

this._x += 5;
}
}
if (Key.isDown(Key.RIGHT)) {
if (right != 2) {
gotoAndStop(4);
this._x += 5;
right = 2;
}
}



now when you let go of the right key, it needs to
gotoAndStop(3);
and set right to 0

Mouse Movment
Hi all,

I am using this code for vertical scrolling gallery. How to add the X and Y Positions For Mouse up and Down for the Below code.


if (_global.chk == undefined) {
_global.chk = 1;
}

mask_y = getProperty("_root.main.verti.mask", _y);
mask_h = getProperty("_root.main.verti.mask", _height);
roller_y = getProperty("_root.main.verti.roller", _y);
roller_h = getProperty("_root.main.verti.roller", _height);

if (_global.chk == 1) {
if ((roller_y+roller_h)>(mask_y+mask_h)) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)-3);
} else {
_global.chk = 2;
}

} else if(_global.chk == 2) {
if (roller_y<=mask_h) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)+3);
} else {
_global.chk = 1;
}
}

Diagonal Movment
I'm having a problem getting my wee man to move diagonal.

at the momet on the map MC I have the following code:

Code:
onClipEvent (load) {
sSpeed = 15;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x -= sSpeed;
} else if (Key.isDown(Key.UP)) {
this._y += sSpeed;
} else if (Key.isDown(Key.DOWN)) {
this._y -= sSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x += sSpeed;
}
}
Is simple to get it to move left, right, up or down, but how do I got it to move at an angle, say a player presses both left and down, or up and right, how do I reflect this?

Fast Movment?
ok, I know a BIT of flash (just tweening.. no actionsript) so if someone ca help me..

I've seen on some sites, text comes in.. and it moves really fast in one position, but moves a couple of pixels from side to side.. kind of like, a bee zooms in, and then moves around, and zooms out.. got it?

how do I do this. lol, i cant remember sites that have them, so I will look around some more, if oyu know what im talkig about, help!

Mouse Movment
Hi all,

I am using this code for vertical scrolling gallery. How to add the X and Y Positions For Mouse up and Down for the Below code.


if (_global.chk == undefined) {
_global.chk = 1;
}

mask_y = getProperty("_root.main.verti.mask", _y);
mask_h = getProperty("_root.main.verti.mask", _height);
roller_y = getProperty("_root.main.verti.roller", _y);
roller_h = getProperty("_root.main.verti.roller", _height);

if (_global.chk == 1) {
if ((roller_y+roller_h)>(mask_y+mask_h)) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)-3);
} else {
_global.chk = 2;
}

} else if(_global.chk == 2) {
if (roller_y<=mask_h) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)+3);
} else {
_global.chk = 1;
}
}

3d Maze Movment
Is it possible to move around in a 3d maze like in first person by using the keyboard arrows?

[as] Movment Situation
Here is the actions for my object

ActionScript Code:
onClipEvent (load) {
    speed = 400;
    pos = -50;
}
onClipEvent (enterFrame) {
    x = pos-_x;
    _x += x/speed;
}

what this does, is takes the current possition of the object and moves it to -50 (_x). My problem is that i want this to "tween" across the screen wich it does, but at a constant speed, at the moment, its moving slow at the beginning and even slower at the end, sort of easing. but i just want it to move at a constant speed. (no easing) thanks in advance for all help.

Random Path / Movment HELP
whats wrong with this!
can some one help me figure it out!

onClipEvent (load) {
speed = .2;
friction = .3;
gravity = .1;
xArray = new Array(300, 20, 30, 40);
yArray = new Array(10, 20, 320, 40);
}
onClipEvent (enterFrame) {
xgoal = xArray[(Math.random()* 4)];
ygoal = yArray[(Math.random()* 4)];
speed = speed*friction+(xgoal-_x)*gravity;
_x += speed;
speed = speed*friction+(yArray-_y)*gravity;
_y += speed;
}


thanks in advance!

Watch Hands Movment
Hello

I am new to flash, for its part of an assignment i have to do, i have made a watch in photoshop, and i want to make the hands move i have done that using motion tween, but it loops back to the start. I don't want it to do that! Can ya doo it?

Also i want different hands moving at different times i currently have them @ 12fps but i want a more realistic time for it.

any1 help? (understand on wot im trying to ask?)

Movment And Changing Objects
ok i've got the movement code down but can someone tell me how to change the object when a button is pressed? Linke if i want the attack object different than the walking object and the still different that the walking.

Can someone help?


Plase and thank you,
Butch_Omen

Movment And Changing Objects
ok i've got the movement code down but can someone tell me how to change the object when a button is pressed? Linke if i want the attack object different than the walking object and the still different that the walking.

Can someone help?


Plase and thank you,
Butch_Omen

[F8] Help With Character Movment In Game
Ok the title didnt make THAT much sence but basically i have my game set up with 4 png graphics, and 5 movie clips for the hero.

theres a png of him facing left, right, up, and down.

theres 4 different movie clips one walking left, right, up and down

and then the actual hero movie clip wich has the first 4 frames as each png and then 8 more frames 2 for each direction.

on the hero movie clip i have this.


Code:
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this.gotoAndPlay('walkingl');
this._x -= 5;
}else if(Key.isDown(Key.RIGHT)){
this.gotoAndPlay('walkingr');
this._x += 5;
}else if(Key.isDown(Key.UP)){
this.gotoAndPlay('walkingu');
this._y -= 5;
}else if(Key.isDown(Key.DOWN)){
this.gotoAndPlay('walkingd');
this._y += 5;
}
}


and then in the actual movie clip lets say you press down it looks for walkingd wich is 2 frames it plays the first gets to the second and the second one is this

Code:
gotoAndPlay('walkingd');
if(Key.isDown(Key.DOWN)){
}else{

_root.hero.gotoAndStop('no_walkd');
}

this makes it so it goes back and plays the the frame before it instead of going to the next frame and changes the graphic to a no walk graphic if down is no longer pressed

this works fine BUT i have 6 direction movment wich is weird but it has to do with the order of the hero movie clip since in the clip i have...

no walkd, no walkl, no walkr, no walku, walkd, walkl, walkr, walk up

as the frame sequence what happens is if you hold down... while holding down you can still move left right and up
if your holding left you can only move right and up and if your holding right you can only go up and when you are holiding up its correct.

I only want 4 directional movment so if left is held you only walk left ect.

i attached the fla.

rpg.fla is for flash 8 users, rpgmx2004.fla is for mx 2004 users.

all help appreciated thanks.

Stop Movment Of Animation
I have created this code for a simple animation, but i don't know how to make it stop moving once it has reached the top and bottom of the screen
Any ideas.


ActionScript Code:
moveup.onRollOver = function() {
   bigmap.onEnterFrame = function() {
      this._y -= 8;

   }
   minihi.onEnterFrame = function() {
      this._y += 1.7;

   }
}

moveup.onRollOut = function() {
   delete bigmap.onEnterFrame;
   delete minihi.onEnterFrame;
}
   
movedown.onRollOver = function() {
   bigmap.onEnterFrame = function() {
      this._y += 8;

   }
   minihi.onEnterFrame = function() {
      this._y -= 1.7;

   }
}

movedown.onRollOut = function() {
   delete bigmap.onEnterFrame;
   delete minihi.onEnterFrame;
}

Movment Limitation On Objects
In the game im working on, i need a way to easily limit the movment of the PC without having to mess with any coordinates. The way i have started doing this is to put four lines around an the object i want to restrict movement into. In those lines i hvae code, like this for the left hand side one:


ActionScript Code:
onClipEvent (enterFrame) {
    if (this.hitTest("_root.pc") && Key.isDown(Key.RIGHT)) {
        setProperty("_root.pc", _x, _x=_x-5);
        setProperty("_root.we", _x, _x=_x+5);
    }
}
where "pc" is the moveable object and "we" is the blocking line
for the movement of the pc i use this:


ActionScript Code:
onClipEvent (enterFrame) {
    if (Key.isDown(Key.UP)) {
        setProperty("_root.pc", _y, _y=_y-5);
    }
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.DOWN)) {
        setProperty("_root.pc", _y, _y=_y+5);
    }
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.LEFT)) {
        setProperty("_root.pc", _x, _x=_x-5);
    }
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
        setProperty("_root.pc", _x, _x=_x+5);
    }
}

This almost works, but the pc ends up getting centered on the line, not sure why. I need it to merely contact the line, not go over it.

Is this at all possible?

I have also posted an example to see just what ive done so far

Thanks so much;

|/|.|/|.

Btn Click X Axis Movment
Does anyone know how to move a symbol named news with an instants name of slide to a point on the x axis when a button with the instants name of news1 is clicked.


when you click news1 the news symbol moves to the x axis of 40

Scripted Movment Stopping
can anyone tell me why this dosen't work?

------------------------------------------------------------

onClipEvent (enterFrame){
xStop = 225;
if (_root.ball >= xStop){
stop();
}
_root.ball._x += 5;
}

------------------------------------------------------------

the ball never stops. It just keeps on going. :|

Random Movment Not Working
i have a MC called muck on the stage within that there is a small animaton that plays to frame 14 this holds another mcs called muckparts within that mc I have a set of functions

it play if i put the muckparts movie into the root but not within muck mc

Thanks guys



Code:


function getdistance (x, y, x1, y1) {
var run, rise;
run = x1-x;
rise = y1-y;
return (hyp(run, rise));
}
function hyp (a, b) {
return (Math.sqrt(a*a+b*b));
}
MovieClip.prototype.reset = function () {
var dist, norm, movie_height, movie_width;

movie_height = 204;
movie_width = 127;

speed = Math.random()*4+2;
targx = Math.random()*(movie_width-_width);
targy = Math.random()*(movie_height-_height);
dist = _root.getdistance(_x, _y, targx, targy);

norm = speed/dist;
diffx = (targx-_x)*norm;
diffy = (targy-_y)*norm;
};


MovieClip.prototype.move = function () {
var cycle;

cycle = 200;

if (_root.getdistance(_x, _y, targx, targy)>speed) {x += diffx;y += diffy;
} else {x = targx;
y = targy;
if (!this.t) {
t = getTimer();
}
if (getTimer()-t>cycle) {reset();
t = 0;
}
}
_x = x;
_y = y;
}



and each MC has


Code:


onClipEvent (enterFrame) {
move();
}

Scrolling Images On Mouse Movment
I posted a clip asking if anyone knew a good tutorial to do scrolling on mouse movement, well i found one:

actionscript-toolbox.com/sampleslidingviewer2.php

it also answears my question on writing effective loops. If anyone else has had these problems hope this link helps.... : )

Loading Movies On Top After Script Movment
okay here is my problem...

http://members.bellatlantic.net/~vze22gys/mike/mike.htm


after buttons are pushed i want to load my next movie on top of the main move... however if the movie is already loaded the fluidity is lost in the motion.

what i would like to do is have a button pushed then after motion from the action script is done, then load the movie hence making the movie more fluid.

i have done it before here but it was a cop out example:

members.bellatlantic.net/~vze22gys/wyep/wyep.html

what i did was have empty frames before the level1 movie was loaded..

any suggestion tips would e apreciated...

thanks mike

Help... Saving Movment And Actions In A Movie.
i am trying to do something similar to the following link.

http://www.imaginationcubed.com/LaunchPage

the part i need help with, is the 'send to a friend' part. i am making a company holiday card in which the user can create their own drawing similar to the above link. Does anyone know any way to then save all of the actions so that the user can send the drawing they just made on to a friend.

any help would be greatly appreciated. check out the above link and look at the 'send to a friend' link to see more of what i am talking about.

thanks

Detect Mouse X Movment On RollOver
I want to have a button to control the direction on a movie clip. To accomplish this i need to detect which direction the mouse is rolling over my movie clip. I have a prototype working, but not the way i want it to. This code works on mouse movement, i want it to work as a rollover.

This is my code so far:


Code:
object_mc.onMouseMove = function() {
if (_root._xmouse<prevpos) {
object_mc.gotoAndPlay("on2");
trace("left");
} else if (_root._xmouse>prevpos) {
object_mc.gotoAndPlay("on");
trace("right");
}
prevpos = _root._xmouse;
};

Follow Mouse Movment With Easing?
You guys have any idea how I can adjust this code to get an easing effect?
______

fists_mc.onEnterFrame = function() {
//stick the hands to the cursor
if (_root.contact.fistHit_mc.hitTest(_root._xmouse,_r oot._ymouse,true)) {
this._x = _root.contact._xmouse;
this._y = _root.contact._ymouse;
Mouse.hide();
}
else {
Mouse.show();
}
}

_____

?¿

Object Movment On Browser Resize
Hello,

I was looking at the below site, and I noticed that when I resize the browser, objects in the SWF move around. I looked at the HTML code, and the embed tags have the hight and width of the SWF at 100%. Here is the site:

http://www.funktion12.com/

Does anyone know how this is done? Thanks!

Random Movment Within Specified Radius, Wobbling
Anyone with a quick link to any prototype or code snippet that can made a movieclip move randomly within a radius argument? like wobbling.

Newby Object Movment Animation 4 Friend
hey, just posting this newby example of making things move toturial junk. anyways, it has an example of a button and movie clip object for newbs to see

Papervision, Restrict Camera Movment And Zoom
Hello,

I've started my first AS3 project today and erm.........woah! It's giving me a complete nervous breakdown.

I've got to do a project with with 3d so have turned to papervision. Basically, I have 5 planes that I want the camera to rotate around but only to a point. When the camera reaches an x value of either -1000 of 1000 the camera movement should stop and not go past that value (but obviously the other way).
Also, I need to add a function to click one of the planes and it comes to the front and fills the stage (it's aspect ratio will be the same as the stage). The code I'm using the standard Lee Brimlow tutorial code:


PHP Code:



import org.papervision3d.scenes.*;
import org.papervision3d.objects.*;
import org.papervision3d.cameras.*;
import org.papervision3d.materials.*;

// Create the container Sprite
var container:Sprite = new Sprite();
container.x = stage.stageWidth * 0.5;
container.y = stage.stageHeight * 0.5;
addChild(container);

// Setup the 3D scene
var scene:Scene3D = new Scene3D(container);
var camera:Camera3D = new Camera3D();
camera.zoom = 10;

// Create the material
var bam:BitmapAssetMaterial = new BitmapAssetMaterial("cover");
bam.oneSide = false;
bam.smooth = true;

var bam2:BitmapAssetMaterial = new BitmapAssetMaterial("orange");
bam2.oneSide = false;
bam2.smooth = true;

var bam3:BitmapAssetMaterial = new BitmapAssetMaterial("blue");
bam3.oneSide = false;
bam3.smooth = true;

var bam4:BitmapAssetMaterial = new BitmapAssetMaterial("green");
bam4.oneSide = false;
bam4.smooth = true;

var bam5:BitmapAssetMaterial = new BitmapAssetMaterial("pink");
bam5.oneSide = false;
bam5.smooth = true;

var p1:Plane = new Plane(bam, 234, 300, 2, 2);
scene.addChild(p1);
p1.x = 200;

var p2:Plane = new Plane(bam2, 234, 236, 2, 2);
scene.addChild(p2);
p2.x = -100;
p2.z = 500;

var p3:Plane = new Plane(bam3, 234, 236, 2, 2);
scene.addChild(p3);
p3.x = -500;
p3.z = 1000;

var p4:Plane = new Plane(bam4, 234, 236, 2, 2);
scene.addChild(p4);
p4.x = -500;
p4.z = 100;

var p5:Plane = new Plane(bam5, 234, 236, 2, 2);
scene.addChild(p5);
p5.x = 500;
p5.z = -100;

this.addEventListener(Event.ENTER_FRAME, render);

function render(e:Event):void
{
//psuedocode...
//if camera.x>-1000 && camera.x <1000
    camera.x += (stage.mouseX - (stage.stageWidth*0.5))/50;
    scene.renderCamera(camera);
}




So basically, the cameras movement is restricted to between -1000 and 1000 and you can click on the planes and zoom into them so they fill the screen.
Can anyone help me here because I am going into meltdown trying to do this.

Cheers
Matt

Random Movment, Rotation And Speed With An Array
OK I have a rock movieclip that is in an array and a timed function that places an instance of the rock on the stage every 5 seconds. So evey 5 seconds a rock is placed onto the stage. What I want is when a rock is placed onto the stage it rotates either clockwise or anticlockwise. So every 5 seconds a rock appears and it will rotate either clockwise or anitclockwise. I also want the rocks to rotate at a random speed. So every time a rock appears its rotation speed will be different.

I also need the rocks to move in a random direction. So every time a rock appears it will travel in a different direction to the previous rock.

Can anyone tell me how I would do this?

Cheers,
James

Random Movment, Rotation And Speed With An Array
OK I have a rock movieclip that is in an array and a timed function that places an instance of the rock on the stage every 5 seconds. So evey 5 seconds a rock is placed onto the stage. What I want is when a rock is placed onto the stage it rotates either clockwise or anticlockwise. So every 5 seconds a rock appears and it will rotate either clockwise or anitclockwise. I also want the rocks to rotate at a random speed. So every time a rock appears its rotation speed will be different.

I also need the rocks to move in a random direction and random speed. So every time a rock appears it will travel in a different direction and speed to the previous rock.


Here is the code I am using



ActionScript Code:
//
//
var RockArray:Array = new Array();
//
var RockCount:int = 0;
var startTime:int = int(timer);
var nextRockTime:int = 0;
var RockTimeGap:int = 5;
var timeElapsed:int = 0;
var i:int;
//

    var newRock:Rock = new Rock();
   
    addChild(newRock);
   
   
    newRock.x = Math.random() * stage.stageWidth;
    newRock.y = Math.random() * stage.stageHeight;
    //
    RockArray.push(newRock);

//timer
var RockTimer:Timer = new Timer(5000);
var timer:Timer = new Timer(1000);
RockTimer.addEventListener(TimerEvent.TIMER, onTimer);
timer.addEventListener(TimerEvent.TIMER, timedFunction);
RockTimer.start();
timer.start();

function timedFunction(eventArgs:TimerEvent)
{
   timer_txt.text =(( timer.currentCount + 1)+ " Seconds elapsed");
}

function onTimer(evt:TimerEvent):void{
    var newRock:Rock = new Rock();
   
    addChild(newRock);
   
    newRock.x = Math.random() * stage.stageWidth;
    newRock.y = Math.random() * stage.stageHeight;
   
   
    //
   
   
   
    RockArray.push(newRock);
    RockCount++;
}

RockArray[i].addEventListener(Event.ENTER_FRAME,handleRocks);
    function handleRocks(event:Event):void {
        for (var i:int = 0; i< RockArray.length; i++) {
            //RockArray[i].rotation += 15;
           

           
        }
        RockCount_txt.text = String(RockCount + 1) + " 'Rocks on stage";
}



I have found some tutorials but they use math.cos and sin and Math.pi and I dont know how to use them and I dont want to. is there a simple way to get the rocks to do what I want them to do? Can someone fix my code so it does what I want it to do with out using math.cos and sin and Math.pi.

Could I just create a random number for the movement directi and speed, rotation direction and speed and then tell the array objects to use thoes random numbers?

Cheers,
Frenzy2

Damage, Respawning, Health, Movment Game
Ok I already Have a 3d flash mx game engine I just need help with a little bit of easy stuff since the engine was hard.
I need Health script for when your shield is down is when you start getting health taken away when attacked. Also I need script for to respawn in a map when you die and respawn in a certain spot I only need the script! Then Damage script from my gun to enemy and enemy fire to me. And last but not least I need a little bit of button movment and mouse. Such as I move forward with W and Backward with S strafe left with A and strafe right with D then the mouse is the part where you look around and aim then fire with left click and whip them with your gun right click. Thats All for Now.

Please Help Me

ps. you dont have to have all answers I would at least like one answer to one of them if you could get all that would be great thanks.

AScript For Limiting Movment On A MC When Start Drag Initiated
I am looking for code that will allow me to limit the movement to 50 pixel squares on a grid with a MC when the MC is being dragged.
example:

user drags object...
if the object is between 0-25 make the x coordinate 0 if it is between 26-75 make the _x coord 50.

This code isn't working for me:

on (EnterFrame) {
if (this._x >= 0 && this._x <= 25) { this._x = 0 }
if (this._x >= 26 && this._x <= 75) { this._x = 50 }
}

Is there anyone with an alternate solution?

Thanks in advance.

Forward & Backward Movment Control In Movie Clips?
I have a movie clip of a 3d fly through of a map of my local town exported to Flash from Cinema 4D. What I want to is have control over going forward and backward through the movie clip to specific points upon hitting specific buttons. I don't want to jump from point to point, I want to play and rewind from point to point.

Usual searches have come up with nothing. Where do I start?

Many thanks

Chris

Forward & Backward Movment Control In Movie Clips?
I have a movie clip of a 3d fly through of a map of my local town exported to Flash from Cinema 4D. What I want to is have control over going forward and backward through the movie clip to specific points upon hitting specific buttons. I don't want to jump from point to point, I want to play and rewind from point to point.

Usual searches have come up with nothing. Where do I start?

Many thanks

Chris

LoadMovie SIMPLE Question For Simple Minded Graphic Artist
OK! So this will be EASY EASY for all of you.

I need to load a seperate SWF file onto the stage on a level above the main swf.

the seperate SWF file is in the same folder as the original all located in the "flash" folder of the root directory.

How do I get th e outside SWF to load on top of the movie.

The original movie is called grid.swf the outside movie is called liquid-print.swf

If anyone can help me with giving me the code I'd appreciate it. I really am quite dense when it comes to coding.

Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
Flash MX 2004 (mac)
******************

Hi,

I have a custom component that consists of nothing more than two dynamic text feilds and a button. I want the button to open a popup window in the browser, and it does so using javascript (an extension i found).

I put the following function in the first (and only) frame of my actual component (and its also in the first frame of my entire movie, just in case):

callPopup = function() {
getURL(popup);
};


And then on the button in my component i have this:

on(press){
callPopup();
}

and then finally,there is a variable named 'popup' within my component (which would change in each instance) which is given a value in my test instance as :

"javascript:jspw3('../vwd_scripts/','popups/acroyoga.swf',',,0,Past%20Event,index,Past%20Event ,20,0,,0,450,550,0,0.001,0.001,,,1,0,,.0.0.');"


somewhere i am doing something wrong.. ..i am not sure if its the button code, or my link (variable 'popup') syntax. Or if its impossible to use javascript in this way.

I know my html page is set up correctly (correct info in the head of the page etc), since i am able to call the javascript from a regular html link (just for testings sake) which is on the same page as my swf.

Hmm..i hope i made some sense here.

I will be very gratefull for some help...i'm totally lost on this one...

thanks in advance

Cheska

[F8] Very Simple Question, Very Simple Answer, I Hope. (Flash 8, Collisions)
Alright, so I've got my ball that moves up and down; it has gravity too. There are two things I want to do:

1. I want it to 'jump' when the UP key is pressed, rather than just accumulatively move upward.

2. I only want gravity to be applied while the ball is in the air(In other words, I basically just don't want it falling through the floor; however, want the edges to be the collision, not the center, and I also still want to be able to jump afterwards.

Thanks for any help, I don't need an explanation, I can figure it out by looking at the code. I'm going to attach a basic file with what I already have, please add the coding to it, then send the file back. Thanks for any help, and I apologise if this is hard to understand, or if I sound any bit rude to be asking how to do something; I don't mean to.

Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
Flash MX 2004 (mac)

Hi,

I have a custom component that consists of nothing more than two dynamic text feilds and a button. I want the button to open a popup window in the browser, and it does so using javascript (an extension i found).

I put the following function in the first (and only) frame of my actual component (and its also in the first frame of my entire movie, just in case):

callPopup = function() {
getURL(popup);
};


And then on the button in my component i have this:

on(press){
callPopup();
}

and then finally,there is a variable named 'popup' within my component (which would change in each instance) which is given a value in my test instance as :

"javascript:jspw3('../vwd_scripts/','popups/acroyoga.swf',',,0,Past%20Event,index,Past%20Event ,20,0,,0,450,550,0,0.001,0.001,,,1,0,,.0.0.');"


somewhere i am doing something wrong.. ..i am not sure if its the button code, or my link (variable 'popup') syntax. Or if its impossible to use javascript in this way.

I know my html page is set up correctly (correct info in the head of the page etc), since i am able to call the javascript from a regular html link (just for testings sake) which is on the same page as my swf.

Hmm..i hope i made some sense here.

I will be very gratefull for some help...i'm totally lost on this one...

thanks in advance

Cheska

Simple Problem. Simple Answer? Arranging Windows W/flash
SIMPLE problem. | SIMPLE answer?
We're trying to have a Full screen CD presentation in flash that plays .avi's in windows media player, & opens up url's in a web-browser. The problem is the URLs AND the .AVIs show up underneath the flash, is there a way to have them open on top of the presentation?

Thank you.

Random Tweens - Simple Question, Simple Answer?
Hello, I have one swf with a few different motion tweens inside their own movie clips. I want to write some code to play only one of the tweens at random. I know how to use setInterval to get the process to repeat with a delay. But I just want a different/random tween to play with each repeat. I hope that makes sense.

I imagine this must be easy, but I'm having a tough time getting it to work. Random tweens, somebody please help.

HELP SIMPLE, SIMPLE XML-FLASH Load Into Movie Clip
This is so stupid, my first dive into XML, with a company project - a tutorial/training piece which will require mjultiple screens with questions, etc.

Anwyay- I can get the XML loaded into the root, and it works pefectly, but I'd like to put things INTO a movie clip, so that each new screen or slide is just he movie clip advancing.

How the HELL do I target the movie clip? I even tried setting a NEW variable in teh main timeline once the XML was loaded, but the best I get is not the value from the XML, but the path (e.g. "level0title1")

Any help? I imagine it's a really stupid, easy question, but I can't find anythign ANYWHERE to answer it.

Simple Problem Neeeds Simple Answer
hey i figured one of u geniuses here could help me figure this out much faster than me fiddling around so here goes.

All I'm trying to do is have a button (which is loaded in an MC in _level6) allow the user to switch between languages on the website. To do this I figured all I would do is have it 2 scenes...one in English and the other in Chinese. When the user clicked the toggle button I would have it go to the current frame in _level0 but switch to Chinese scene.

Get it? basically i want it to switch between frames but remain on the same frame number. Here is the last piece of code I tried using, but nothing seems to work (this code is connected to the release of the toggle button)


Code:
_level0.gotoandplay("Chinese", _level0._currentframe)
Anybody got any idea what i need to do??

Thanks for your help!
Brad

Simple Question, Probable Simple Answer
still in my quest for new flash knowledge and being a "noobie" in the world of flash i would like help.

whats the easiest way to create a Button that upon rollover creates a text discription in a text box. just so i can give a description of what the button is going to lead to....

ohh and i will have multiple bittons on 1 frame and 1 designated box for all descriptions

thanx in advance

Simple Button Mouseover Effect - I Know It's Simple, Just Don't Know How To Do It
I know how to insert an MC into the OVER keyframe of a button so that it enlarges, but how do you make the button decrease to it's original state on mouseout? ie, so it tweens back to it's original state.

Thanks
G

Simple Button, Needs Simple Action Script
Hi there,

I have made button in flahs mx. The over state of this button contains a short movie clip. My prblem is that I would like the button to remain on the down state on release (ie. once the user has released the mous button)instead of just going back to the over state as it does at present. Ideally I would like the button to go back to the up state on a second click.

I have pulled most of my hair out trying to put together the right bits of action script that would help me do this but to no avail, and having no time to learn action script properly I don't think I'll get there anytime soon on my own. Can anyone help me, pretty, pretty please ~?

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