Tween Action Script Trouble
i need to make a tween in flash that repeats its self when it finishes. it needs to be 1 frame and be in action script 2.0 i have managed to make the tween but it wont play again.Could any one give me and handThanksStupid Saint
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-14-2008, 03:07 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
_x Tween Trouble
I am unable to tween into a specific position. Here is the code that I am using.
if (_root.arrow._x>330) {
_root.arrow._x-=70;
gotoAndPlay("loop");
} else{
gotoAndStop(1);
}
When I replace "-=70" with "--" I can hit the exact spot that I am going for, but it does not move fast enough.
Any suggestions would be greatly appreciated.
Thanks
Multiple Tween Trouble
Ok are you sopposed to have more then 1 dif. kind of tweens on 1 layer....or are u sopposed to make a seperate layer 4 a seperate tween
thx alot 4 the help
this ? is bothering me
Fade In Tween Trouble...
maybe i'm completely crazy... i'm trying to tween a mc symbol... just a simple alpha fade... on the main timeline of a swf... he symbol is made of dynamic text embeded... but of two different text boxes... converted to grapic symbols... on two different layers... in the mc symbol... is there something wrong with me...? it wont tween... i've tried it with one layer... i've tried it grouping them... i need the fonts to be two different sizes in the one symbol...
help... it's probably something silly...
[FCS3] Tween Trouble In CS3
My Flash experience is in using Flash8, and I'm currently using CS3 for the first time. I am however using AS2.0, not 3.0.
I'm using several motion tweens between various keyframes in a layer of a movieclip. Each tween is from a keyframe with a symbol instance set at color: Alpha, 0% and the same symbol with color: Alpha, 100%. These appear to be functioning properly. Below that layer I have a layer with almost identical "static" symbols. The intended effect being part of the swf "fades in."
However, by the second frame as the alpha starts to tween in, the entire image (including the normal static layer) is washed out as if the tween layer has 100% opacity over the static fill layer.
I've done the exact same thing in the past using Flash8, so maybe I'm just forgetting something. Thanks for any help!
Tween Class Trouble
An swf is worth a thousand words, so....
Please go to http://www.datapixel.eu/datapixel.htm
and watch yourself. When you click on "Apri Menu" (Open Menu in english) an animation made with the Tween class shows.
It should enlarge the green panel in order to show the buttons. And IT DOES! .... sometimes.
Instead sometimes the animation stops prematurely and the menu is not correctly viewed. Do you know what's happening?
Thanks.
Trouble With The Tween Class
I'm having trouble with this code, it's for tweening Thumbnails in a photo gallery application I'm building:
Code:
var tween:Tween = new Tween(Thumbnails[Thumbnails.cur_thumbnail], "_alpha", mx.transitions.easing.Strong.easeIn, 40, 100, 1, true);
Thumbnails.cur_thumbnail = new_thumbnail;
What happens is while the tween variable is tweening the value of Thumbnails.cur_thumbnail changes therefore cutting off the tween before it gets started or at least I'm assuming this is what's happening.
How do I get around this? Thanks.
Tween Class Trouble
Well, firstly, excuse my poor english... I guess its not so good, but I hope you can understand me.
Well, I have imported the tween class at my .fla file with:
-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
-------
as everywhere says it must be done. Later, I use:
-------
ROLLOVER:
var tw:Tween=new Tween(plano_mc, "_xscale", mx.transitions.easing.Elastic.easeOut,40, 100, 40, false);
var tw2:Tween=new Tween(plano_mc, "_yscale", mx.transitions.easing.Elastic.easeOut,40, 100, 50, false);
-------
inside a function that i call on the rollover method for the movieClip I want to tween.
The trouble comes in the rollOut method, where I have this code:
-------
ROLLOUT:
var tw:Tween=new Tween(plano_mc, "_xscale", mx.transitions.easing.Elastic.easeOut, 100,40, 1, true);
var tw2:Tween=new Tween(plano_mc, "_yscale", mx.transitions.easing.Elastic.easeOut, 100,40, 1, true);
-------
After the user rolls out, and even after the rollOut tween is well done, it resizes to the 100%, even if I'm out of the hitArea for the rollOver. All this instead of staying at the 40% of _xscale and _yscale, that is what I wanted the class to do (you can see it in the parameters of the tween).
It only happens in the rollOut method, because the rollOver doesn't get resized after is called as well as the rollOut... It should be logical if it should happen at both methods, but it just happens at RollOut, and even, each time I rollOut, is just one (or both sometimes) property which gets resized (sometimes the _yscale, other times the _xscale....). Is there any explanation for this???
I want to erase this error, that I can't find why happens. My only explanation is that Robert Penner did a bad class, but I don't really trust it because he is a Flash master and I'm just a beginner, so, please
pleeeeeaaaase!, anybody help me!
Thank you very much!
Tween Class Trouble
I have 2 tweens. I want my first one to be around 50% completed to start my second one. How do I do that ?
Code:
var Tween_right:Tween = new Tween(_root.mc_holder.mc_backgroundBlue, "_x", Strong.easeOut, 0, 525, 1, true);
var AlphaUp:Tween = new Tween(obj, "_alpha", Regular.easeOut, 0, 100, 1, true);
AlphaUp.stop();
Trouble With HitTestPoint And Tween
Hi guys,
I'm having a trouble with hitTestPoint and tween. Well, if you look at the code you will understand what I am trying to archive here.
---------------------
var action:Tween;
target01.alpha = 0.6;
target01.addEventListener(Event.ENTER_FRAME, transition01);
function transition01(event:Event):void {
if (target01.hitTestPoint(mouseX, mouseY, true)) {
action = new Tween(target01, "alpha", Strong.easeOut,0.6, 1, 1, true);
} else {
action = new Tween(target01, "alpha", Strong.easeOut,1, 0.6, 1, true);
}
}
---------------------
Yes, that's right. I'm trying to make the movie clip 'target01' to fade in once the mouse pointer roll-overs, and fades out when roll-out. But tween actions don't work...
Yes, I did MouseEvents instead, but it is not the way I want it.. Please help me outta here guys.
Trouble With A Shape Tween
Howdy guys,
I got this problem with a shape tween in my project. Its basically a CBt type of deal. But the problem is when u click on a button and go to the page, a shape tween of a semi-transparent box betting bigger is supposed to happen, it is also a movie clip. It happens inside of it. It happens in the flash file, but when I export it it goes all wierd. The box is supposed to come from the top left and go to the right bottom. But when it plays it only shows the right side line.
Are both the timelines supposed to be the same amount. There both 10 frames. Any kind of help will be greatly appericated.
thanks
Tween Class Trouble
I don't use Tween class often, so don't scold me if this is an obvious question.
When I set up a simple Tween, it works if I assign a specific object's instance name as the object to tween. But when doing it inside a for loop, it doesn't work. Yet everything else within the for loop works. I've tested every variable, and it's the object name that doesn't work. Here is a simplified version of the code. Someone please tell me what I've done wrong.
Attach Code
import mx.transitions.Tween;
import mx.transitions.easing.*;
for (var k:Number = 1; k<15; k++) {
var dakine = this["letter"+k];
dakine.onPress = function() {
this._xscale = this._yscale=90;
this.startX = this._x;
this.startY = this._y;
startDrag(this);
};
dakine.onRelease = dakine.onReleaseOutside=function () {
stopDrag();
this._xscale = this._yscale=100;
var letterUp:Tween = new Tween(this, "_x", Bounce.easeOut, this._x, this.startX, 2000);
};
}
Still Having Trouble W/ Basic Color Tween
ok.
i have flash mx
frame one i create a circele with one color
click on frame 10, cpress f6(to create an identical keyframe to frame one, right)
by doing this the new objest is highlighted so i go to the properties window and change the color....
next i click on any frame between 1 and 10 and creat a motion tween from insert menu..
it still does not work.
the motion tween is dotted ... i know its supposed to be a solid line.
if i click on tframe 10 and create tween it change the objects to the same color.... what in tarnations is goin on here?!
please help.
thank you
Having Trouble With Tween Navigation (New To Flash)
http://douglas.mackenzie.natcoll.net...lash/index.swf
http://douglas.mackenzie.natcoll.net...lash/index.fla
is the link to the flash file.
The problem I am having is that it only tweens once. I wanted to be able to go back and forth - It just doesn't seem to respond after the first click.
Also it always goes the same way no matter where it's clicked. Can anyone work this out?
If anyone has time to read over this code it would be greatly appreciated.
Thanks
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var xTween:Tween;
var yTween:Tween;
var castMc:cast = new cast;
addChild(castMc);
castMc.x = -580;
castMc.y = 145;
//castMc.buttonMode = true;
var trailerMc:trailer = new trailer;
addChild(trailerMc);
trailerMc.x = 120;
trailerMc.y = 145;
//trailerMc.buttonMode = true;
var datesMc:dates = new dates;
addChild(datesMc);
datesMc.x = 820;
datesMc.y = 145;
//datesMc.buttonMode = true;
castMc.addEventListener(MouseEvent.CLICK, navigate);
trailerMc.addEventListener(MouseEvent.CLICK, navigate);
datesMc.addEventListener(MouseEvent.CLICK, navigate);
var castXposFarLeft:Number = -1280;
var castYposFarLeft:Number = 145;
var castXposLeft:Number = -580;
var castYposLeft:Number = 145;
var castXposMiddle:Number = 120;
var castYposMiddle:Number = 145;
var trailerXposLeft:Number = -580;
var trailerYposLeft:Number = 145;
var trailerXposMiddle:Number = 120;
var trailerYposMiddle:Number = 145;
var trailerXposRight:Number = 820;
var trailerYposRight:Number = 145;
var datesXposFarRight:Number = 1280;
var datesYposFarRight:Number = 145;
var datesXposRight:Number = 820;
var datesYposRight:Number = 145;
var datesXposMiddle:Number = 120;
var datesYposMiddle:Number = 145;
function navigate(event:MouseEvent):void
{
if(event.currentTarget.name == "castMc")
{
setTweenCast(castXposMiddle, castYposMiddle);
setTweenTrailer(trailerXposRight, trailerYposRight);
setTweenDates(datesXposFarRight, datesYposFarRight);
}
else if(event.currentTarget.name == "trailerMc")
{
setTweenCast(castXposLeft, castYposLeft);
setTweenTrailer(trailerXposMiddle, trailerYposMiddle);
setTweenDates(datesXposRight, datesYposRight);
}
else(event.currentTarget.name == "datesMc")
{
setTweenCast(castXposFarLeft, castYposFarLeft);
setTweenTrailer(trailerXposLeft, trailerYposLeft);
setTweenDates(datesXposMiddle, datesYposMiddle);
}
//trace(event.currentTarget.name);
}
function setTweenDates(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(datesMc, "x", Strong.easeOut, datesMc.x, 0, 4, true);
yTween = new Tween(datesMc, "y", Strong.easeOut, datesMc.y, 145, 4, true);
xTween.begin = datesMc.x;
yTween.begin = datesMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
function setTweenCast(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(castMc, "x", Strong.easeOut, castMc.x, 0, 4, true);
yTween = new Tween(castMc, "y", Strong.easeOut, castMc.y, 145, 4, true);
xTween.begin = castMc.x;
yTween.begin = castMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
function setTweenTrailer(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(trailerMc, "x", Strong.easeOut, trailerMc.x, 0, 4, true);
yTween = new Tween(trailerMc, "y", Strong.easeOut, trailerMc.y, 145, 4, true);
xTween.begin = trailerMc.x;
yTween.begin = trailerMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
Trouble With 1st Kirupa Flash 8 Tween Tutorial
Hi,
I'm on a Mac and a Flash MX 2004 user. I attempted to do Kirupa's very basic animation tweening tutorial to get myself going with Flash 8, but I cannot get it to work.
The motion works fine, but when I introduced the alpha part, it started behaving erratically. It just won't fade IN.
I am familiar and comfortable with animation tweens involving motion and fades in MX 2004...
I tried just doing a fade in for a single letter, not even inside a movie clip (as the tutorial has you do), and didn't use motion -- just a fade in: Can't even get that to work.
Any ideas? Some silly thing I overlooked??
Thanks!
SL
Tween Class Trouble (based On The Tutorial)
Hey hey hey.
I was gonna have a fiddle with this tutorial http://www.kirupa.com/developer/actionscript/tween.htm
so I downloaded, unzipped, saved and published it. I didn't have a chance to fiddle with anything and it's already broken! I get this:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 5: There is no property with the name 'onMotionFinished'.
xScaleT.onMotionFinished = function() {
**Error** Scene=Scene 1, layer=actions, frame=1:Line 8: There is no property with the name 'onMotionFinished'.
xPosT.onMotionFinished = function() {
Total ActionScript Errors: 2 Reported Errors: 2
Any ideas why guys? Cheers in advance.
<"))))><
Edit: MX04 by the way.
Scope Trouble... Unregister/ Remove Object / Tween ?
Hi,
I hope somebody can help with the following problem.
I'm trying to make a powerpoint kind of projector:
- Main flash movie: works as a container to load different flash files.
reacts on the left and right arrow buttons to go to the next or previous movie, which is loaded in a movieClip.
- Several external swf files all exported from the same: slide.fla only adjusting xml node settings make the differences in text and pictures.
This works, but after loading into the container I use to show the images the tween of my images gets messed up. (Not in the first loaded movie, but sure after around the third)
Please can anybody look at my code and tell me what could be the problem?
I'm sure it has to do with the scope after loading into the container.fla, and all the objects having the same name, for the submovies. (exported from the same .fla)
Do I have to unregister/ remove these objects after usage - I think this might be it, but don't know how.
In the container.fla I already set:
clipLoader_mc._lockroot = true;
but this doesn't solve the problem.
Code:
/// **************************** ///
/// START TWEEN METHODS FOR SCREENS ///
/// **************************** ///
var mcl_obj:Object = new Object();
mcl_obj.onLoadInit = function(target_mc:MovieClip):Void {
target_mc._width = 500;
target_mc._height = 395;
target_mc._x = 500;
var distance:Number = 5;
var angleInDegrees:Number = 45;
var color:Number = 0x000000;
var alpha:Number = 75;
var blurX:Number = 7;
var blurY:Number = 7;
var strength:Number = 1;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;
var hideObject:Boolean = false;
var filter:DropShadowFilter = new DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject);
var filterArray:Array = new Array();
filterArray.push(filter);
target_mc.filters = filterArray;
var tween_target:Object = new Tween(target_mc, "_y", Back.easeInOut, Stage.height, 300, 1, true);
tween_target.onMotionFinished = function() {
intervalClearScreenId = setInterval(ClearScreen, 8000, counter);
};
screenCounter++;
//initiated on top of the page.
};
function ClearScreen():Void {
var tween_screen:Object = new Tween(mover_mc, "_x", Strong.easeInOut, mover_mc._x, 1250, 1, true);
tween_screen.onMotionFinished = function() {
if (screenCounter<screenMaxCount) {
ShowScreens();
} else {
screenCounter = 0;
ShowScreens();
}
clearInterval(intervalClearScreenId);
};
}
ShowScreens = function ():Void {
// Create a movie clip instance.
this.createEmptyMovieClip("mover_mc", getNextHighestDepth());
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mcl_obj);
// Load an image into the movie clip
img_mcl.loadClip(imageArray[screenCounter], mover_mc);
};
//load XML voor screens on the left:
function loadScreensXML(loaded) {
if (loaded) {
_rootNode = this.firstChild.childNodes[imageNodeNr].childNodes[0];
trace(_rootNode);
total = _rootNode.childNodes.length;
for (i=0; i<total; i++) {
//add images to imageArray:
imageArray[i] = _rootNode.childNodes[i].firstChild.nodeValue;
}
screenMaxCount = imageArray.length;
//initiated on top of the page
//Show the screens:
ShowScreens();
} else {
content = "file not loaded!";
}
}
xmlScreens = new XML();
xmlScreens.ignoreWhite = true;
xmlScreens.onLoad = loadScreensXML;
xmlScreens.load(urlImagesXML);
/// **************************** ///
/// END TWEEN METHODS FOR SCREENS ///
/// **************************** ///
I'm trying all day already to solve this so please can anybody help?
Thanks in advance!
Key Action Trouble
I have a .swf on a web page. In the .swf there is a MC with the following code:
ActionScript Code:
onClipEvent (enterFrame) {
if (Key.isDown(Key.CONTROL) && Key.isDown(Key.SHIFT) && Key.isDown(67)) {
this._visible = true;
}
}
Yet, when you open the page you have to click on the .swf for the code to work. Any ideas?
Thanks,
Adrenaline
Action Script Tween
Hello All,
I have a mc I need to move across my main stage slowly, it would take to many frames to do it with a conventional motion tween. I know it can be done with action script, but have no idea where to start.
If someone could direct me to a tutorial or a script to study I would be very thankful.
Action Script Tween
Hi
Iam new to Flash using MX 2004 cs2
any one can help me how to use different tween in action script.
thanks
regards
Mamo
Action Script Over Tween
I currently have a motion tween that is rotating an object 360 degrees from frame 10 to 45.
I am trying to write a script that either rotates the shape cw or ccw. I set a global variable on frame 1 and my actionscript code is simple:
Code:
if (_global.rotation == "cw"){
nextFrame();
}
else{
prevFrame();
}
I have conditionals on frames 10 and 45 to loop to the appropriate frame as well.
My problems is that the code that is posted above only works on frame 10. If I click on frame 35 (for example) and go to the actions, it shows it as the actions for 10 and doesn't actually apply to the whole tween.
If anyone could help me out to how I can get my code applied to the entire tween without using keyframes on every frame (which freezes the motion), I would really like to know how to do it.
Thanks in advance.
Tween Or Action Script
I have a movie which I use 8 times at once on my stage. The movie is a simple graphic that moves from a-b. I have done this animation using AS. The trouble is my home comp (PII400, 256meg) jitters quite badly on this part of my main movie.
Is this the best way to do things or is it better (less processor usage and smaller file size) to use a tween?
monkey
Tween With Action Script
how do i make a button trigger a movie clip that targets specific coords?
I'm building a map and when a button is click it goes to a defined point.
right now it jumps to the coords, but i'd much rather it smoothly move instead.
the other thing is that i would like it to move from whatever point it is currently at.
i've attached an example.
thanks for any help.
Basic Action Tween
hi there.
i need to learn how to do a basic action tween in actionscript 2.
I can only find tutorials on AS3 ones or AS2 ones with easing, i dont want easing.
i want it so when someone clicks somewhere on the stage the "character" moves to the position that was clicked.
thanks!
Tween With Action Script
how do i make a button trigger a movie clip that targets specific coords?
I'm building a map and when a button is click it goes to a defined point.
right now it jumps to the coords, but i'd much rather it smoothly move instead.
the other thing is that i would like it to move from whatever point it is currently at.
i've attached an example.
thanks for any help.
Button Action Trouble...
when I give a button an action such as "on press, go to and play frame x" it goes to the first frame of my movie and loops back to the frame with the button, instead of going to 'frame x' and playing the embedded movie clip. If I tell it to go to 'the next frame and play' it works... the only problem is that I'm making a webpage with several buttons, each supposed to go to a certain frame and play different movie clips. I've tried not using clips (keyframing all animation in the main scene or other scenes), I've tried two different versions of Flash, I've tried labeling the keyframes instead of using their numerical values... I'm pulling out my hair here... If anyone can help me out, I'd really appreciate it.
I Bet Even The Best Action Scripters Have Trouble With This One
Im dynamically importing SWF files into my movie at runtime and I need to know the stage size the imported file was created on.
The information must be in the swf file because it knows how big to make a movie when placed in html ( ie its not cropped )
So does anyone know if the actionscript exists to discover this?
Cris.
Button Action Trouble
Hello all,
I tried posting this thread in the newbie forum, but got feedback that didn't realy work. This is probably a simple actionscript, but I have been having trouble making it work. My trouble is with getting a .PDF file to open from a file folder using a button. Basically the GetURL actionscript tries to open via the internet, I am assuming the that is what "GetURL" does. Basically I am placing my site on a CD so that people can access it without going online. The "GetURL" works fine for my online site, but does not work for the CD version. This is my basic file structure. My .swf is in the "main" folder and my .PDF's are in the "printmedia" folder which resides in my "main" folder. Please help with the correct action script to make this work. Also, can anyone tell me how to make an .swf autorun from a cd when it is placed in the drive?
Action Script Trouble
hey everyone..Ok my situation is that I'm having trouble with the actionscript in a movie to load another movieclip when a button is clicked.
Now orginally the buttons were kept on the main stage of the movie but I decided to put them inside of an "MC" to have them fade-in. Now the actionscript that I have is...
stop();
but1.onRelease = function() {
// set a variable that stores the next external movie to be loaded
nextMovie = "flash/content1.swf";
// tell the cover mc to play its closing animation
cover.gotoAndPlay("close");
};
but2.onRelease = function() {
nextMovie = "flash/content2.swf";
cover.gotoAndPlay("close");
};
but3.onRelease = function() {
nextMovie = "flash/content3.swf";
cover.gotoAndPlay("close");
};
The button is in an an MC named "foldmenuclip". How can I tell that button to call on the "MC" that I want to load inside the current movie?
Any suggestion?
Action Script Trouble
I have 3 buttons (orginally 7) on the stage.
Each button has it's own animation for example:
If button2 is clicked, an arrow turn 30 degrees, and if button 3 is clicked, the script tells it go to it's closing animation and goes back to it's original state WHILE AT THE SAME TIME button 3 arrow turns 30 degrees.
I have uploaded a sample in Flash MX format.
I'm trying to figure out why the buttons aren't working the way they should. The script seems ok but I know I'm missing something. Each "buttonclip" has a layer called "BUTTON", you will find the script there.
Hope someone can help
[CS3] Trouble With Action Script..
I am creating a flash video, which will stream from a media server. I have created a new flash video and imported the video to the stage (making sure to set the source as the address out on the web). I have also given this video an instance name "myVideo". When someone opens this web page, it will show a preview image for a few seconds until the video begins to stream. I have created a "poster" if you will, and set it on top of the video. After the video is completed, I have placed another one of these "posters" on top for the user to see once the video is finished playing. I have named the two posters, "PosterFrame" with an instance name of "myPoster" and "PosterFrame2" with an instance name of "myPoster2" When I test the flash video out, mind you the autoplay is set to true, the preview image is shown for a moment and then the video plays as I want it to. Upon completion of the streaming video, the "posterframe" I created appears for a brief moment, and then disappears for approx 30secs before becoming visible on the screen again. I would greatly appreciate any help and/or suggestions anyone can offer me. The actionscripting I am using is listed below:
import fl.video.VideoEvent;
function showPosterFrame(event:Event):void {
myPoster.visible = true;
}
function showPosterFrame2(event:Event):void {
myPoster2.visible = true;
}
function hidePosterFrame(event:Event):void {
myPoster.visible = false;
}
function hidePosterFrame2(event:Event):void {
myPoster2.visible = false;
}
function playMovie(event:MouseEvent):void {
myVideo.play();
}
myPoster.addEventListener(MouseEvent.CLICK, playMovie);
myVideo.addEventListener(VideoEvent.PLAYING_STATE_ ENTERED, hidePosterFrame);
myVideo.addEventListener(VideoEvent.PLAYING_STATE_ ENTERED, hidePosterFrame2);
myVideo.addEventListener(VideoEvent.COMPLETE, showPosterFrame);
Action Script Trouble
I have 7 buttons on the stage.
Each button has it's own animation for example:
If button2 is clicked, an arrow turn 30 degrees, and if button3 is clicked, the script tells it go to it's closing animation and goes back to it's original state WHILE AT THE SAME TIME button3 arrow turns 30 degrees.
I have uploaded a sample in Flash MX format.
After a while if you click on a certain button the other button that is active remains active and doesn't close OR when a button is clicked it activates a different button to play it arrow animation. Well you'll see in the file....
Each "buttonclip" has a layer called "BUTTON", you will find the script there.
Hope someone can help
Having Trouble With The Action Script For This...
I went and did this tutorial:
http://www.kirupa.com/developer/flash8/slidingMenu.htm
But when I test my movie, nothing works right. I'm using Flash MX.
The source file is located here -- can someone please look at it and help me out?
http://www.crystalcleardesign.com/mi...neous/test.fla
I really appreciate it, I'm new to ActionScripting and I'm using this for my final project in school.
Trouble With Action Scripting
Unfortunately I am forced to do something with Flash. I am fairly new to flashMX, although I've used flash 5 before. I find Action scripting more difficult that my C++ coding! Ahh I hate it, I wish i could just use Director! Anyway. I was trying to do the drag and drop dressup game when I discovered that my onClipEvent (mouseDown) returns true no matter where I click! I just want to be able to click on my movieClip and somethign happens, not click anywhere in the fricken movie. Geez, why is it that Director Lingo is so much more powerfuly yet its less confusing?
Action Script Trouble
Hey Folks.
I'm currently working on a school presentation and experience some action script troubles..
I'm trying to use Flashstar's Navslide2 Menu for my purposes.
They used the Menu to load other websites,
well I want it to load other frames.
Here are, (what I believe are essential) the
two parts that I have to edit and how I edited them.
The first object is a movieclip, and the other a button.
..........................
original movie-clip:
ActionScript Code:
onClipEvent (load) {
url ="http://wwww.flashstar.de";
}
what I did with it:
ActionScript Code:
onClipEvent (load) {
frame ="15";
}
--------------------
original button:
ActionScript Code:
on (release) {
getURL(url);
}
my edit attempt
ActionScript Code:
on (release) {
gotoAndPlay(frame);
}
-----------------
Unfortunately it doesn't work at all! :/
If I didn't make myself clear enough you might want to download the original Flashstar files:
http://flashstar.de/tutlist/redirect...fsnavmenu3.zip
Or have a look at the real thing: http://flashstar.de/fla/fsnavmenu3.swf
Well I hope anybody's able to help me!
It's really appreciated and very urgent!
Thx!
Exter
Simple Action Script Tween
Okay folks, I'm missing something here. This is supposed to be a simple little tween. I'm setting the y position of the movie clip instance with a var set in the first frame. What's going on?
My fla is at:
http://www.aerissolutions.com/flash/simple_as_tween.fla
Any help would be much appreciated.
-C
Collision Detection With An Action Tween
Hey.. alright so what I did was made an object and added a tween to it. I wrote in my code that after an object collides with the object, it moves to frame 2:
ActionScript Code:
bricks[i].gotoAndPlay(2);
and frame 2 is the tween it shows a star falling down to the bottom of the screen. At the bottom of the screen I have a paddle:
ActionScript Code:
if(starRect.bottom >=paddlezRect.top){
if(starRect.right>paddlezRect.left){
if(starRect.left<paddlezRect.right){
gameScore+= pointsForHit;
showGameScore();
The problem is that I can't make a Rectangle around the object in the second frame of the original movie clip. I doubt that there is a way to make collision detection on the 2nd frame but if anyone wants to enlighten me go for it. I'll attach that .fla and .as files to this forum.
Action Script 2 Motion Tween
I have a flash file with a vertical menu inside a movie clip. I'm trying to setup a motion tween to move a pointer (small triangle in a movie clip) to the button that was just clicked. I've looked and looked that this thing and can't figure out what I'm doing wrong.
I would really, really appreciate any help to get this thing working.
I have the full file uploaded if anyone wants to look at my crappy amateur work and tell me what silly thing I'm missing:
www (dot) pacificatechnolgies (dot) net (slash) temp.fla
I'm using flash 8 pro on a dual g5 mac.
I would REALLY appreciate some help. I've made a huge effort to get this simple thing working and am falling on my face. I'd learn a lot if someone could help me fix it and show me what I am doing wrong.
Here is the code I'm using in the first frame of the scene 1 timeline (only one scene in the flash)
import mx.transitions.Tween;
import mx.transitions.easing.*;
// var pointerPos:Array = [37.8, 59.6, 81.2, 103, 124.6, 146.2]; kept this for my array values
var pointerPos:Array = new Array();
pointerPos.push( menu.btn1._y );
pointerPos.push( menu.btn2._y );
pointerPos.push( menu.btn3._y );
pointerPos.push( menu.btn4._y );
function movePointer( theClip:MovieClip ):Void
{
var tempArr:Array = String(theClip).split("btn"); /// the "btn" is the last letter in the word "btn" before we get to the number
var newPos:Number = pointerPos[ Number(tempArr[1])-1 ];
var myTween:Tween = new Tween(menu.pointer, "_y", Strong.easeOut, menu.pointer._y, newPos, 25);
}
menu.btn1.onRelease = function(){
movePointer(this);
};
menu.btn2.onRelease = function(){
movePointer(this);
};
menu.btn3.onRelease = function(){
movePointer(this);
};
menu.btn4.onRelease = function(){
movePointer(this);
};
menu.btn5.onRelease = function(){
movePointer(this);
};
menu.btn6.onRelease = function(){
movePointer(this);
};
Action Script Tween Won't Loop
Hello,
I was given this bit of code below on this forum here. It works, but goes to a white background after my 1658px image passes by.
My actual stage is only 829px so when it gets to the end of the 1658 (x2 stage size) tween I would like it to loop continuously. Is there any way to do this?
stop();
import mx.transitions.Tween;
import mx.transitions.easing.None;
var BgTween:Tween = new Tween(mc, "_x", None.easeNone, 0, -1658, 1000, false);
Edited: 09/06/2007 at 09:24:10 AM by johnnymnemonic66
[FMX] Alpha Tween With Action Script?
Is it posible to realize a alpha tween effect between two images with an interval of let'ssay 7 seconds, based on ActionScript. And is so how is that actionscript look likes?
Horizontal And Vertical Action Tween
Hello all,
I have a problem with which I'm struggeling. I tried dearching for the solution, but the search was unlucky. My problem is that I want to build my stie like a cross (with only the centered page visible) and then, through a mouseclick, let the page move to the center position. To do this I want to incomrporate a horizontal and vertical action tween. However if I do this with the code below, it only tweens the y tween. How can I get flash to execute both tweens?
Code:
menu_1.onRelease = function (){
function tween() { var xPosT:Tween = new Tween(object, "_x", Strong.easeOut, object._x, 0, 1, true)};
function tween() { var yPosT:Tween = new Tween(object, "_y", Strong.easeOut, object._y, 0, 1, true)};
}
[FMX] Alpha Tween With Action Script?
Is it posible to realize a alpha tween effect between two images with an interval of let'ssay 7 seconds, based on ActionScript. And is so how is that actionscript look likes?
Trouble With Action Script...Please Read
Hello Flash experts, maybe you can help me with a problem, this seems like it should work, I see no problem in the script but I have encountered a problem and cannot fix it(yet).
I began making a Flash movie about a month ago and recently decided to restructure the site to work better, it was using too much CPU before,
the movie can be seen here: http://www.roznet.com/test/test.html
if you've actually gone to the above link, then skip this paragraph:
In the main scene, there is a menu with 6 buttons and on the rollover, two movie clips start up, one is called textBox, and has a box that describes where each link will take you, this one works fine, the other clip is called gridBox, and is a box with a grid that is masked and for each button, the mask comes down and comes back up with a different nested MC for all 6 buttons.
On the main timeline, I have a frame for each menu item, so the actions for a rollover are to go to a specific frame, there is an actions layer and for each frame different actions.
This the script for one frame:
menu_clips.textBox.menuTextBox = about;
if (menu_status == "start") {
menu_clips.gotoAndPlay("textBox_start");
gridbox.gotoAndPlay("gridbox_start");
} else if (menu_status == "up") {
menu_clips.gotoAndPlay("textBox_finish");
gridbox.gotoAndPlay("gridbox_up");
} else if (menu_status == "goingUp") {
menu_clips.gotoAndPlay("textBox_finish");
var f = gridbox._currentframe;
var z = f-20;
var y = 50-z;
gridbox.gotoAndPlay(y);
}
It's the same thing in every frame except for the first line, "about" would be replaced by whatever menu item the frame represents
the third condition is to make the mask stop where it is on the way up and go back down to change MC's. It works for the most part, but if I rollover a button when the mask is right near the top, the gridbox MC does nothing. I'm not sure if this makes sense, I'll try to clear it up a bit with numbers. If you notice the numbers 20 and 50 in the script represent starting and ending frame numbers for the animation that I am trying to control. 35 is the where the mask is completely up. at frame 20, there is an action to set variable menu_status to "goingUp" and at frame 35 the same variable is set to "Up". If I go over a button between frames 20 and 34, it should do the math and drop the mask and if it is on frame 35 it should take the second condition and play that. For the most part this script does what it is supposed to do, if someone would just go to the above link they may not notice the problem, but if you go over a button while the mask is right near the top, the gridbox clip just stops in the up position and does not load the MC for whichever button. Try it, watch the mask a few times, then go over a button as the mask gets to the top and you'll see what I mean. I have been sitting here for over an hour trying to figure out why this happens.
Please help if you know how to fix this problem, I would appreciate it very much. Thank you
PS. many of the graphics you will see are rough so please don't criticize, I'm redoing them all once I get the scripting working properly.
Matt
http://www.roznet.com/
Button Action Trouble, Help Me Pleasssssssse
okay... my fla is organized into 8 labeled frames (main/news/shows/music/photos/links/guests/contact). on the main frame, there are 7 buttons for the other 7 frames. when you click one of these buttons, it takes you to its corresponding frame. in this frame, a 5 framed movie plays. on the final frame, the movie stops and a button appears. this button should take you back the the main frame, but instead, the button replays the movie. the action for these buttons is:
on (release) {
gotoAndPlay("Scene 1", "Main");
}
----------or--------------------------
on (release) {
gotoAndPlay("Main");
}
neither of these allows the button to "go to and play" my "main" frame.
please solve this problem for me!
Weird Trouble With Loadmovie Action
I've done this job and I'm having a strange trouble, so if you guys could help me here, I'd be very grateful.
The thing goes like this. It's a presentation in Flash that has the option to see it in two different languages, Spanish and English, but each file it's about 20 Mb big (it's in a CD, so the size of this files is not a big problem), so I've decided to make a small "intro" file, so it loads quickly and you can choose which language you want, and then it loads a different movie for each language. So, we have:
- english.swf (big file)
- spanish.swf (big file)
- intro.exe (small file, with two buttons each one with an action, loadmovie, that call the different language files).
But the problem is this. It works fine in different computers, but with one particular computer (the one where I created the files), it doesn't work, it just shows me a blue screen and nothing, instead of loading the movies. Nothing. It's very weird, because I've tested it in other five computers and worked perfectly fine. But then I sended it to my client and he has the same problem, it doesn't work in his computer.
Does anyone has an idea of what the problem could be? Anyone had the same problem that me? The computer in my job where it doesn't work is working under Windows XP, but I've tested it in others machines with Windows XP and didn't have a problem. This is very confusing. I'm waiting for your help in desperation.
Thanks in advance.
Action Script Trouble Part2
I have 7 buttons on the stage.
Each button has it's own animation for example:
If button2 is clicked, an arrow turn 30 degrees, and if button 3 is clicked, the script tells it go to it's closing animation and goes back to it's original state WHILE AT THE SAME TIME button 3 arrow turns 30 degrees.
I have uploaded a sample in Flash MX format.
I'm trying to figure out why the buttons aren't working the way they should. The script seems ok but I know I'm missing something. After a while if you click on a certain button it the other button that is active remains active and doesn't close. wel you'll see in the file....
Each "buttonclip" has a layer called "BUTTON", you will find the script there.
Hope someone can help
Having Trouble Locating Action Script
I'm a bit confused with this one.
I downloaded a movie from flashkit. In the debugger dropdown menu it says:
--------------------------------------------------------------------
Actions for [no instance name assigned] (menu_button_open)
on (release) {
if (_name == 'Menu1') {
_root.Menu_Blok_Text = _root.t1;
}
if (_name == 'Menu2') {
_root.Menu_Blok_Text = _root.t2;
}
if (_name == 'Menu3') {
_root.Menu_Blok_Text = _root.t3;
}
if (_name == 'Menu4') {
_root.Menu_Blok_Text = _root.t4;
}
if (_name == 'Menu5') {
_root.Menu_Blok_Text = _root.t5;
}
_root.Menu_Item_Opened = true;
// _root.Timer.gotoAndPlay("Menu_Closer");
newTextBlok = "TextBlok_New";
duplicateMovieClip ("_root.TextBlok", newTextBlok, 345);
this.gotoAndStop("Menu_Open");
}
-------------------------------------------------------------------
and the action script I want to edit is in there, but I can't actually edit it. And in the library, under menu button open, it has no actionscript assosiated with it? " Current selection cannot have actions applied to it". How do I get to where this action script is?
Here is the link to the file:
http://www.flashkit.com/movies/Inter...8685/index.php
Action Trouble (source Included)
http://lightning-1.com/alien/help.fla
I'm making a game and in it, I wanted to dynamically call the alien's action to "Dodge" to have it roll onto the stage. The actuall event works fine in the AS case in the seprate AS file, but jus telling to go to a sertain frame and giving it the proper variables wont work for me.
I dont think the AS file is needed for the solution, but if u try and can't figure it out, I can easily give u it.
*edit: Lol, sorry, wrong fla
Using Built-in Tween Class - Need Action Upon Finish
I am new to this so thanks for your patience. I currently have set the "portfolio" button so that when you click on it, it transitions whatever is currently on the screen out (for example, the home page is loaded all the home contents will tween out).
The code I've got for this is:
Code:
//paper transition out
_root.xpaper = _root.small_paper._x;
_root.ypaper = _root.small_paper._y;
_root.xscalepaper = _root.small_paper._xscale;
_root.yscalepaper = _root.small_paper._yscale;
new mx.transitions.Tween(small_paper, "_y", mx.transitions.easing.Strong.easeInOut, _root.ypaper, -10000, 1.75, true);
new mx.transitions.Tween(small_paper, "_x", mx.transitions.easing.Strong.easeInOut, _root.xpaper, -10000, 1.75, true);
new mx.transitions.Tween(small_paper, "_yscale", mx.transitions.easing.Strong.easeInOut, _root.yscalepaper, 450, 2, true);
new mx.transitions.Tween(small_paper, "_xscale", mx.transitions.easing.Strong.easeInOut, _root.xscalepaper, 450, 2, true);
Now once this is done I want to load the portfolio page, which I know I do using:
Code:
gotoAndPlay("portfolio");
The problem is if I put the gotoAndPlay in the onRelease section of the button the above tweens don't happen because it just switches to portfolio. How can I set it up so the gotoAndPlay doesn't happen until my tweens are finished?
Thanks
How Do I Tween A Simple Motion Using Action Script
HI,
Im trying to make a square move around by tweening its motion which is something I am already very comfortable with using regular actions mode, as well as more dificult things. However, being a beginer I am having a lot of trouble creating even a simple action like this using purely actionscripting or "expert mode". if anyone has any advice that would be greatly apreciated thanks!!
|