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




SwapDepths On Movie Killing Movie Tween?



Here's a strange swapDepths issue I've encountered.

I have a piece that stops at a certain frame and allows users to mouse over 4 different movie clips. I'm using a transparent button (with action scripting) over each one to tell the clips what to do on mouse events.

Basically, a mouseover causes the underlying movie to get larger accompanied by a sound, but also swaps depths with the topmost clip so that it appears in front of all the other clips as it grows larger.

A click action on one of the buttons moves the main level to a named frame where all the unclicked movies do a simple motion tween to a new location.

Now... if I only mouseover the first (and topmost) clip, and then click on it, the main timeline proceeds and all the other clips relocate as planned. But if I mouseover any of the other clips (on lower depths), then that clip does nothing when the motion tweening starts! It is essentially ignoring the tween instructions on it's timetime. Has anyone ever encountered this before?

This happens for every clip that I mouseover (i.e. every clip that does a swapDepths). If I mouseover 3 clips before clicking on one, all three stay put, so it's definitely swapDepths. When I comment out the swapDepths line, they all move as designed when reaching the motion sequence.

I have no idea what may be causing this.

I'm using Flash MX v6.

Thanks for any and all assistance.

Paul G



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-29-2005, 09:45 PM


View Complete Forum Thread with Replies

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

Killing A Movie Clip
I have a movie that stops on a keyframe. Within this keyframe there are three small movieclips. These should only be visible when the movies stops over this frame. when you click on the canvas the movie continues to the next stops.

The problem I am having is that the movie clips from the first stop keep showing up on the next stop. How can I remove this movie clips for good?

thanks

Killing A Instance Of A Movie...
hi ,

i had tried to create a instance of a movie clip in flash.. by using attachmovie function in action script.... but i can't figure it out , how can i kill the instance on a trigger!!! , but i found temporarily solution to change the x y position to hide it from the main screen..... any help ? from you guys

Function W/ OnEnterFrame KILLING Movie HELP
I am under the gun here and I cant figure out why this function is causing the movie's performance to come to a crawl!

Any ideas??

MovieClip.prototype.FPM_ZoomMovement = function(ZoomState)
{
if (this._xscale != FPM_TargetScale)
{
this.onEnterFrame = function()
{
FPM_CurrentVScale = (Number(FPM_CurrentVScale) + Number((FPM_TargetScale - FPM_CurrentScale) * 1 / FPM_Acceleration)) / FPM_Bounce;

FPM_CurrentScale = Number(FPM_CurrentScale) + Number(FPM_CurrentVScale);

setProperty(this, _xscale, FPM_CurrentScale);

setProperty(this, _yscale, FPM_CurrentScale);

FPM_CurrentVX = (Number(FPM_CurrentVX) + Number((FPM_TargetX - FPM_CurrentX) * 1 / FPM_Acceleration)) / FPM_Bounce;

FPM_CurrentVY = (Number(FPM_CurrentVY) + Number((FPM_TargetY - FPM_CurrentY)* 1 / FPM_Acceleration)) / FPM_Bounce;

FPM_CurrentX = Number(FPM_CurrentX) + Number(FPM_CurrentVX);

FPM_CurrentY = Number(FPM_CurrentY)+Number(FPM_CurrentVY);

setProperty(this, _x, FPM_CurrentX);

setProperty(this, _y, FPM_CurrentY);

if (ZoomState == 0)
{
if (this._xscale > FPM_TargetScale)
{
delete this.onEnterFrame;
}
}
else if (ZoomState == 1)
{
if (this._xscale < FPM_TargetScale)
{
delete this.onEnterFrame;
}
}

};
}

}


Thanks in advance!

Please Help This Loading Movie Problem Is Killing Me....
Hi guys please help me. I have use this kirupa loading movie style with my project.


Problem (1)
when i upload it into the site, the first main intro movie was loaded and played but the buttons for loading externals swf cant work in the site.

Izzit something wrong with publishing under Flash 6?
Do i have to upload everything including the html n swf n fla?

PLEase help..................i am frustrated

ps i will be uploading my main file and an ext swf . please check n reply.

Killing A Tween
Hi Again, I have a problem that is probably fairly easy to sort out...basically I have a tween running


