Moving A Movieclip Set Increments With Buttons
Hi all
I'm using Adobe Flash CS3 / ActionScript 2 to develop a site, the relevant part of which can be seen at http://www.pcmt.org/hidden/testsite/test.html
The black boxes underneath the 2x4 grid of icons are placeholder graphics for left and right arrows which move the icons above to the left and right.
The left and right buttons work, after a fashion, but I'm having difficulty controlling the motion.
As each button is pressed, I want to reveal one more layer of icons, and have the scrolling stop when the end of the list is reached. At the moment, one can use the buttons to scroll the icons off the screen.
Secondly, if the left / right buttons are clicked in very quick succession, the icons above do not display correctly - they're no longer centred in the mask above. Is it possible to have the buttons 'ignore' any clicks whilst the icons above are moving, thus ensuring that the icons always display correctly?
Finally, is it possible to have the left/right button disappear as appropriate when the left/right hand end of the menu is reached?
Here's the code I've been using to control the motion:
shirt_graphics._x=247;
shirt_graphics.onEnterFrame=function(){
cX=this._x;
difX=cX-XPos;
setProperty(this, _x, cX-(difX/2));
}
left_arrow.onRelease=function(){
XPos=cX+86;
}
right_arrow.onRelease=function(){
XPos=cX-86;
}
Any help would be greatly appreciated.
Thanks
Standard
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-29-2008, 10:04 PM
View Complete Forum Thread with Replies
Sponsored Links:
Moving A Movieclip In Constant Increments
Hello. I was wondering if there is a way to adapt this code I am using on a button.
Code:
on (press) {
bigscan1._y -= 4;
}
This code works fine on the button and moves the movieclip each time the button is pressed by the viewer. My problem is, I would like the viewer to be able to just hold the button down and the movieclip would constantly apply the _y -=4
Is it possible to adapt this script to make it constantly move while the viewer holds down the button? As it stands now, it only moves once when the viewer clicks the button. So in order to move the movieclip 8 pixels, the viewer would have to click the button twice. Thank you for any help you can give me on this!
Sincerely,
Greg
View Replies !
View Related
Moviing A Movieclip In Specified Pixel Increments
Hello,
I would like to move a movieclip in specified increments. IE - when you click a button the specified movieclip will move 5 pixels down. So if the center value of the movieclip is 0 it will then be set to 5 once the button is clicked. If you were to click this same button with the same code again then the center value would move to 10, etc...
The code I am using is as follows:
on (press) {
_root.services._y = _y + 5;
}
Is this the correct code to use for this action? I can't get it to work properly. Thanks in advance!
View Replies !
View Related
[CS3] Moving Movieclip With Buttons
Hi all
I'm using Adobe Flash CS3 / ActionScript 2 to develop a site, the relevant part of which can be seen at http://www.pcmt.org/hidden/testsite/test.html
The black boxes underneath the 2x4 grid of icons are placeholder graphics for left and right arrows which move the icons above to the left and right.
The left and right buttons work, after a fashion, but I'm having difficulty controlling the motion.
As each button is pressed, I want to reveal one more layer of icons, and have the scrolling stop when the end of the list is reached. At the moment, one can use the buttons to scroll the icons off the screen.
Secondly, if the left / right buttons are clicked in very quick succession, the icons above do not display correctly - they're no longer centred in the mask above. Is it possible to have the buttons 'ignore' any clicks whilst the icons above are moving, thus ensuring that the icons always display correctly?
Finally, is it possible to have the left/right button disappear as appropriate when the left/right hand end of the menu is reached?
Here's the code I've been using to control the motion:
shirt_graphics._x=247;
shirt_graphics.onEnterFrame=function(){
cX=this._x;
difX=cX-XPos;
setProperty(this, _x, cX-(difX/2));
}
left_arrow.onRelease=function(){
XPos=cX+86;
}
right_arrow.onRelease=function(){
XPos=cX-86;
}
Any help would be greatly appreciated.
Thanks
Standard
View Replies !
View Related
Moving A Movieclip With Buttons
Hi all
I'm using Adobe Flash CS3 / ActionScript 2 to develop a site, the relevant part of which can be seen at http://www.pcmt.org/hidden/testsite/test.html
The black boxes underneath the 2x4 grid of icons are placeholder graphics for left and right arrows which move the icons above to the left and right.
The left and right buttons work, after a fashion, but I'm having difficulty controlling the motion.
As each button is pressed, I want to reveal one more layer of icons, and have the scrolling stop when the end of the list is reached. At the moment, one can use the buttons to scroll the icons off the screen.
Secondly, if the left / right buttons are clicked in very quick succession, the icons above do not display correctly - they're no longer centred in the mask above. Is it possible to have the buttons 'ignore' any clicks whilst the icons above are moving, thus ensuring that the icons always display correctly?
Finally, is it possible to have the left/right button disappear as appropriate when the left/right hand end of the menu is reached?
Here's the code I've been using to control the motion:
shirt_graphics._x=247;
shirt_graphics.onEnterFrame=function(){
cX=this._x;
difX=cX-XPos;
setProperty(this, _x, cX-(difX/2));
}
left_arrow.onRelease=function(){
XPos=cX+86;
}
right_arrow.onRelease=function(){
XPos=cX-86;
}
Any help would be greatly appreciated.
Thanks
Standard
View Replies !
View Related
Buttons In A Moving Movieclip
Hi sorry to ask this as it is probably very easy.
I am trying to create a menu system for a web site in Flash MX 2004, it is going to be a series of coloured bars with a button on each which will take you to diiferent parts of the site.
Each bar is a movieclip, which has a button embed in it, this all works fine if the bars are left static, you can navigate ronud the site. However I would like the bars to slide in from the side of the screen. I can get the movement to work, but once I move the bars the buttons stop responding.
Any Ideas??
View Replies !
View Related
Buttons In A Moving Movieclip
Hi sorry to ask this as it is probably very easy.
I am trying to create a menu system for a web site in Flash MX 2004, it is going to be a series of coloured bars with a button on each which will take you to diiferent parts of the site.
Each bar is a movieclip, which has a button embed in it, this all works fine if the bars are left static, you can navigate ronud the site. However I would like the bars to slide in from the side of the screen. I can get the movement to work, but once I move the bars the buttons stop responding.
Any Ideas??
View Replies !
View Related
Moving An Embedded Movieclip To Another Parrent Movieclip.
First the heirachy.
Code:
|----(MC1)
|
(_root)-----|
|
|----(MC2)----(MC3)
When I click on MC3 I need it to create a duplicate of itself inside MC1 so that it looks like this:
Code:
|----(MC1)----(Copy of MC3)
|
(_root)-----|
|
|----(MC2)----(MC3)
I can't use .attachMovie() since I need the script to be duplicated also. So I need to use .duplicateMovieClip() and somehow move the duplicate to the
View Replies !
View Related
Name That Increments
I want to assign a value to a dynamic text box every time I press a button. I have 15 text boxes. I've named them box1, box2, box3, etc.
I have a button with code like this:
Code:
on(press) {
n++
_root.box[n]=somethingElseHere
}
What I'm wanting to happen is that every time the button is pressed the next box gets updated. This is not working. What am I doing wrong? Thanks.
View Replies !
View Related
How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}
Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?
View Replies !
View Related
How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}
Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?
View Replies !
View Related
Counting Increments
There seems to be alot of us working on pan/scroll of large images. Here is my approach and problem. My image pans left and right according to mouseclick on left or right arrow. My panning works fine but the problem is processing the increments as to when to stop. Here is the code:
on (press) {
currPos = getProperty(_root.mainground, _x);
currPos -= 50;
setProperty (_root.mainground, _x, currPos);
????
../:currPos = currPos;
if (currPos=-4600) {
gotoAndStop(2);
}
}
This action pans left (the right pan uses +) in increments of 50 per mouse click and that works fine. The problem starts where the ??? is. This part does not work but gives the general idea of the action to be performed.
When the increments of 50 reach a total of 4600 I want to advance to the next frame which has a black arrow that will not allow anymore panning in that direction. I have tried several approaches and none work. Any suggestions on the best way and code to perform the counting action.
Thanks in advance
pkw
View Replies !
View Related
Preloader With 10% Increments
Trying to create a preloader that has a mc which is of a rectangle divided into 9 parts. Each part represents 10% of the download. When all 9 blocks are on screen then 90% has loaded and when 100% has loaded the clip then moves on to the next part of the animation.
Already had some scripting worked out but doesn't seem to work as well as I'd hoped.
if (_root._framesloaded/_root._totalframes*100>=10) {
gotoAndPlay ("box_01");
} else {
gotoAndPlay ("box1pause");
}
So you can see that when frames loaded is 10% then the clip plays box_01. So when its 20% it plays box_02 or just pauses on it until its ready to move on.The code is the same for all of the steps except the final one that moves on to the main part of the movie.
Anyone got any ideas on how to help? I'd be bloody grateful if you can figure it out.
View Replies !
View Related
Variable Increments Anyone Know How This Is Done?
i have declared lots of variables like this -
=====================
code
=====================
onClipEvent (load) {
speed=3
speed1=5;
speed2=6;
speed3=-2;
speed4=0:
etc
======================
when my loop happens how do i increment the speed variable to the next one down??
i guess it's something olong the lines of -
=====================
code
=====================
speed=speed+1
=====================
pretty basic stuff but my actionscripting isn't up to scratch yet. I'd be most gratefull if someone can tell me
Thanks
View Replies !
View Related
Number Increments
Code:
on(press){
if(_root.MFD.num>3000){
_root.MFD.num==0;
}
_root.MFD.num +=100;
_root.MFD.bngo= (int(_root.MFD.num*.01))*100;
}
I have this on a button.
MFD is the name of a movie clip with num in it.
bngo is a text box with num in it.
num is always _00.
I have used similar code to this before. The only values that are acceptable are those between 0-3000 (rounded to whatever hundred).
I have everything working okay, when the user presses the button, the number increments by 100... but why won't it change to 0 when it gets to 3000?
and I have another button with the same but it should turn from 0 to 3000.
Am I missing something obvious?
Thanks for any help.
View Replies !
View Related
Zoom In And Out In Increments? Please Help
I have developed a map, and having much difficulty. I have created the overall windows like platform for viewing the map etc. But In terms of the map interactivity I am having problems.
My aim is to have a zoom function, what I was after was in increments of say : 50% view to start off, then 100%, 150%, 200%, 250% and so on, on click of a plus button. The minus would simple revert in the same increment form.
Also the ability to drag the map, obvoiusly using the startdrag and stop drag functionality.
Can anyone help me achieve this, any direction help would be ideal at this point as I am all out of answers.
T
View Replies !
View Related
[F8] Rotate In Increments - Help
Hey, first post and I'm stuck on something...
I'm trying to produce a disc that rotates 120 degrees everytime you hit a button. I'm using the tween class for the motion but once it's done its first movement of 120 I don't know how to go about getting it to do the next 120 degrees as it's defaulting back to zero.
Attached is the fla:
rotator.fla
And here's the actionscript:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();
prod01_btn.onRelease = function(){
new Tween(rotator_mc, "_rotation", Elastic.easeOut, 0, -120, 5, true);
};
This is probably easy and I am missing it big time so go easy on me!!
Thanks.
View Replies !
View Related
AS3 - Problems With Increments?
Last edited by John B. : 2008-03-20 at 08:05.
I have developed a calendar which will allow you to navigate to the last month and to the next month. The days of the month fall into place fine for the next month, but they don't fall into place correctly for the previous month. I think it could be the way that I am incrementing the previous month. I have included the complete as3 file along with the swf file in the zip file, so you can see the problem.
ActionScript Code:
public function getPreviousMonth(event:MouseEvent) {
minMonth = currentDate.month -=1;
month_txt.text = monthsOfYear[minMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear;
publishMonth();
for (i = 1; i < daysNo+1; i++) {
days_mc.removeChildAt(0);
}
publishDays();
}
View Replies !
View Related
Percentage Loader Going Up In Increments Of Ten....
Hi
I'm just making a percentage loader and when I publish it it works fine. However when I upload it, the percentage increase goes up in tens?
This is the code I've got....
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);
}
Any ideas?
Thanks
View Replies !
View Related
[F8] Sound Panning Increments
I cannot get my panning to change in increments (via a button). It just goes "suddenly left/right" and then won't return to "center".
I'm pretty sure my increments are set right but can't track the problem. Any help is greatly appreciated.
Here is the code for the "left pan":
Code:
onClipEvent (load) {
right = _x+50;
left = _x-50;
center = _x;
if (!_parent.balstatus) {
_parent.balstatus = _parent.MySound.getPan();
}
_parent.balstatus = "";
}
onClipEvent(mouseDown) {
if (this.hitTest(_root._xmouse,_root._ymouse)){
var balleftisPressed = true
updateAfterEvent();
}
}
onClipEvent(enterFrame){
if (balleftisPressed) {
if (_parent.balance != -50){
_parent.balancefill._yscale -= 1;
_parent.MySound.setPan((_x - left)* 2);
_parent.balance -= 1;
_parent.balstatus = _parent.balance;
}
}
updateAfterEvent();
}
onClipEvent(mouseUp) {
balleftisPressed = false;
updateAfterEvent();
}
Thanks for taking a second to look.
Kumba
View Replies !
View Related
Controlling MyMC_mc._x With 0.01 Increments
(I've read the Macromedia docs on errors with small numbers, but they don't explain this...I don't think)
Hello,
Still finding my legs ActionScript-wise...
Using an onFrame function I'm incrementing the values of ._x & ._y for a movie clip using myGrow() also scaling it up at the same time.
The increments are my
myMC_mc._x += 0.6;
myMC_mc._x += 0.06;
When I get to my end point (myCounter == 10 for example) I reverse the function by calling myShrink(), and check to see when myCounter = 0. Tracing the ._x & ._y values shows that the ._x & ._y vlaues have slipped out by a small margin??
When I replace these values with 0.5 & 0.05 or 0.005 & 0.00005 respectively the values stay constant without any slipping.
Any ideas why this is???
I can use 0.5 increments, it's fine, but I'd love to know the reason. The maths part of my brain is asleep, I'm sure it's something obvious
View Replies !
View Related
_xscale & _yscale Increments
Folks, I have a movie clip that I want the user to be able to scale up or down in increments of 10% by pressing the up and down buttons. I think I'm close, any help would be appreciated.
on (keyPress "<Up>") {
_root.myclip._xscale (110);
_root.myclip._yscale (110);
}
on (keyPress "<Down>") {
_root.myclip._xscale, (90);
_root.myclip._yscale, (90);
}
View Replies !
View Related
_xscale & _yscale Increments
Folks, I have a movie clip that I want the user to be able to scale up or down in increments of 10% by pressing the up and down buttons. I think I'm close, any help would be appreciated.
on (keyPress "<Up>") {
_root.myclip._xscale (110);
_root.myclip._yscale (110);
}
on (keyPress "<Down>") {
_root.myclip._xscale, (90);
_root.myclip._yscale, (90);
}
View Replies !
View Related
Questions About Storage On Variables And Increments...
Hi. I'm starting to use Flash MX, and I need to create a display window for a production line of a factory. The guys asked me to show 3 textboxes: 1 for the model number, 1 for the production goal of the day (15000 assembled units, for example), and 1 box for keeping track of how many units we have assembled.
I created the display grid, no problem. But I'm not so good with Actionscript yet. I created the 3 boxes, and validated the tab index for moving among the boxes, no biggie. The problem is:
a) I tried to store the inserted values on variables, but I'm not sure if they get stored properly. Maybe with the functions I used, the values get erased or something. Here's some code:
tbmodel.onChanged = function() {
_global.model = tbmodel.text;
trace(_global.modelo)//I put a trace to see if it works, but the letters are stored one by one?
}
b)Other issue. Another guy from production asked me to use the last textbox (or maybe a dynamic text) as a 0 number that adds 1 each time you press the <<ENTER>> key.
Any ideas??? Thanks 4 your time, guys!
View Replies !
View Related
Text Slideshow - Help With Creating Increments
Hello,
I am creating a random text slideshow from an XML document. The XML document includes a list of Band and Artist names. I need to randomize/shuffle the band/artist names and display them one by one like a slideshow. However, after three band/artist names have been listed, I need to display a static tag line. This process needs to repeat indefinetly. So for example, my slide show would display like so:
AC/DC, OutKast, Bruce Springsteen, We Play Everything, Ozzy Osbourne, Phil Collins, U2, We Play Everything,........
I have been able to do the following:
- Load the XML document
- Loop through the XML document
- Create an array of Band/Artist names
- Shuffle the array
I am now stuck on the following:
- Creating the loop to cycle through three names
- How to add the static tag line
- Repeating the loop, but starting on the next three band/artist names in the array
The last thing I have to do which I have a slight idea on how to achieve is the following:
- use setInterval to display the band/artist names in a dynamic text field.
Without further delay, here is my current AS:
Code:
artist_xml = new XML();
artist_xml.ignoreWhite = true;
artist_xml.onLoad = function(sucess) {
if (sucess) {
processArtist(artist_xml);
}
};
artist_xml.load('artist.xml');
function processArtist(xmlDoc_xml) {
var len = xmlDoc_xml.firstChild.childNodes.length;
var artistArray = new Array;
for (var n = 0; n<len; n++) {
artistArray.push(xmlDoc_xml.firstChild.childNodes[n].firstChild.firstChild.nodeValue);
}
Array.prototype.shuffle = function() {
for (var n=0; n < len; n++) {
var rand = Math.floor(Math.random()*len);
var temp = this[n];
this[n] = this[rand];
this[rand] = temp;
}
}
artistArray.shuffle();
//From here, I'm not sure on what to do. While the code below does work,
//it ultimately is not the desired result (this only works for the first three
//names, and does not cycle through the entire array
i = 0;
while(i++ < 3) {
trace("Bob Plays " + artistArray[i]);
}
}
With that, does anyone have ideas on how I can achieve the rest of my project?
View Replies !
View Related
Alternate Button Pressing Increments A Bar
Hey, long time no post.
I have recently started a new project, again and hit a stump. Im trying to make a mini game where you have to press two alternating buttons (x and z) to increment the bar. Now i started it, but it failed as pressing any button really fast incremented the bar. i used a _root.onEnterFrame = function() {
code, but im having troubles. So what i want to do is have the user press the x button, and then have to press the y button and the bar increases and they have to do this rapidly. If anybody could help i would be very thankful.
--binime--
View Replies !
View Related
OnKeyDown Increments Currentframe At Root Of Script
I'm having a bit of a problem. I've made something that increments the _root._currentframe, but it keeps adding 1 to the _currentframe when the playhead hits the frame that the script is on. I'm not sure why, but maybe someone can enlighten me. Just open a new fla and add a bunch of empty frames, then paste this script in one of them. Any suggestions?
Code:
stop();
_root.createTextField("textBox",_root.getNextHighestDepth(),6,60,134,20);
_root.onEnterFrame = function () {
textBox.text = _root._currentframe;
}
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyUp = function(){
switch(Key.getCode()){
case Key.SPACE:
trace(Key.getCode);
//_root.gotoAndStop(+1);
_root._currentframe++;
break;
case Key.LEFT:
if(_root._currentframe<=2){
_root._currentframe=2;
}
//_root._currentframe--;
_root.prevFrame();
break;
case Key.RIGHT:
//_root._currentframe++;
_root.nextFrame();
break;
}
};
Key.addListener(keyListener_obj);
View Replies !
View Related
Moving A Movieclip
i have 4 buttons, they are located next to each other, although not at equal intervals, their _x locations are:
A=30
B=80
C=110
D=190
i have another movieclip with an instance name of "dash". the original _x location of dash is 0.
here is what i need to do:
1. on rollover, of any of the buttons, "dash" needs to move to that button (example: i rollover C, "dash" should move to _x=110.)
2. on release, "dash" should stay above the selection.
3. on rolloff, if the button is not hit, "dash" should return to its previous location.
this needs to work between any of the buttons, A to D, C to A, etc.
thanks in advance for any help.
View Replies !
View Related
Moving Movieclip
How would I be able to hold down the left mouse button and move the movieclip until the button is released. I can get it to move, however, when I hold it down it carries out the operation once but doesn't continue to move when held down.
Sorry, im new to actionscript.
View Replies !
View Related
Moving A Movieclip
i want to know how to move a movie clip on the stage using buttons.
e.g. a button for left, button for right when the user presses these a movieclip in the background moves (movieclip moves right when left is pressed and left when right is pressed) if ya get what i mean!
so the user controls where they are looking on screen!
Ive got an idea for a project but need to know this before moving on!
Any help?
View Replies !
View Related
[F8] Moving A Movieclip
Hey there, I'm using Flash 8. Anyways, I'm having some issues with the code below. Right now the movie clip moves then plays halfway down. I don't want that. I want it to play, then move when I hit b1. So for example, when I hit b1, I want MC_Main to have already appeared, and played, then drop, and have MC_Photo move in, then when it's done moving, it can play, when MC_Main has dropped all the way. Am I on the right track or do I need to add some more code?
Let me know if that is confusing or not.
Again thanks for the help
PHP Code:
stop();
MC_Photo._visible = false;
MC_Resume._visible = false;
MC_Print._visible = false;
MC_Video._visible = false;
MC_GraphicD._visible = false;
MC_WebD._visible = false;
MC_Contact._visible = false;
MC_Main._visible = true;
b1.onRelease = function() {
MC_Photo._visible = true;
MC_Photo.play();
MC_Resume._visible = false;
MC_Resume.gotoAndStop(1);
MC_Main._visible = true;
MC_Main.gotoAndStop(1);
MC_WebD._visible = false;
MC_WebD.gotoAndStop(1);
MC_Video._visible = false;
MC_Video.gotoAndStop(1);
MC_Print._visible = false;
MC_Print.gotoAndStop(1);
MC_GraphicD._visible = false;
MC_GraphicD.gotoAndStop(1);
MC_Contact._visible = false;
MC_Contact.gotoAndStop(1);
//Movieclip GotoAndPlay Behavior
this.MC_Photo.gotoAndPlay("1");
//End Behavior
};
MC_Main.onEnterFrame = function() {
if (MC_Main._y < 550) {
this._y +=8;
}
};
b1.onRollOver = over;
b1.onRollOut = out;
b1.buttText.buttonText.text = "Photography";
function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(7);
}
View Replies !
View Related
Moving Movieclip With AS
Hi!
I'm quitre new with Flash and especially with AS. Allthought I have programmed another languages before. Well, I'm making simple animation, and I would like to move one symbol with action script. In my animation, ant runs to the left. Because this background must move to the right. Well, I have two problems. Firstly, how I can move backround symbol to the right? I tried something like:
earth.x+=4; and earth._x+=4;
after looking one example. However it won't work. Another problem is that earth's right side should appear from left when it is outside of stage's border so there don't appear white areas.
Example picture:
http://i10.tinypic.com/43gpbpg.png
As you can see, background appears from opposite side and follows itself. how I can do that?
Thank you very much! Help is appreciated
View Replies !
View Related
Moving Movieclip
What I'd like to do is have a movieclip slide into position when the user rolls over it and slide back when the user rolls off of it. This movieclip would house buttons that I could then click to navigate to different parts of my site.
When using the onRollOut action and onRollOut action for this movieclip I then lose the ability to target the buttons inside of this movieclip using an onPress function. From what I've read, it has something to do with button event capturing. Does anyone have code that will allow for a work around?
Thank you...
View Replies !
View Related
Moving Movieclip
What I'd like to do is have a movieclip slide into position when the user rolls over it and slide back when the user rolls off of it. This movieclip would house buttons that I could then click to navigate to different parts of my site.
When using the onRollOut action and onRollOut action for this movieclip I then lose the ability to target the buttons inside of this movieclip using an onPress function. From what I've read, it has something to do with button event capturing. Does anyone have code that will allow for a work around?
Thank you...
View Replies !
View Related
Movieclip X And Y While Moving.
Yellow again, I got a quick question , if I want to make a movieclip (for the sake of clarity we will call it mc1) match another movieclip's (mc2) x and y coordinates while mc2 is moving how would i do that?
Anyhelp is much appreciated, thanks in advance legion
View Replies !
View Related
Is Movieclip Moving?
im trying to make a function that tells me if my movieclip is moving
Code:
var thisPosition:Vector = new Vector(this.px,this.py);
if(thisPosition.x == lastPosition.x && thisPosition.y == lastPosition.y){
//movieclip isnt moving!
}else{
//inMotion = true;
}
lastPosition = new Vector(this.px,this.py);
but it doesnt work! how come? im using as3 btw
View Replies !
View Related
Moving A MovieClip
Question, I have a Movie Clip say McA and I insert another Mc called B into McA. McA has the registration point dead center. Therefore McB I believe has its registration point at the top left right. Therefore, how do I move the McB to be exactly over McA.
Assumption both Movie Clips are the same size, height=39, width=74. Also McB has a image in it. I tried using the _x & _y properties to align McB with McA but McB won't move at all.
I'm I missing something?
View Replies !
View Related
Movieclip X And Y While Moving.
Yellow again, I got a quick question , if I want to make a movieclip (for the sake of clarity we will call it mc1) match another movieclip's (mc2) x and y coordinates while mc2 is moving how would i do that?
Anyhelp is much appreciated, thanks in advance legion
View Replies !
View Related
Moving A Movieclip?
Lets say I have a circle mc on the root level, and on the same level, another mc thats a box..is it possible to duplicate the circle mc, and have it be a child of the box mc? im having a real hard time with this, can anyone help?
View Replies !
View Related
Movieclip Rollover Effect Disables Internal Movieclip Buttons
Is it possible to have a movieclip rollover effect with another movieclip inside of it that is able to be clicked and do what it's scripted to do?
Let me try to get specific...
Movieclip 1 -- Has www.kirupa.com/developer/mx2004/button_effect.htm applied
Inside of Movieclip 1 --> Buttons that appear visible when you rollover the menu (it comes out of eases into view)
These buttons inside are not being allowed to be pushed because from what I can gather, the complex rollover is not allowing anything to be activated except the rollover effect.
So here's a diagram:
Rollover Movieclip 1 --> Eases it's bottom part up revealing 4 buttons --> These buttons when clicked are supposed to do an action --> Buttons cannot be activated for some unknown reason.
Can anyone help me out? I'm out of ideas after working on this for the past hour or so. If you need any extra info or materials, let me know; I'm sitting right here working on this problem haha.
-Indecisive
View Replies !
View Related
Moving Movieclip Levels
Can anyone help me out there?
I have six drag and drop buttons (button within a movieclip)all on the same frame. I need to know if there is a way to instantly upon pressing the button, to bring that button to the front so it will overlap the other buttons. (and vice versa if I were to click on any of the other drag and drops)
Right now the movieclips are layered (the ctrl, "down arrow" key, kind of layered)
any help would be really really appreciated.
Thanks
View Replies !
View Related
Moving Movieclip With Actionscript
I have a movieclip that sort of follows the cursor around. I want to have a button that you can click to stop it from following the cursor. When you click on this button I want to be able to take the movie clip from wherever it's at and ease it to a certain point (coordinate) in the movie. What would the actionscript be on the release of that button?
Thank you for any help,
Kyle
View Replies !
View Related
Moving A Movieclip Across The Stage
The script below moves a movie clip from the bottom to the top of the screen:
onClipEvent(load) {
// these values are initialised when this movieclip first loads
//maxY is the position at which we want to reset the _y position of the movieclip
maxY = 0;
//startY is set to the initial position of the movieclip
startY = this._y;
}
//the following script runs all the time (Ie: every frame even if the movie is stopped)
onClipEvent(enterframe) {
if (this._y >= maxY) {
// if the Y position of the movieclip is greater than the maximum required position
// then we move the movieclip by adding the value of 'speed' divided by our constant
// (we need to divide by a constant otherwise it will be too fast!
this._y -= _root.speed/_root.constant;
} else {
// when the movieclip reaches the max desired position we reset the Y pos to the initial value
this._y = startY;
}
}
I would like to move this movie clip from the bottom right corner to the left, then from the bottom to the top, and finally from the top left to the right corner all in one continous movement.
Can anybody help me please?
View Replies !
View Related
Help Moving The X Axis Of A Movieclip
I was wondering if anybody could help me or knows of a tutorial that shows how to move the x axis of a movieclip.
I am almost finished with a site and I have five main buttons at the top- Home - About - Services - Portfolio - Contact. Then I have placed a movieclip in the center of the stage with an image inside that has a width of 3740. This leaves 747 for each section. I need it to move over 747 for each section plus or minus and I know that from Home to Contact it will have to move 2992 but I think I can figure all that out as soon as I just figure out how to get it to move and set a speed.
Thanks in advance.
View Replies !
View Related
|