Scale Easing On MovieClips
I'm trying to a scale a movieClip on rollover BUT using actionscprit, not tweening. And on rollout scale it to its original size. I want to give the effect of easing on this movieclip while it scales.
Help will be greatly appreciated.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-16-2004, 03:12 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scale Easing On MovieClips
I'm trying to a scale a movieClip on rollover BUT using actionscprit, not tweening. And on rollout scale it to its original size. I want to give the effect of easing on this movieclip while it scales.
Help will be greatly appreciated.
Scale With Easing
Hi everybody,
How do I do a scale movement using the easy effect? I study a lot of examples, using speed/5, but... didn't work. I just saw a site that tells what do I want to do: http://www.sofake.com/
Thks!!
Easing Scale
Hi all.
I've got a problem and hope you lot could help me.
I've got a button which on release makes a square mc scale up then when clicked again it scales down. Here's the code:
on (release) {
if (_root.square1._yscale == 100) {
_root.square1._yscale = 50;
} else {
_root.square1._yscale = 100;
}
}on (release) {
if (_root.square1._xscale == 100) {
_root.square1._xscale = 50;
} else {
_root.square1._xscale = 100;
}
}
My question is: How do I add ease to this script (easily if possible)?
I want to make the scaling of this square ease to a stop rather than going straight to the 100% and vice versa.
Thanks in advance for any help.
Sy
Scale MC With Easing
Need some AS help here!
I want to scale a MC! Like this:
Code:
on (press) {
MyMC._xscale = 200;
MyMC._yscale = 200;
}
But how do I get it to scale with ease?
Scale With Easing - Part 2
Well, thks to help me, but there is another little problem... the zoom is always in the center of the film. How do I do to zoom in a specific coordenate?
In the attached fla, the 2 button will zoom and put the number 2 in the center of the stage. The same in number 3, of course.
Anybody?
Scale Easing Along Y Coordinate
Hi, I would like to know how can the rectangle be scaled in easing effect?
just like this website,
http://www.newaykb.com/
I try to write the below script, but I have no idea how to adding the easing effect. Please help. Thanks in advance!
onEnterFrame=function(){
onMouseMove=function(){
startDrag("dragControl", true);
}
_root.rect_mc._xscale=(dragControl._y*(-0.01))+110;
_root.rect_mc._yscale=(dragControl._y*(-0.01))+110;
}
Easing Scale On Movie Clips Stuck
Flash version 8
I have four buttons horizontally stacked that I want to scale up in size when rolled over and then scale back down when rolled off. I am using the easing class and the script below is located in the main movie timeline. When the mouse is moved quickly off any of the movie clips, the animation for the roll off starts to occur and then is reverted back to the scaled up state. I've found similiar posts with buttons having the same issue, but I can't think of a way to get around this because I need the hit area to remain as the whole movie clip to register the roll off. Is there something I'm missing? Or is there a better set up for this action? I orginally had the code on each of the movie clips' timeline, but received the same result. Any help is appreciated.
code:
function ScaleUp(doMe,a,b,c,d) {
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xScaleTU:Tween = new mx.transitions.Tween(doMe, "_xscale", mx.transitions.easing.Strong.easeOut, a, b, 3, false);
var yScaleTU:Tween = new mx.transitions.Tween(doMe, "_yscale", mx.transitions.easing.Strong.easeOut, c, d, 3, false);
myColor = new Color(doMe);
myColor.setTint(255,255,255,35);
}
function ScaleDown(undoMe,a,b,c,d) {
var xScaleTD:Tween = new mx.transitions.Tween(undoMe, "_xscale", mx.transitions.easing.Back.easeIn, a, b, 2, false);
var yScaleTD:Tween = new mx.transitions.Tween(undoMe, "_yscale", mx.transitions.easing.Back.easeIn, c, d, 2, false);
myColowr = new Color(undoMe);
myColowr.setTint(0,0,0, 0);
}
microsol_bg.onRollOver = function() {
ScaleUp(microsol_bg,100,115,100,115);
}
microsol_bg.onRollOut = function() {
ScaleDown(microsol_bg,115,100,115,100);
}
fes_bg.onRollOver = function() {
ScaleUp(fes_bg,100,115,148,160);
}
fes_bg.onRollOut = function() {
ScaleDown(fes_bg,115,100,160,148);
}
ce_bg.onRollOver = function() {
ScaleUp(ce_bg,100,115,100,115);
}
ce_bg.onRollOut = function() {
ScaleDown(ce_bg,115,100,115,100);
}
hs_bg.onRollOver = function() {
ScaleUp(hs_bg,100,115,100,115);
}
hs_bg.onRollOut = function() {
ScaleDown(hs_bg,115,100,115,100);
}
[CS3] Scale With Easing On Movieclip Load - Question
Hi,
How do I tell a movieclip to scale-up then scale-down, with easing, on load?
So the buttons appear one after another; scaling from 0% to 120% then back to 100%.
I have got a nice rollover scale w/ easing script; but can't figure out how to do this at load of movieclip.
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.button1.onRollOver = function() {
//tween clip, property, easing type, initial value, end value, how long, use seconds
var scalexTween = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 120, 4, false);
var scaleyTween = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 120, 4, false);
};
this.button1.onRollOut = function() {
var scalexTween = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 6, false);
var scaleyTween = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 6, false);
};
Any questions or comments will be much appreciated!
Scale With Easing On Movieclip Load - Question
Hi,
How do I tell a movieclip to scale-up then scale-down, with easing, on load?
So the buttons appear one after another; scaling from 0% to 120% then back to 100%.
I have got a nice rollover scale w/ easing script; but can't figure out how to do this at load of movieclip.
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.button1.onRollOver = function() {
//tween clip, property, easing type, initial value, end value, how long, use seconds
var scalexTween = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 120, 4, false);
var scaleyTween = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 120, 4, false);
};
this.button1.onRollOut = function() {
var scalexTween = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 6, false);
var scaleyTween = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 6, false);
};
Any questions or comments will be much appreciated!
Stage Scale W/listener - Applying Easing
i have some menus that are setup to scale on browser resizing. id like to apply some easing to these menus, but im not sure how to do this with AS. if anyone knows how to do this, or could recommend a tutorial explaining how to do this, id really appreciate it. thanks, brandon.
im using the following code:Code:
stage.showmenu = false;
Stage.scaleMode ="noScale";
Stage.align = "TL";
bottomrightmenu._x = Stage.width
bottomrightmenu._y = Stage.height - bottomrightmenu._height
bottomleftmenu._y = Stage.height - bottomleftmenu._height
toprightmenu._x = Stage.width - toprightmenu._width
center._x = (Stage.width + 800)/2
center._y = Stage.height/2
sizeListener = new Object();
sizeListener.onResize = function() {
bottomrightmenu._x = Stage.width
bottomrightmenu._y = Stage.height -bottomrightmenu._height
bottomleftmenu._y = Stage.height - bottomleftmenu._height
toprightmenu._x = Stage.width - toprightmenu._width
center._x = (Stage.width + 800)/2
center._y = Stage.height/2
};
Stage.addListener(sizeListener);
stop();
Alpha/size/color/tint/scale/easing Tween Using Only AS.....
I have an MC with an instance name of "Scale". I would like to control a tweened effect with AS only. How do you do this?
For example: I would like when a button is pressed to have "Scale" fade away from 100% to 0% Alpha transparency. Also, if at all possible be able to control the easing.
Can someone share the probably when know secrets with me please..
Thanks
kitch
Best Way To Scale Movieclips? As2, Cs3
Hello
Ive been using the traditional method of using the timeline to scale my movieclips and rotate them etc(scaling them gradually from small to big). I am wondering if its more optimal to use actionscript to do it instead and how to go about this? It doesnt seem as flexible because if your using bitmaps which I am, then youre final size wants to be the original size of the mc etc.
Buttons (or Movieclips?) With Easing
Here's an example of what I'm trying to do. http://www.zachgold.com/
Are these buttons or movieclips?
On rollover the button (?) has a trail (in this case, a thumbnail of a picture)
that eases into place. How do I accomplish this effect?
Please help. Anyone?
MX How To Move & Scale Movieclips Using X & Y?
I have three square, A,B & C, each one is a movie clip. How do you move & scale B & C when A is rolled over? On rollout they return to their original size & position. Can this be done using co-ordinates?
Scale Movieclips Using Loadmovie()
Hello,
I am loading some thumbnails (jpgs) into some movieclips using loadmovie. Easy enough. I want to scale the movieclip to increase the size of the thumbnail on rollover. The problem is when I use loadmovie and load the external JPG it sets the the JPGs default registration point to (0,0) and when I scale the thumbnail it scales from the top left corner. I would like it to scale from the center. This is the code I am using:
onClipEvent (load) {
var thumb = "thumbtest.jpg";
loadMovie(thumb, thumb_loader);
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
}
on (rollOver) {
thumb_loader._yscale = 100;
thumb_loader._xscale = 100;
}
on (rollOut) {
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
}
Is there anyway to change the registration point so it scales from the center and not the top left?
thanks,
D
Scale Movieclips Using Loadmovie()
Hello,
I am loading some thumbnails (jpgs) into some movieclips using loadmovie. Easy enough. I want to scale the movieclip to increase the size of the thumbnail on rollover. The problem is when I use loadmovie and load the external JPG it sets the the JPGs default registration point to (0,0) and when I scale the thumbnail it scales from the top left corner. I would like it to scale from the center. This is the code I am using:
onClipEvent (load) {
var thumb = "thumbtest.jpg";
loadMovie(thumb, thumb_loader);
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
}
on (rollOver) {
thumb_loader._yscale = 100;
thumb_loader._xscale = 100;
}
on (rollOut) {
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
}
Is there anyway to change the registration point so it scales from the center and not the top left?
thanks,
D
Swaping _x / _y Values Of MovieClips W/easing
Hey y'all,
Just was wondering if anyone had any idea on how you'd swap; after storing, _x /_y position values of movie clips on button instances ie. onClick ..... Let's say I had four 4 movies and 3 buttons the (first movie looking like a button but is active so it's not clickable at that point) mc1, mc2, mc3, mc4 when the movie loads they are in that order......
When the user clicks mc2 or 3 or 4 it slides into the _x position of mc1, and mc1 slides into the _x pos. where mc2/3/ or 4 just was (they swap).... then the user clicks mc4 or 3 or 1 and it swaps pos. with mc2 and so on.... all this done with a smooth easing transistion.....
an example similar to this is the navigation module on James Begera's web site:
http://www.webagent007.com
keep on Contact!
Dynamic Resize And Scale Of Movieclips
Hi all,
I am trying to make a demo similar to the following link.
http://www.itasveer.com/doodlepad.do?Pgdi=200
Here, user has the option to apply transformations to the selected object dynamically.
I too want to make something like this. But I am unable.
can any body please explain, how can we apply transformations (resize, rotation, position) dynamically to the selected movieclip.
Thanks in advance..
pandu
Dynamic Resize And Scale Of Movieclips
Hi all,
I am trying to make a demo similar to the following link.
http://www.itasveer.com/doodlepad.do?Pgdi=200
Here, user has the option to apply transformations to the selected object dynamically.
I too want to make something like this. But I am unable.
can any body please explain, how can we apply transformations (resize, rotation, position) dynamically to the selected movieclip.
Thanks in advance..
pandu
Create, Scale Movieclips Programmatically
hello, I am still terribly new to flash. I am trying to do an image map, say an image map of USA, in flash. One special functions I need is whenever mouse over a geographic area, the image of that area would be enlarged.
With the great help from all your guys, I finally sort of figured out how to do it manually. I mean painstakingly convert to movieclip, insert keyframe, add code, ... But there are over fifty states ... with my own task, there are over 100. I wonder if it is possible to do this in one shot, do it programmatically.
Also I already have a html file with all the coordinates specified for each geograhic area, I wonder if I could make use of that too.
It is too much to ask, but really appreciate if you guys could help me out
Get Duplicated Movieclips To Move Along With The Mouse And Add Easing.
Hi!
My very first question to a forum. Please be merciful.
I'm just about to start learning actionscript. I want to create something like the effect shown on stellamccartney.com
I've come so far that I've gotten the movieclips to duplicate and get in the right position. They're also following the mouse around, but it's the last thing.. the "easing" effect..
Does anyone have an idea of how that can be made?
Thanks.
Tutorial To Scale Movieholders For Loaded Movieclips
Hi everybody, does anyone know of a tutorial, perhaps here in kirupa.com, on how to scale a movieholder to fit the size of a loaded movieclip or jpg image? You know the kind of effect that resize a mc to fit the size of the loaded item.
Thanks a lot,
Short Script Notation Multiple Movieclips With Same Effect/easing
Hello,
I'm having a piece of actionscript written for 63 of the same movieclips. All of them start at _alpha = 0 and then one at a time fade in on screen. I've made myself a working actionscript but it's waaaaaay to long.
Now I'm looking for a short script notation for the following code:
PHP Code:
overlap.ovl01._alpha = 0;
overlap.ovl02._alpha = 0;
overlap.ovl03._alpha = 0;
...
overlap.ovl60._alpha = 0;
overlap.ovl61._alpha = 0;
overlap.ovl62._alpha = 0;
// Overlap A + B
overlap.alphaTo(100, 1, "lineair", 2.2)
overlap.ovl01.alphaTo(100, 1, "lineair", 2.2)
overlap.ovl02.alphaTo(100, 1, "lineair", 2.3)
...
overlap.ovl61.alphaTo(100, 1, "lineair", 9.5)
overlap.ovl62.alphaTo(100, 1, "lineair", 9.6)
overlap.ovl63.alphaTo(100, 1, "lineair", 9.7)
I found a script but I can't get it to work.
PHP Code:
//use a for loop to reduce repetition of the code
for(i=1;i<63;i++){
theOverlap=_root.overlap["ovl"+i];
//this variable stores what number button it is
theOverlap.thisNum=i;
theOverlap.onEnterFrame=function() {
this._alpha= 0;
}
}
Can someone help me out?
thanx
Scale Movieclip - It Works But The Scale Handle Wont Be Dragged Correctly
hi,
because I need to get a movieclip dynamically scaled I have the following script. But the problem is that the handle wont stay at the right bottom corner. I think it has to do something with the math function but I dont know exactly what.
ActionScript Code:
attachMovie("Pic", "thePic", 1);
thePic.onEnterFrame = function(){
this._width = this._height = container.handle._y+25;
}
scrollArea = Math.sqrt(Math.pow(thePic._height,2) + Math.pow(thePic._width,2));
createEmptyMovieClip("container",2);
container._x = 50;
container._y = 50;
container._rotation = -45;
container.attachMovie("scale_handle", "handle", 2, {_y:scrollArea});
container.handle._alpha = 0;
// all mouseactions of the handle
container.handle.onPress = function(){
this.startDrag("true",0,0,1,scrollArea);
trace(scrollArea);
trace(thePic._height);
}
container.handle.onMouseUp = function(){
this.stopDrag();
container.handle._alpha = 100;
}
container.handle.onRollOver = function(){
container.handle._alpha = 100;
}
container.handle.onRollOut = function(){
container.handle._alpha = 0;
}
// all mouseactions of the picture
thePic.onPress = function(){
_root.startDrag();
}
thePic.onRelease = function(){
stopDrag();
container.handle._alpha = 100;
}
thePic.onRollOver = function(){
container.handle._alpha = 100;
}
thePic.onRollOut = function(){
container.handle._alpha = 0;
}
maybe you could help me.
thanks in advance, ckey
Scale Movie Clip - Location/scale
Hi,
My brain hurts.
I have a mc containing four boxes. Beneath each box there are zoom in/out btns. Please see attached file.
I need to be able to zoom in on each box so it dominates the stage and is centred (see red dashed box in attached file for guide).
I've got this far but it doesn't work!???
import mx.transitions.*;
import mx.transitions.easing.*;
test_mc._xscale=100
test_mc._yscale=100
// function to scale the movie clip, parameter is a number to scale the circle with
function testscale (scaleFactor:Number):Void {
var xscaleTween:Tween = new Tween(test_mc, "_xscale", Strong.easeOut, test_mc._xscale, scaleFactor, 1, true);
var yscaleTween:Tween = new Tween(test_mc, "_yscale", Strong.easeOut, test_mc._yscale, scaleFactor, 1, true);
}
//not sure what of the exact scale factor yet but 200 is used just to see if I can get this to work//
btn1.onPress = function (Void):Void {
test_mc(200);
}
Simple Help: How To Initialize X Scale And Y Scale Into Precentages
Hi, it's me again. This is probably a simple help request: How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in precentages, not real numbers.
Code:
USflag.onMouseDown = function ()
{
var temp = USflag;
onEnterFrame = function ()
{
//the two variable's value is currently between 20-30, I want it to be just 100%.
temp._xscale = temp._yscale *= .9;
trace (temp._xscale);
if(temp._xscale < 5)
{
delete onEnterFrame;
}
}
}
One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]
Scale Images Fullscreen Scale=true
Hi there,
I've been testing some stuff concerning fullscreen.In the generated html of my main swf I added a javascript to set the site to fullscreen. So when you view the site on a 20" screen the site takes the hole screen. In my publishing settings I set the html to 100% and scale. Probs are with the images from my gallery. When scaling the site the images get pixelated.
I did some testing like bigger quality on the pics but everything stays the same. The images are loaded externaly through an xml file. Any solution to this.
I won't my site to look great on 21" screen too:s.
Big thx in advance.
Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.
and then,
i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.
i am having this bkg and content in the same fla....
what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.
Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.
and then,
i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.
i am having this bkg and content in the same fla....
what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.
MC Clickable At Some Scale, Unclickable At Other Scale
Hi, my first post here. Just getting into actionscripting.
I'm trying to do an effect similar to what sofake has done on the www.matthewmahon.com site, or the billyharveymusic.com site.
I'm not copying outright, don't worry.
Anyway, when zoomed out, on mousover, any of the movie clips are clickable, which causes them to zoom in to, I assume, 100% scale. Then they are not clickable. When you zoom out, by clicking the background (which doesn't give you a clickable mouse pointer, but works ???) they become clickable again.
I assume this is an if / else situation where if scale < 100%, clickable, if = 100% not clickable.
If anyone has a moment to tell me if I'm in the right direction or not, or perhaps the clickable/unclickable code, I would much appreciate it.
thanks.
Stage Scale, Element Don't Scale
i got this color-changing background, and I have it fit into the browser window at 100% scale, so it scales proportional to browser window.
and then,
i got the content element on top of this color changing bkg, but i want it to remain unscaled... while always remain at the centre of the stage.
i am having this bkg and content in the same fla....
what can i do to seperate these two command ?
i did try
Stage.scaleMode = "noScale";
but it affects the background as well.
Easing Out AND Easing In Using Math?
Hello,
I'm familiar with how to ease something in using motion math. Easing out would not be that bad either. But how would I script something easing in half way, then easing out the second half? It would start slow, gradually move faster, then slow to a stop at the end. - almost like a sine wave I guess?
Any thoughts? I appreciate any feedback.
BG To Scale & Main Swf Not To Scale
Folks ive been trying to get my background to scale to whatever the browser is altered to mean while have my main flash site unscaled.
example www.lessrain.com (click on london)
Ive exhausted google trying to find a solution and had no luck from any forums. Cheers for any pointers
BG To Scale & Main Swf Not To Scale
Folks ive been trying to get my background to scale to whatever the browser is altered to mean while have my main flash site unscaled.
example www.lessrain.com (click on london)
Ive exhausted google trying to find a solution and had no luck from any forums. Cheers for any pointers
Referencing MovieClips Inside MovieClips From The Main Time Line?
is it possible to have event listeners that listen for a movie clip inside a movieclip and then execute a function from the main time line?
Or is it impossible to relate something this far removed? Sounds like a geek Jerry Springer episode!
Something sort of like this:
Attach Code
movie1_mc.closeBtn1.addEventListener(movie1_mc.MouseEvent.CLICK, closeMenu1);
movie2_mc.closeBtn2.addEventListener(movie2_mc.MouseEvent.CLICK, closeMenu1);
function closeMenu1(e:Event):void {
if (e.currentTarget.name == "closeBtn1"){
movie1.gotoAndPlay(27);
movie1.visible = true;
} else if (e.currentTarget.name == "closeBtn2") {
movie2.gotoAndPlay(27);
movie2.visible = true;
}
}
Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..
I have been working on this project that used part of the kirupa.com tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)
Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.
Here is a chunk of my code:
Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}
"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.
Thanks...
EDIT:
I got it working.. I just had to add "_root.movieclipname." in front of the movieclips I referred.
[CS3] Simple Display List Problem (MovieClips In MovieClips)
I have an object called UI_Total which contains 3 objects called Star, instanced as star1 star2 and star3.
In my code I do the standard:
PHP Code:
mainUI=new UI_total;
addChild(mainUI);
to instance the UI_Total.
Now, I can do something like
PHP Code:
mainUI.star3.x+=500
no problem.
And when I do
PHP Code:
trace(mainUI.star3.parent)
I get [object UI_Total] as expected.
Would someone be so kind as to explain to me then why
PHP Code:
mainUI.removeChild(star3)
doesn't work, and also why I can't do anything like
PHP Code:
mainUI.getChildIndex(star3)
Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..
I have been working on this project that used part of the kirupa tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)
Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.
Here is a chunk of my code:
Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}
"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.
Thanks...
RollOver Scripts On Movieclips In Movieclips With RollOvers
Hi,
This might get a little confusing so I'll try to explain clearly.
Basically, in Scene1 I have a colored rectangle movieclip with a rollover script that activates its animation e.g. on(rollOver){this.gotoAndPlay(2). That works just fine in activating the rectangle animation,which is just an alpha and tint change.
Within the rectangle movieclip symbol is another movie clip consisting of text graphics that has a similar rollover script placed within its instance within the rectangle symbol.
First of all, this rollover script will not activate when moused over, though the rectangle effect change does.
When I set the text movie clip as a button and place it within Scene 1 rather than within the rectangle symbol, the rollover does work, but it performs a rollOut of the rectangle movieclip. Even though the text button is directly on top of it, the rollOut occurs with the rectangle movieclip when the text button is rolled over.
So maybe you can see what I'm saying here. As part of the first movieclip, an embedded rollover script won't work. As a button placed on that movieclip, the button rollover state interferes with the movieclip rollover script.
I'm sure somebody has encountered this. If I haven't thoroughly confused you, hopefully some charitable soul will help me out.
thanks
Movieclips Within Empty Movieclips...problems
Okay, I'm doing a band web site for my brother and I'm running into this problem...
I want each of the links to be a separate flash file. I understand how to do that and have basic ones working. I have empty movieclips and use the loadMovie function, i.e.
Code:
on(release) {
loadMovie("shows.swf", "shows");
}
The thing is though, the shows.swf file has a textbox which is inside a movieclip which loads an external text file (this is so that they can update the site easily themselves). When I just double click the shows.swf file myself, it opens in the flash player correctly, but when I try to open it from the main.swf file, the shows.swf file loads, BUT the text doesn't appear in the textbox(which is in the movieclip). The movieclip which holds the textbox has an instance name of textbox. I can give you guys the two files if you want to see more if it will help you give me a solution to this problem. I thank you for your time and hope someone can help me.
Michael
Removing Movieclips, Alot Of Movieclips
through a duplicateMovieClip action, i created about 200 mc's named "circleMovie1", "circleMovie2", and so on.
now, how can i delete all these mc's without typing out 200 "removeMovieClip" actions?
plz help!
Movieclips Inside Movieclips Problems
hi.
i have a mc called question13 which holds a number of other mc's inside it on the 12th frame, called tick1-tick6. each of these acts as a simple radio button with the following code (for tick1)...
on (release) {
if (_root.tick1select == 1) {
_root.question13.tick1.gotoAndStop(1);
_root.tick1select = 0;
}
else {
_root.tick1select = 1;
_root.question13.tick1.gotoAndStop(2);
}
}
These work fine as they are.
but i need to set the tick1 to look as though it is "ticked" (ie at frame 2) from the main timeline, not within question13, how do i do this?
Movieclips Play Sounds Of Other Movieclips...
I made a very simply movie comprising of 6 movieclips with sound that play when you press the corresponding key. The top 3 clips play fine but the bottom three play the sound or sounds from previous clips.
also the huskey clip will play when you press either enter or space but it should only be played when you press space. (I was thinking that enter is reserved for playing movies or something.
Thanks for all help.
im using Flash 5
My .fla in a zip file -can be downloaded here...http://www3.telus.net/seanc007/MC_Test.zip
(Too big to be attached)
Checking Distance Between Movieclips Within Other Movieclips
I'm not sure if there is a really quick & dirty way to do this, but I have some movieclips, which are nested within another movieclip, and I'd like to write some code that will return which one is closest to a movieclip on the main timeline. Since there _x's are entirely different because they're not in the same movieclip - is there any way I can make this work?
Thanks!
Target Movieclips From Nested Movieclips...
All,
I was wondering if you could give me a hand?
I have a file that contains two movieclips. One movieclip contains a container clip and the other movieclip contains two nested movieclips which end up with a button. Please see diagram...
I would like for the button, when clicked, to load an external .swf file into the container movieclip which is nested inside a _root movieclip. See diagram...
I have used the following code on my button to no avail:
Code:
loadMovie("Flash/homeIMGs/image1.swf", _root.mainImageMC.imageMC);
AND
_root.mainImageMC.imageMC.loadMovie("Flash/homeIMGs/image1.swf");
Please help.
Movieclips As Buttons Embedded In Movieclips
Hi,
I have a couple movie clips embedded inside a main movie on the root of my movie.
i have an action onRollover applied to the main movie clip, which triggers actions on the movie clips inside it.
i want to use the child movie clips as buttons, but i am getting no response to the code below:
ActionScript Code:
this.mcPic.onRollOver = function() {
trace("rollover");
_root.mcPic.btnBuy.xSlideTo(135, .5, "easeOutBounce");
_root.mcPic.btnListen.xSlideTo(105, .5, "easeOutBounce");
}
this.mcPic.onRollOut = function() {
trace("rollout");
_root.mcPic.btnBuy.xSlideTo(360, .5, "easeOutBounce");
_root.mcPic.btnListen.xSlideTo(-91, .5, "easeOutBounce");
}
// the following code here gives no response.
this.mcPic.btnBuy.onRelease = function() {
trace("click OK");
}
this.mcPic.btnListen.onRelease = function() {
trace("click OK");
}
any help would be appreciated.
thanks!
eric
Getting My Buttons Active When Movieclips Are Within Movieclips
Ok so I have this site in progress with these neat drop down menus. When you rollover the image, two or more choices appear that link you to other pages. Only when you rollover them, the buttons don't work. The buttons work when you isolate each movie clip. But once I place the movieclip in the main time line, the buttons don't work anymore. The rollovers don't happen. They aren't clickable.
I need to know how to tell flash to make these buttons work. I can do this if a button is in the maintime line but not when it's embedded in a movieclip which is then embedded in the main time line. Get it?
I uploaded the work in progress so you can see what I mean. www.stephanieerdel.com/headermov.swf
rollover "Vibrations" and you'll see the choices pop up. In the movie clip each choice changes color when you rollover it. As mentioned before, when I put the clip in the main timeline, the buttons don't work. but you see them and the movie clip works fine.
If someone can write out what the code is to let flash know to make these buttons work, I would appreciate it soooo much.
Thank you!
-Stephanie
Calling Other MovieClips Inside Other MovieClips
The problem I am having is a little moe signifcant than what the titles suggests.
What I am trying to do is to determine whether a movieClip, which is nested inside another a movieClip hits another moviceClip, which, you guessed it, is inside another movieClip.
Something along the lines of this:
Code:
onClipEvent(enterFrame){
if( _root.character.charNose_mc.hitTest( this )){
_root.character._x -= _root.char_speed;
}
}
Obviously this code is not working. The movieClip the hitTest( this ) is referring to is inside another movieClip. And charNose_mc is nested inside character at the root level. As you can tell, the goal of this code is to move the character movieClip in a negative direction using a predefined variable called char_speed.
Any ideas on what I am doing wrong, or what is the proper way to format this code? Thanks!
|