Actionscript Code:
current_floor_pos._y = _root.floor._y;
        var floor_movement_end:Tween = new Tween(_root.floor, "_y", Strong.easeOut, current_floor_pos, current_floor_pos, 2,

this is running in a movie clip and is triggered to run on the event of a player bumping into an object... now this does what i want it to do great.

But when i start the scene again it retains the "current position" and starts off from that possition.

So what I need to know is how to break the tween from the _root. Have tried

floor_movement_end.stop();
init();

and other tweens to combat this one, but with little avail. If anyone knows how to destroy var tweens please hit me back asap...got a deadline for end of play...thanks in advance

Delete _global Is Killing My Tween
I'm using the script below to delete all _globals, but for some reason it's interfering with my dynTween. Is there some other way to delete ALL _globals?


Code:
for (var i in _global) delete _global[i];

Delete _global Is Killing My Tween
I'm using the script below to delete all _globals, but for some reason it's interfering with my dynTween. Is there some other way to delete ALL _globals?


Code:
for (var i in _global) delete _global[i];

Swapdepths In A Loaded Movie
O.k. so im trying to implement a movie file that contains several pop-up windows within flash, that will be opened by buttons in another movie.

The structure is this:

a main _root movie,
buttons.swf are loaded onto _level1 from a seperate file,
and then the windows.swf are loaded onto _level5 from a seperate file.

So I want to have the windows, which are in a seperate file loaded on to _level5 from the main movie, to z-sort as they are opened up by the buttons on the button layer(_level1).

When you click on the title bar of the windows, i want the one you click on to be on top of the others, exactly like the praystation one (click "6d - z-sorting"): http://flashtothecore.praystation.com/

mine works when you just run the windows file, but when you load that sucker into the main movie, the z-sorting no longer functions.

Anybody know if this possible? can you only do the z-sorting swapdepths from a _root movie?

check out the little blurb at the bottom of the page under additional info: http://www.macromedia.com/support/fl...swapdepths.htm

confusing as usual.
thanks.

SwapDepths Duplicating Movie Clips ?
Hello everyone,
I'm in the process of creating a menu system where the buttons are movieclips containing a image. This movieClip expans when rollled over. This is done by a button inside the movie clip calling a function The problem l'm having is that for some reason the swapDepth action is duplicating certain movieClips. Leaving them on stage

the actionScript that is on the button is:

on(rollOver, dragOver){
_root.submenu.gotoAndPlay("branch")
_root.linepos = 420;
_root.b6.scale = 1;
for (i=1; i<=_root.numButtons; i++) {
_root["b"+i].swapDepths(1);
}
_root.b6.swapDepths(2);

}

the code is identical on all buttons but for some reason it seems to happen on two buttons in particular. This problem doesn't happen when l remove the swapDepth action. Unfortunately it is necessary.

has anyone else encountered this problem?

Any help is appreciated
Thanks guys and girls

When Using Swapdepths I Cant Get The Movie To Respond To Its Parents Changes
Hi all,

I have a little map with options that are close together. So I was using swapDepths to increase a root variable by 2 each time you rolled over an option to bring the selected option above the rest. This works ok on its own, but then when I try to change the options parent transparency eg. (to 50%) these options do not respond and remain at 100%. I presume this is because swapDepths bring the mc back outside of the parent movie???

I would have thought that putting the options back on the original depth would have fixed the issue but I have had no luck.

I have posted a file if anyone could give me a hand would be really appreciated.

I can be emailed at messlah@hotmail.com

http://users.ncable.net.au/~timfrancis/mapissuemx.fla

Problem After Movie Clip Being SwapDepths
Hi Everyone!

I'm working on a game site but encourage a problem. I need to attachMovie to some "seats" and do the drag and drop on the attached movies. These attached movie will detect if they've been dragged to the target area or not. After the drag and drop i need to count which one is in the area so as to keep some info and move to the next step. When doing the drag and drop these items need to be on the top so i swap their parent's depth which are those "seats" . If I swapdepths then after click the button to make all the movie clips move to certain x position, those i've dragged cannot catch up with the rest(look like one step behind..)Is there a way to solve this problem??

here's the script on the attached movie's btn:

on (press) {
startDrag (this);
_parent.swapDepths(_root.newlevel);
}

on (release) {
stopDrag ();
_root.newlevel++;
if (this.hitTest( _root.target )){
}else{
this._x = startX;//this attached clip's starting _x
this._y=startY;//this attached clip's starting _y
}
}

on the main time line, lable"stop":
_root.newlevel=1;

for(i=1;i<=6;i++){//i test 6 movie clips
_root["obj"+i].attachMovie("child","child"+i,1);
}

stop ();

on the main time line, lable "move":
for(i=1;i<=6;i++){
_root["obj"+i]._x=_root["obj"+i]._x-5;
if(_root.obj1._x<50){
gotoAndPlay("stop");
}
}

and the next frame:
prevFrame ();
play ();

and on there a btn to gotoAndPlay "move" from "stop"

HELP..

Using Stop(); On A Shape Tween Of A Swapped Movie Clip Symbol Within A Motion Tween
Thanks a lot for your time. I'm new to actionscript, and language syntax and I never really got along to begin with so I appreciate any help in the matter.

Basically the title says it all - I made a motion tween in the main scene, made a movie clip symbol (to shape tween a gradient) and added a stop(); inside the gradient-tweened-symbol. I then swapped the movie clip symbol with the motion tween in the main scene, and got exactly the effect I wanted (the item moved, then tweened itself) but the stop(); seems to have no effect.

I know this looks like one of those "that idiot didn't google before posting" questions, but I've been looking for about a half hour with different permutations of stop, doesn't work, actionscript, and flash, and I haven't found anything that seems to target this problem specifically.

If you've got any idea what's going wrong, please feel free to respond or show me how to better seek help on my own. Thanks again.

Determining _level Of Internal Movie After Using SwapDepths()
I have several overlapping movies that the user can click on like folder tabs. the command swapDepth() works fine to swap levels of the movies but how can I detect which level a movie is on without have used loadMovie and then the _level property.

Please help!

Ken

Regarding Swapping Depths Of A Movie Clip Using SwapDepths...
mc.swapDepths(0); puts the mc to the toppest level, how do I put it in a lower level?

Help pls anybody. Thanks

SwapDepths Makes Sticky Movie Clips
Heya, I am using swapDepths on movie clips to control the layering in my movie.

However, for any movie clip that I have manually set the depth (eg. someclip.swapDepths(900), that movie clip seems to persist from that point on, even on frames where it isn't on the timeline.

What is going on here? Is this a bug or is there a correct solution for it?

For example, I have some boat movie clips in Scene 1. I apply swapDepths to them to give them a depth manually.

Then I go to another scene where there are no instances of the boat movie clips, BUT they are still on the screen (when I run the file)!!

ARGH!!!!

Anyone?

Thanks

ph00n

Movie Clip Issues With SwapDepths Command
I've created this source file as an excerpt from a larger project, but it has the same issue...click next and then next and then move the mouse over the menus...now click back and you see parts of the menu are still visible - why is this happening? How can I make the menu disappear when the back button is clicked?
Thanks,
David

Movie Clip Tween From A Random Point To Another Movie Clip?
ok...
on a website I am trying to make...i have a rotating E (lowercase)

it flips around and does all kindsa crap

but when a person clicks on a button, i want it to tween from whatever frame it is on, to where all 3 of them line up and do a little flashy type thing

ei:
e#1 - upside down and backwards
e#2 - sideways and rotating on the y axis
e#3 - rotating on the x axis

now i want all of these to tween from the point they are at to a specific order....so they are all flat (ei: they look like this "e")

how the heck do i do this?!? i know i have seen it somewhere!!

Movie Tween Like This Url?
I was wondering how i can make tweens in a photo gallery like this url?

http://www.jensma.net/

BUT.... at that site when you click a diff thumbnail, the box goes back to it's original size THEN expands to the size of the next img.. is there a way to actionscript it so after each click it goes to the corresponding image size instead of resizing back down to the small size?

tia

Stopping A Movie With A Tween
Newbie question here...I think I am having a brain lock. I have a movie that tweens into position while it is playing. At the end of the movie I want it to stop and remove itself from the page. When I put a stop action at the end of the clip it stops as soon as the tweening is done and doesn't finish the movie. Any ideas?

Loaded Movie Tween?
Crap! Made a cool Flash piece and finished. Now the person who wants me to do it wants something different. They want the completed piece to shrink and dissappear. Can I easily do this by loading the movie and then modifying that layer? If not, anything anyone suggest so I don't have to start over? Thanks.

Tween Into Movie Clip?
How would I change a long tween into a movie clip? I need to use multiple instances of the tween with different properties across my main movie.
Thanks for any help, Jeff

Dynamically Tween Movie On Run
Hi people,

This may seem like a stupid question and show a complete lack of understanding of both Flash and tweening but can you dynamically tween a movie on load/run? The movement is defined by the user. So for example if a user drags an object from its initial position to somewhere else on the screen and then presses a run button. I wouls then like to animate the object moving from its initial position to the position at which it was dropped. Is this possible? Does it even need to be tweened?

Thanks.

mars

[CS3] Tween. Another Level Of A Movie
I'm not seeing the err in my ways here, so I thought I'd get a fresh look on it.

I have a series of movies on the stage labelled "window1" thru "window20". Inside each of these movies is another instance called "cover" and "answer".

I'm trying to tween ONLY the "cover" instance inside, but it's not catching it.


Code:
function OpenTheWindow(thisWindow, whichPart) {
whichWindow = thisWindow+"."+whichPart;
swingIt = new mx.transitions.Tween(whichWindow, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 0, .50, true);
}
When I call for the transition, here's the code in the button:


Code:
on (click) {

thisPosition = _root["set" + _root.howManyWindows][substring(this._name, 9, 2)];

_root.OpenTheWindow(_root["window" + thisPosition],"cover");
}

AS2 Tween An Attached Movie
I want a mc loaded from the library via attachMovie to fade in using the imported tween class.
To be clear, the code below shows a loadMovie, which works fine. I'm trying to include the attachMovie as well, which works, but it does not fade in.

import mx.transitions.Tween;
import mx.transitions.easing.*;

btn17.onPress = function() {
container_mc.loadMovie("movieOne.swf");
attachMovie("btn17_desc_mc", "desc_mc", 0, {_x:784, _y:60});
desc_mc._alpha = 0;
new Tween(desc_mc, "_alpha", Strong.easeIn, this._alpha, 100, 10, false);
}

So the attached movie "desc_mc" does load with alpha of 0, I just can't get the tween to work.

Tween A Movie Clip
hello friends

i have made a movie clip with few no. of images and i want to tween the moview clip by coding only and also want to control the speed of tweening

help me for the same

thanx
arjun...

Jerky Movie Tween
Hi there!
I created a movie using tween motion, it's a kind of a slide show that moves small pictures from right to left. I put all pictures in one layer and created a motion tween to move from side to side, simple enough. The problem is that the movie looks jerky, the pictures move correctly, but with little jerky movements... I tried using different frame speeds, but with no luck. Right now is at 36fps... also I created another movie with text only, same idea... same results, in text is even worse. You can see what I'm talking about checking the website: www.eatonart.net, is the home page, it will take a little while to download...
Is there anything I can do to fix this annoying problem? or maybe I have to use a different program?

Any help would be appreciated... thank you...

Aldo13

I Can Control This Movie, But Can't Tween It
I am mystified by this situation. I instantiated a movieclip (mc) on the stage via actionscript in frame one. Then down the timeline I am trying to tween it and I can't. I can remove it, adjust its display properties (_alpha, for example), etc. But if I try to apply a tween to it, it does not work.

mc_tween (it saves the world) makes using the built in tweening functions easier. All you have to do is use a #include "mc_tween2.as" in the first frame of your movie. I've used it for quite a while and am using it in this current movie.

I can tween this movie clip on the frame that it is instantiated on, but nowhere else (even though it exists throughout the entire length of the timeline).

What's going on? Please view the attached image I slaved over to clarify my question

Loading Movie Into A Motion Tween?
Is it possible to load an external movie clip onto a layer in the main movie that has a motion tween and have that loaded movie take on the effect of the motion tween? For example, loading a swf file that is a picture onto a layer that is tweened to look like a page turning. I would like to have that loaded movie file skew itself along with the motion tween.

I have used the dummy mc method, but to no avail. Any help would be greatly appreciated... Thanks in advance!

Difference Between A Movie Clip And A Tween?
I've been tweening photos, fading them in and out in different layers, but I can't figure out how to loop them all together. Each one is in its own layer and they are graphics, not movie clips. I don't understand the difference between the two? Should I have made them all movie clips instead of tweened graphics?

I have a .fla file that has many layers, three of those layers have one photo on each layer fading in and out. I want the third photo from the third layer to loop back to the first photo on the first layer. I tried actions (gotoandplay) but it would just stop the whole flash movie and start over. I know I'm doing something wrong. Maybe this has something to do with them not being 'movie clips'?

Bear with me, I'm a newbie!

Scale Movie To Center By Tween
ok Ive had a really hard time figuring this out, and its driving me crazy. What i am basically going for is an effect like this: http://www.seanjohnblackelite.com/main.htm

Basically its self explained, I need to have it just like that so when the user scales the web browser, it bounces or smoothly slides to the center of the browser, how is this done? I am new to this so if you could explain, or even show an example that would be great! I WOULD GREATLY APPRECIATE IT!!!!! thanks alot!!!!

Alpha Tween Not Working Over Movie
I have a looped movie playing and I'm trying to put some text over top that will just fade in as soon as the flash starts. I did the tween with the alpha from 0% to 100% and it works if you play it in the timeline, but when you go to the 'preview' the text just show up at 100% right away with no fade.

Does anyone know what would cause this? or how I can get it to fade in properly?

How Do I Say Movieclip.x = 200 But Have The Movie Go There Like A Motion Tween?
How do I say movieclip.x = 200 but have the movie go there like a motion tween?

If I just say x=200 then it just goes there.

Buttons In A Movie Clip With Tween Help
hello People of Actionscript.org.

I am basically new to flash and i have to land here for support on my little project.

i have created a movie clip which has buttons inside. the movie clip has motion tweens and i can't get the buttons working to get URL.

please refer to this .fla for reference.

Thank you for support.

Tween Out Movie Clip Then Load Another
i have 3 buttons: about, portfolio, contact us
i have 3 movieclips: about_mc, portfolio_mc, contact us_mc

on release of each btn, it loads its related movieclip from the timeline. the movieclip tweens in then stops. when i click one of the other buttons i'd like the current movieclip to tween out then tween in its related movieclip. is there a script that will play a portion of one movieclip then skip and play another?

How Do You Alpha Tween A Movie Clip
I have a set of pictures which I have changed to movie clips and they are all set at an alpha of 50%, what I was trying to do is when you rollover each clip it tweens to 100% and then when you rollout it goes back to 50%.

I have tried doing this:

on (rollOver) {
mountain._alpha = 100;
}

on(rollOut) {
mountain.alpha = 50;
}

which didn't work, how would I get it to tween also?

thanks

Transition Tween On Movie Start
Hi

I'm developing a site using the mx transition tweens - triggered by a bt click: http://www.detkendesign.com/detken3/test3.php (still in it's early stage).

I'd like the first bt action to be triggered as soon as the movie opens - so the home bt is triggered and resets the 'holding' rectangle to it's new scale contained in the tween.

Any ideas on how this can be done - I assume changing the on(release) aspect of bt1?

Thanx for any input

Dirk


The script:




Code:
stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;
MovieClip.prototype.tween = function(theProp:String, from:Number, to:Number, time:Number) {
_global.when = new Tween(this, theProp, Strong.easeInOut, from, to, time, true);
};

btn1.onRelease = function() {
//first move to center in one second witih no delay
main_mc.tween("_x", 400, 329, 1);
main_mc.tween("_y", 100, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

btn2.onRelease = function() {
gotoAndStop("bt2");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, -717, 1);
main_mc.tween("_y",0, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}
btn3.onRelease = function() {
gotoAndStop("bt3");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, 329, 1);
main_mc.tween("_y", 0,-632, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

Is It Possible To Stop A Tween In A Movie Clip
Hello Kglad and other forum expert!
I have a movie clip (really just an image converted to a movie clip).
I a "zoom" effect set on two layers - on for the zoom mask, and the other for the base image.

I just use the modify/transform in some keyframes to have the image motion tween from normal size to a larger size.
The tween (aka zoom) is shown through the mask layer.

I did not create the motion tween using actionscript, but in the timeline between 2 keyframes.

Is there a way I can stop the tween when the movie plays ( by clicking a "pause" button).

Thanks for a great info resource,

eholz1

Multiple Movie Clip Tween
I'm creating a field of bubbles (~1,000 total) and would like all of them to pulse on the initial load but do not want to manually go in to each movie clip and write the tween (of growing and then reducing back to original size). Is there an actionscript that can apply this scale effect to each bubble in the file? Also, each bubble is a different, original size...thanks...

Transition Tween On Movie Start
Hi

I'm developing a site using the mx transition tweens - triggered by a bt click: http://www.detkendesign.com/detken3/test3.php (still in it's early stage).

I'd like the first bt action to be triggered as soon as the movie opens - so the home bt is triggered and resets the 'holding' rectangle to it's new scale contained in the tween.

Any ideas on how this can be done - I assume changing the on(release) aspect of bt1?

Thanx for any input

Dirk


The script:




Code:
stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;
MovieClip.prototype.tween = function(theProp:String, from:Number, to:Number, time:Number) {
_global.when = new Tween(this, theProp, Strong.easeInOut, from, to, time, true);
};

btn1.onRelease = function() {
//first move to center in one second witih no delay
main_mc.tween("_x", 400, 329, 1);
main_mc.tween("_y", 100, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

btn2.onRelease = function() {
gotoAndStop("bt2");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, -717, 1);
main_mc.tween("_y",0, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}
btn3.onRelease = function() {
gotoAndStop("bt3");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, 329, 1);
main_mc.tween("_y", 0,-632, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

Buttons In A Movie Clip With Tween Help
hello People of Kirupa.

I am basically new to flash and i have to land here for support on my little project.

i have created a movie clip which has buttons inside. the movie clip has motion tweens and i can't get the buttons working to get URL.

please refer to this .fla for reference.

Thank you for support.

Movie To Rotate Whitout Tween
I have had alot of problems, with having my Flash page look nice on a older computer.
I find out that the problem is all the "tweens" that i have on my page, it wont run smooth whit them.

So now i may have found another solution.
The inly problem is that i´m not that bright, that i can make this code myself.
This code is for 1 picture to turn,- can anybody show me the best way to make the same pic. rotate 6 different places on the site(i want to place them in specific places)

Here is the code:

// declare and set initial variables and properties
with (PlasmaRotere) {
initx = _x;
inity = _y;
top = _y-97;
bottom = _y+97;
left = _x-97;
right = _x+97;
}
//
_root.onEnterFrame = function() {
with (PlasmaRotere) {
// make circle continuously rotate
_rotation += 10;
//
// calculate distance from starting point
delta_x = _x-initx;
delta_y = _y-Inity;
distance = Math.sqrt((delta_x*delta_x)+(delta_y*delta_y));
}
//
// calculate the angle from the starting point in radians
radians = Math.atan2(delta_y, delta_x);
if (delta_y<0) {
radians += (2*Math.PI);
}
//
// convert radians to degrees
degrees = Math.floor(radians/(Math.PI/180));
};

Can I Create A Tween Movie Clip In AS
Is it possible to create a movie clip in AS?

If I had a list of jpgs, could I create some Actionscript to fade in each one? ie instead of creating a Movieclip for each jpg and saving it as a SWF.

cheers
nick

Reverse Motion Tween In A Movie Clip
hello, i've searched on this site for my issue, but i'm not sure i've found what i need.

on the root timeline, i have an instance of a movie clip that contains a motion tween (12 frames to increase the size of the mc).

on the actions layer of the root timeline, i have written some code so that when the end user rolls over the mc instance, the motion tween plays. what i'm having trouble with is getting the movie clip to play in reverse from frame 12.

bookIntro_1.onEnterFrame = function(){
this.onRollOver = function(){
this.nextFrame();
this.play();
}
this.onRollOut = function(){


}
}

i've tried this.prevFrame, but it only does one frame, not completing to frame 1 of mc.

i appreciate any assistance offered. thanks in advance.

Changing Color In A Movie; Breaks Tween
Thanks in advance for any assistance.

I have created a very simple movie that consists of a 60-second timeline with B/W letter vector outlines that have motion and scale tween. Everything worked great, now the client wants to add color. I want now to add color to the outlines. But when I select the beginning and ending frames to apply color, the scale tween stops working. I do get an error message (yellow triangle) that it only works with groups, but each layer is grouped already. Any ideas?

Movie Clip Tween Invisible On Stage...
I have 6 similar movie clips on stage with an action to play them on press. The Movie Clips contain a Symbol with a motion tween over a path, and a mask motion tween. When the Movie Clip is clicked it starts to play but the symbol tweening does not show up, while the mask tween works fine. Every symbol is in its own layer and the tweening seems fine in the .fla preview. I'm attaching the file, the smallest of the symbols on the stage is the one scripted. Thanks in advance for any help.

<mgl>

Movie Clip Tween Invisible On Stage...
I have 6 similar movie clips on stage with an action to play them on press. The Movie Clips contain a Symbol with a motion tween over a path, and a mask motion tween. When the Movie Clip is clicked it starts to play but the symbol tweening does not show up, while the mask tween works fine. Every symbol is in its own layer and the tweening seems fine in the .fla preview. I'm attaching the file, the smallest of the symbols on the stage is the one scripted. Thanks in advance for any help.

<mgl>

Adding A Tween To Dynamically Loaded Movie
To start, I would just like to say that I’m new to flash... I did use it back in flash 4 but never was very good at it.

This is the situation, I've used action script to create a movie, and then place a picture in this movie the code is as follows:

MovieClip.prototype.loadjpg = function(picName, holderName) {
var h = holderName==undefined ? "holder" : holderName;
this.createEmptyMovieClip(h, 1);
this._visible = false;
this[h].loadMovie(picName);
var id = setInterval(function (mc) {
if (mc[h]._width > 0) {
mc._alpha = 99;
clearInterval(id);
mc._visible = true;
mc.onComplete();
} else {
mc.onLoading();
}
}, 80, this);
};
function positionIt() {
this._x = 0;
this._y = 0;
}
this.createEmptyMovieClip("myjpg", 1);
myjpg.onComplete = positionIt;
myjpg.loadjpg("main.jpg");
stop();


Is it possible to animate this created movie in a tween? The effect I want is to have a generic fla for each section of the site that all that needs to be changed is the location of the background image. Each with the same animation, however some sections have other stuff that has to be loaded and I don’t want them to be loaded each time.

Putting Motion Tween Into Movie Clip?
Hello everyone,
I'm still new to flash and needs some help. I'm trying to make a simple walking skeleton move across the stage. I've made two graphic symbols and motion tween between them to make the walking motion. Now I need to make the skeleton move across the stage. It was suggested that I put the motion tween into a movie clip. However, I couldn't find the step to do this. Can someone point me to a good step by step tutorial? Is there a more efficient way to do this?

Thank you.
Eugene

CS3/F8 - Tween Rewinding - Works, But Not In Movie Clip
I was wondering if you have ever had a problem with a movie clip working if you just tested the particular scene and it worked but then when you tested the whole movie it didnt, because i am trying to run a rewind tween in a movie clip but as i said it doesnt work in the movie but it works in the scene.


AS Code - Frame 1

Stage.scaleMode = "noScale";
function playDir(forward) {
if (forward) {
if (_root._currentframe<_root._totalframes) {
gotoAndStop(nextFrame());
} else {
clearInterval(_root.playerdir);
}
} else {
if (_root._currentframe>1) {
gotoAndStop(prevFrame());
} else {
clearInterval(_root.playerdir);
}
}
updateAfterEvent();
}
clearInterval(_root.playerdir);
stop();


Buttons

Forward button
on (release) {
_root.playerdir = setInterval(playDir, 1, true);
}


Rewind button
on (release) {
_root.playerdir = setInterval(playDir, 1, false);
}

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