[MX04] The Same Random Frame In Two Different Movie Clips
Hi, I'm a student at university and I frequently work with flash MX 2004. I'm currently working on a project that involves many characters on screen at once. only as a twist, I wish to have them scripted so that they all look different every time the swf is played.
for example, I have the head working. when the character is loaded into the frame, a random face, hairstyle and hair colour is chosen and works every time.
however what I'm stuck on is the rest of the body. I can easily set every body part at random but that will result in a bunch of characters wearing multicoloured clothing. each body part of the character is a seperate movieclip embedded into one movieclip.
right now, so that I can get a feel of it, I'm working on the shoes. I want the style of shoe to be random but i want both shoes to come out the same. initially my idea was that I have the random script on one shoe and then use script on the right but all my ideas fall short. here is what I have so far:
on the left shoe:
onClipEvent (load)
{
gotoAndStop(random (6));
}
and then on the right shoe:
onClipEvent(load)
{
gotoAndStop ((zombie.foot1.shoe1.currentFrame));
}
that was my first idea, I also thought about having:
this.currentFrame == zombie.foot1.shoe1.currentFrame;
and also the same only with currentFrame replaced with frameNumber.
this is the best that I can explain it. if people need me to go into more detail I'll be happy to.
any help would be great as I'd really love to get these things working
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-18-2007, 07:28 PM
View Complete Forum Thread with Replies
Sponsored Links:
The Same Random Frame In Two Different Movie Clips
Hi, I'm a student at university and I frequently work with flash MX 2004. I'm currently working on a project that involves many characters on screen at once. only as a twist, I wish to have them scripted so that they all look different every time the swf is played.
for example, I have the head working. when the character is loaded into the frame, a random face, hairstyle and hair colour is chosen and works every time.
however what I'm stuck on is the rest of the body. I can easily set every body part at random but that will result in a bunch of characters wearing multicoloured clothing. each body part of the character is a seperate movieclip embedded into one movieclip.
right now, so that I can get a feel of it, I'm working on the shoes. I want the style of shoe to be random but i want both shoes to come out the same. initially my idea was that I have the random script on one shoe and then use script on the right but all my ideas fall short. here is what I have so far:
on the left shoe:
onClipEvent (load)
{
gotoAndStop(random (6));
}
and then on the right shoe:
onClipEvent(load)
{
gotoAndStop ((zombie.foot1.shoe1.currentFrame));
}
that was my first idea, I also thought about having:
this.currentFrame == zombie.foot1.shoe1.currentFrame;
and also the same only with currentFrame replaced with frameNumber.
any help would be great as I'd really love to get these things working
View Replies !
View Related
[MX04]Movie That Works Fine When Clips Apart Acts Strange When Clips Are Together.
Hi,
I have a pretty basic movie in which a ball moves along a track.
The track is made up of 3 sections & all I want the movie to do is trace an ID number (num) that is an individual property of that clip when it goes over it.
In the first movie attached below “trackOne” the whole thing works great! However in the other movie “trackTwo” I have moved the clips closer together & the whole thing has gone crazy with the following issues.
1.)The “trace” command fires on every “onEnterClip” event
2.)A text field that is used to show the ID number only changes when the ball is fully over the clip not as it first touches it, as it does in the first movie
3.)Although the ball is full off a clip it keeps tracing it’s ID number together with the new clips number?
Anybody able to help me on this?
View Replies !
View Related
[MX04]moving To A Random Frame
Hello,
currently I have been encountering a problem with random frame movement.I want to do something like this-
When I come to frame 1, automatically go to frame 2 or 15, not 2-15,
ONLY 2 OR 15.
I know how to do 2-15,
Code:
gotoAndPlay(random(2)+15)
Can somebody help me!
Thank You,
Chinmaya
View Replies !
View Related
[MX04][AS2]moving To Random Frame
Hello,
currently I have been encountering a problem with random frame movement.I want to do something like this-
When I come to frame 1, automatically go to frame 2 or 15, not 2-15,
ONLY 2 OR 15.
I know how to do 2-15,
gotoAndPlay(random(2)+15)
Can somebody help me!
Thank You,
Chinmaya
View Replies !
View Related
Random Movie Clips To Play For Random Amount Of Time
hi,
i am loading external movieclips randomly into 4 seperate emptymovies, i now need a way to get these random clips that i am loading to play for a random amount of time and then load the next clip.
i need some help with the code...
how do i get the clips to loop, then assign each a random number and have flash check if the random num is = to current frame...if it is, have that clip stop and a new one load?
i have no idea how to write the code for this
any help would be great
thanks
this is what i was given so far..but don't know what to do with it.
Code:
var rnd = Math.round(Math.random(mc._totalframes));
mc.onEnterFrame = function() {
this._currentframe >= this._parent.rnd ? unloadMovie(this) : null;
}
View Replies !
View Related
[MX04] Communication Between Two Movie Clips
I am stumped on this one, so maybe someone wiser to the ways of Flash MX04Pro might help. I'm not sure how to illustrate this problem very well so please let me know if the following is completely confusing.
I currently have a file with the following basic structure:
MAIN TIMELINE {frames: a {containing MC X with local timeline including frames: I, II, III... } , b, c {containing MC Y with local timeline including frames I, II, III ... } d ...}.
What I am trying to do is have a button in (MAIN TIMELINE/frame a/MC X/ frame II) cause the playhead to move to (MAIN TIMELINE/frame c/MC Y/ frame III). Whew.
I first attempted to place this code in the button (with the actual instance names, of course, and not these):
Code:
on (release) {
_root.gotoAndPlay("c");
_root.MC Y.gotoAndPlay("III");
}
I was hoping that this would cause the main playhead to move to the desired frame in the main timeline and then cause the MC's playhead to move it's desired frame in it's timeline. No luck.
My next thought was to create a function that sent a variable to the MC that would tell it which of it's frames to play. However, I am shaky on how to do this. Can anyone lend a hand?
Thanks, and let me know if I need to explain this more thoroughly or post more detailed code.
-ZR
View Replies !
View Related
[MX04] Movie Clips - Closing Them
Hi there
I have a movie clip (a) and another movie clip (b) inside it which plays when a button is pressed in movie clip (a). How do i get back to first frame of movie clip (a)?
I have a button called 'close' in movie (b) which i'm trying to code so that movie (b) closes and it goes back to the original movie (a).
I'm not doing things right i know and need some help.
Cheers
M
View Replies !
View Related
[MX04] Help With Duplicating Movie Clips?
I just went through all of the tutorials in the games sections, and could not find ANYTHING on duplicating movie clips after Flash 4, not even in game things. The only ones I did find were in Flash 4.
So I attacked the idea of duplicating movie clips myself.
I created one frame, with a bullet (A grey paint streak, just imagined it as a... really slow bullet), made it a movie clip, and added the code:
onClipEvent(enterFrame) {
this._x+=5
}
I gave the frame (There is only one frame) this code:
stop();
if(key.isDown(key.SPACE)) {
duplicateMovieClip(bullet, bullet1, 100)
}
This is the listing on the help:
duplicateMovieClip(name,newname,depth)
I have no idea what the depth is for, so I just set it to 100 assuming it was the same as alpha or opacity.
And guess what happened:
The bullet moved like it was supposed to, but nothing happened at all when I pressed space.
All I want to do is have pressing the space bar create a duplicate of that movie clip from it's original position.
Can anyone help me fix this?
ATTENTION: Please do not offer me a free toaster.
View Replies !
View Related
[MX04] Backwards Movie Clips
This is what i got so far,
A really freaky man-chick thing flashes on the screen, then it cuts to a clip of 4 guys running down a flight of stairs, then when they get to the bottom of the satires the chick-man thing flashes again, and then what i want to happen is have them run up the steps in reverse. How do i get the movie clip to play in reverse? i used to know,but cant remember how to do it.
Any help would be much appreciated.
View Replies !
View Related
[MX04] Removing Movie Clips
I am making a platformer game that calls certain sectors of the level, and loads them when the current sector is off the screen. But when i do this, I use this code to unload the clip when it runs off of the screen. It doesn't do it though.
Code:
function sectorSwap(){
sectorCoords = platform["sector" + (sectorFocus - 1)].getBounds(_root)
if(sectorCoords.xMax <= 0){
platform["sector" + (sectorFocus - 1)].unloadMovie();
}
sectorCoords2 = platform["sector" + sectorFocus].getBounds(_root)
if(sectorCoords2.xMax <= 800){
sectorFocus = sectorFocus + 1;
attachNextSector();
}
}
Will it not unload because I put the movie in with AttachMovie?
View Replies !
View Related
[MX04] Buttons And Movie Clips...
Hi Everyone,
I am currently working on a project that I am having trouble with. I've got a navbar and some text. What I am trying to do is when you select "home" the text fades in, then stays there until you select (for example) "about us" which would then fade out the text that was currently there, and then fade in new text. These navbar buttons also have to change the page. What I have done is created a movie clip which has the fading in and out effects for each set of text. All of the appropriate keyframes have the stop action, and all of the appropriate frame labels (or are they called instances, I can't remember). This is where my problem starts. I can get it so it plays the text fading in, and then fading out when another button is selected, but I can't get it to fade the new text in. If there was a way to "pause" the action script I could make it work, but I think I'm out of luck there. The type of action script I'm using is the "on release" and _root.header and gotoandplay ().
Anyways I think that's all, but I'm sure I have missed something important. I can set the .fla online and give you the link if need be.
Thank you for your time, I appreciate it.
~FOX~
View Replies !
View Related
[MX04] Buttons Triggering Other Movie Clips
Im using MX 2004 and i was wondering how i could do this:
when you roll over a button it triggers a movie clip to run. The longer you hold your mouse over the button, the longer the MC runs. when you take your mouse off the button the MC stops on that frame.
any advice on how to create this would be great.
thanks
View Replies !
View Related
[MX04] Duplicate Multiple Movie Clips
I want multiple instances of the f(x) logo on the screen at the same time. What do you suggest?
http://funkshun.us/banner.xhtml
the f(x) logo is name fxfade_mc and there is one instance placed off the stage
// root frame 1
Code:
function fxfade(){
moviename = random(10);
varrotate = random(360);
varscale = random(120)+50;
xlocation = random(530)+30;
ylocation = random(115)-30;
duplicateMovieClip(fxfade_mc, moviename, 0)
};
setInterval(fxfade, 500);
// inside the fxfade_mc movie on frame 1
Code:
this._xscale = _root.varscale;
this._yscale = _root.varscale;
this._x = _root.xlocation;
this._y = _root.ylocation;
this._rotation = _root.varrotate;
// inside the fxfade_mc movie on last frame
Code:
varname = this.name
if(varname != "fxfade_mc"){
this.removeMovieClip();
}
stop();
View Replies !
View Related
[MX04] Preloader, Then Load Movie Clips Help
I am having trouble with the actionscript here. Preloader works fine, then goes to movieclip1 (slide1) which then plays.
But then I want it to play movieclip2, which is an external mc, and then from movieclip2 (slide2) I want it to cycle back to movieclip1 and play.
Can anyone help me with this?
I'm attaching the (not completed and inserted smaller jpegs for the purpose of uploading) file here...
BIG NOTE: There's a third actionscript file you need but it won't let me upload it.
Take the code below and create a file called Preloader.as, save it to the root.
class Preloader extends MovieClip{
private var target_mc:MovieClip;
private var progress_mc:MovieClip;
private var pct_str:String;
private var dispatchEvent:Function;
public var addEventListener:Function;
public var removeEventListener:Function;
function Preloader(){
// initialize with EventDispatcher so the preloader can broadcast events
mx.events.EventDispatcher.initialize(this);
}
public function startPreload(t:MovieClip){
// set a reference to the timeline that is loading
target_mc = t;
// reveal the preloader clip
this.gotoAndPlay("IN");
}
private function onAnimateIn(){
this.stop();
// this is called from the preloader mc timeline on the last frame of the 'in' animation
// starts checking the load progress of the target movie clip on each frame
this.onEnterFrame = this.checkLoadProgress;
}
private function checkLoadProgress(){
// get the total bytes and the loaded bytes of the target clip
var bl = target_mc.getBytesLoaded();
var bt = target_mc.getBytesTotal();
// calculate the percentage of bytes loaded
var pct = bl/bt;
// get the current frame and total frames of the progress clip
var cf = progress_mc._currentframe;
var tf = progress_mc._totalframes;
// calculate the frame that corresponds with the load percentage
var f = Math.ceil(tf * pct);
// if the current frame of the progress mc is less than the value of f then let the clip play
// otherwise, stop the progress clip to wait for f to catch up with the current frame
// this prevents the animation from jumping ahead if the target clip is loading faster than
// your progress animation
if(f > cf){
progress_mc.play();
}else{
progress_mc.stop();
}
// set percent display in preloader_mc based on percentage of frames that have played
this.pct_str = (Math.round(cf/tf * 100)).toString();
// if the clip is entirely loaded, and the progress clip has played all the way through
// then the preloading is complete
if(bt > 20 && bl == bt && cf == tf && progress_mc){
onPreloadComplete();
}
}
private function onPreloadComplete(){
// stop the check load call
this.onEnterFrame = null;
// animate the preloader
this.gotoAndPlay("OUT");
}
private function onAnimateOut(){
this.stop();
// dispatch event that tells any listeners that the preloader is done
dispatchEvent({target:this, type:'onPreloaderOut'});
}
}
View Replies !
View Related
[MX04] Looping Multiple Movie Clips
Hello all-
I am creating an ad/header graphic for a web site. I have 7 movie clips that I need to rotate through. They are pretty basic movie clips, picture fades in, text fades in, pauses for 15 seconds, then needs to move on to next movie clip. There's where my problem lies.
I have it set up on Scene 1, where I have movie clip 1 as a layer 1, movie clip 2 as layer 2, movie clip 3 as layer 3, etc. When I preview it, only movie clip 1 plays and then it repeats itself. It never makes it to the next movie clip. Is there some action script that I can put in to make it jump to the next movie clip? Is there an easier way to do this, or do I need to create one long movie clip that includes all 7 movies?
Thanks!
Kauzmo
View Replies !
View Related
[MX04] Loading Multiple Movie Clips
I have a movie that I am trying to load two other movies into. One is a nav and the other a looped movie sequence.
I created two empty movie clips in the main movie clip:
mcLoader and mcLoader2
on an actions layer I have:
mcLoader.loadMovie("MovieClips/nav2.swf");
mcLoader2.loadMovie("MovieClips/ex1.swf");
Neither file loads or the first loads if I remove the second. The movies are in teh right folders. I'd appreciate some hints. I'm sure I'm missing something but I've been looking at this forever. Thanks in advance for any advice, I appreciate it
View Replies !
View Related
[MX04] Load / Unload Movie Clips
I am loading external SWFs on my main flash file.
For every External SWFs:
They also have multiple levels. There is a base SWF and then 5 levels of other external SWFs there.
So- i load an external SWF on my main flash and that external SWF also has its own external SWFs.
This is how i do that:
on my main flash file.. i create a blank MC:
this.createEmptyMovieClip("blank1", this.getNextHighestDepth());
Now, by default i load my first external MC there (ExtMC1)
_root.blank1.loadMovie("ExtMC1.swf");
Now i have a button (Button2) and when it should be clicked- it should replace ExtMC1 with ExtMC2.
_root.blank1.loadMovie("ExtMC2.swf");
This just don't work because it does replace the base file for ExtMC1 but the external SWFs within ExtMC1 remains on the main flash file..
so i use this instead:
button2.onRelease = function() {
unloadMovieNum(1);
unloadMovieNum(2);
unloadMovieNum(3);
unloadMovieNum(4);
unloadMovieNum(5);
_root.blank1.loadMovie("ExtMC2.swf");
};
so basically i clear all the levels first and then load my second MC (ExtMC2.swf).
similarly to load my third MC i use this on button 3:
button3.onRelease = function() {
unloadMovieNum(1);
unloadMovieNum(2);
unloadMovieNum(3);
unloadMovieNum(4);
unloadMovieNum(5);
_root.blank1.loadMovie("ExtMC3.swf");
};
is there any better way of doing the same- it does work but the issue is, when the first MC (ExtMC1) is loading and click on the button 2 to load the second MC (ExtMC2) - it takes a lot of time.. so i need an effective way of doing the same.. please help.
View Replies !
View Related
Movie Go To Random Frame Flash MX (Strange Problem With A Frame Showing As Blank)
I'm building a site for my fathers company and as part of the header I'm trying to get a movie to decide a random frame to go to so it plays a random animation at the top of each page.
I am using this script (which im not sure is right to make it do this)
play();
what_number = Number(random(3)+1);
gotoAndStop(_root.what_number);
It seems to work but the problem is there are 3 frames, 2 show up fine in random mode but it seems when the other is going to be shown i just get a blank frame instead with just the bg colour showing, ive spent hours trying to work out whats going on but I have no idea.
The site can be viewed at http://www.andrew-winchester.com/pip After you navigate from the index page the smaller random header appears and should show either of the 3 animations from the main header on the index.
Here is a link to the .fla for the smaller header file if that helps http://www.andrew-winchester.com/pip/header.fla
This is really driving me crazy, there must be some simple solution that I am overlooking or some silly mistake ive made ?
Thanks for anyone that can solve it !
View Replies !
View Related
Scrolling Multiple Movie Clips Simultaneously [MX04]
hello all...
i have a fairly complex question:
i'm building a gallery. there will be one main page with thumbnails, each representing a sub-gallery. what i've done is construct 11 separate _mc's so that onRollover, the thumbnail fades in from 40% to 100% _alpha and a line of text appears underneath the thumbnail. then, onRelease, each thumbnail acts as a button to gotoAndPlay another frame on the main timeline. each sub-gallery will occupy one frame on the main timeline and jpegs will be loaded from an external XML file. this part works fine.
now, what i'd like to do is somehow "group" the 11 _mc's on the main gallery page so that i can have them scroll from left to right simultaneously onRollover, possibly using a mask or invisible button. they are each 150px wide, so they don't all fit on the stage and there will eventually be MORE _mc's, each representing new sub-galleries.
what is the best way to do this?
i've done a lot of searching for tutorials on horizontal scrolling for jpgs and galleries, but i haven't been able to find something similar for _mc's. is there a way to do this dynamically (e.g. load the _mc's into another _mc?) i started reading a bit on nesting using the attachmovie() function, but it seems like that only loads one _mc per level, using the main registration point. i want all the _mc's side by side, spaced evenly, so they scroll in unison. also, i'm not sure if having two onRollover events will cause a conflict.
any help or suggestions would be GREATLY appreciated...
THANK YOU!!!
View Replies !
View Related
[MX04] Movie Clips - Drag N Drop Sensitivity
Greetings,
I'm experiencing problems with rectangular shaped move clips with the registration point set to the default 'center'.
They seem to be very sensitive when the mouse hovers over them to change shape to allow them to be dragged, suprising since they are of a such flat shape and not incredibly small.
Its best described as not very user friendly!
Is there anything I can do to improve/resolve this issue?
Anyone else experienced this?
Attached code to the movie clip to allow them to be dragged, also experiment with true/false value in startDrag params.
Code:
on(press) {
startDrag(this,true);
}
View Replies !
View Related
[MX04]Creating Functions For Pre-existing Movie-clips
Hello,
This is my third thread on these forums and in my previous threads I had always got some help.Well, now I have another serious problem, can you help me?
I am unable to create a function that can control movie clips. Let me explain:-
I have 10 movie clips on the stage and I have assigned them that whenever they crash to an object, they will go to a random position. Writing this code ten times for each movie clip would be very tedious, so, I thought about creating a function, but, it doesn't work. Here's the function, can you correct it?
Code:
var object:movieClip;
function position(object) {
var testnum1:Number;
testnum1 = random(290)+36;
_root.object._y = -77.6;
_root.object._x = testnum1;
}
position(nameofmovieclip)
PLEASE HELP IS REQUIRED!!!!
Thanking All,
Chinmaya
View Replies !
View Related
[MX04] Duplicating/Creating Instance Of Movie Clips
Greetings,
Im WIP in creating a game which has movieclips (bullet and live symbols) dotted on the stage but not in the visible runtime view.
These movieclips are then duplicated when required. The bullets have code attached to the movieclips however the lives symbols don't.
Is this common practise to have movieclips hidden offscreen and then duplicated to create an instance when required or is their a cleaner method to create an instance of a movieclip?
Hope that makes sense.
Thanks
Rob
View Replies !
View Related
[MX04] Problems Using Drop Target With Nest Movie Clips
Hi !
I wonder if anyone can help me solve this bit of code i'm having problems with..
I'm working on a site that will have a panel that can be dragged from the botttom of the screen. the panel includes navigation and data from an xml file. i have made this and called it info_mc.
the first time i created it, i realised that making info_mc the draggable item meant i lost my buttons in the panel, so i created another movieclip called drag_mc and place it in info_mc.
Theorising that when you pressed on drag_mc it would drag info_mc with it. after much tinkering with the script i got this to work as i wanted. ( when you drage it up it slides up and when youo release it slides back down out of view.
I now want to put a drop target so that when it is dragged over the target it will stick, at present the droptarget doesn't work. I've done this before but not with an embedded drag_mc . below is the script as it is at present. i'm sure the problem has something to do with the paths to drag_mc, info_mc and circleTarget. but have not been able to fix it.
The elements are laid out as so:
main timeline contains - circleTarget, info_mc
info_mc contains - Drag_mc, script for dragging (see below)
circletarget contains - 2xkeyframes with script stop(); in each.
you can see a mock up of the flash movie and download the FLA here:
http://www.bru-ha.com/flashdemo/drangndrop
http://www.bru-ha.com/flashdemo/drangndrop.swf
Here is the script info_mc that should do all the dragging and dropping.
code:
drag_mc.onPress=function(){
startDrag(_root.info_mc,true,_x,580,_x,0)
}
drag_mc.onRelease=drag_mc.onReleaseOutside=functio n(){
stopDrag();
if (_root.info_mc._droptarget == "../targetCircle") {
_root.info_mc.onTarget=true;
_root.targetCircle.gotoAndStop(2);
}else{
_root.info_mc.onTarget=false;
_root._parent.targetCircle.gotoAndStop(1)
}
}
//sets function on embedded drag button to drag info_mc
//the variables below will store the clips starting position
_root.info_mc.myHomeX=_root.info_mc._x;
_root.info_mc.myHomeY=_root.info_mc._y;
drag_mc.onMouseDown=function(){
//this variable tells us if the mouse is up or down
mousePressed=true;
}
drag_mc.onMouseUp=function(){
mousePressed=false;
}
drag_mc.onEnterFrame=function(){
//all these actions basically just say "if the mouse is up (in other words - the clip is not being dragged)
// then move the MC back to its original starting point (with a smooth motion)
if(mousePressed==false&&_root.info_mc.onTarget==fa lse){
_root.info_mc._x-=(_root.info_mc._x-_root.info_mc.myHomeX)/5;
_root.info_mc._y-=(_root.info_mc._y-_root.info_mc.myHomeY)/5;
}
}
I hope someone out there will be able to help me, or give me some advice...
best
Andy
View Replies !
View Related
[MX04] Moving The Last Frame Of A Movie To Shorten Movie
I have just started working with MX 2004 & there is an aspect to it that really bugs me.
With MX(2000) say you had a timeline length of 40 frames & you wanted to make it shorter, say 30 frames, you would grab the last frame & move it to the left to shorten it. Nothing but virgin frames would be visible after 30.
With MX2004 i have a 60 frame timeline that I want to take down to 20 & I cannot move the last frame (it's not a key frame – just the rectangular symbol denoting the end of a movie) I can of course insert blank frames up to the end point but not physically move it across. I'm I missing a trick here?
View Replies !
View Related
HitTest From Frame 1 Of Main Movie[mx04]
My fla is too big to upoad here, but can someone take a look
http://www.scaeriefaerietails.com/fla/L_Web.zip
What I was trying to do is to get the animation on 'bt', or 'b1'( they are stacked on top of each other) to gotoAndPlay "_over" when it hits the lower red dot(instance 'oneHT') and then gotoAndPlay "_out" when it hits the second higher red dot(instance 'twoHT'), and then do the same for each windmill blade as it passes the red dots during it's rotation.
When I attach script to the movieclip it works, but I'd like to just keep all the actionscript on the main timeline so I dont' forget where I put things. I think the problem is that I'm targeting them wrong, but I'm not sure.
Pleeeeaase help
View Replies !
View Related
[MX04] Random Number Generator Tells A Movie Clip To Start
I have a movie clip. In it i am trying to get a dynamic text box to constantly generate random numbers. When it finds a certain number i want it to make a movie clip play.
I am using:
onClipEvent (enterFrame);
_root.randomtext = random (10);
If (_root.randomtext == 4)
gotoAndPlay ("start clip");
}}
The problem is the text box will sometimes generate only ONE number or none at all. Please help.
View Replies !
View Related
[MX04] Movie Clip Not Advancing To Desired Frame
I was wondering if anyone could help me with this tutorial. I didn't see an author attached to it anymore and it appears to be a few years old http://www.flashkit.com/tutorials/In...-596/index.php .
In the code for the button, it says you should be able to change the frame it goes to when you click the button based on the number in "x = Number(x) + 1" I have tried several different frame numbers but it keeps going back to frame 1 no matter what. Any idea why?
on (release) {
duplicateMovieClip("/window", "/window" add x, x);
x = Number(x)+1;
}
I realize I'm using MX2004 and this code is old but I can't seem to find a better tutorial. For my application I'm going to have two rows of navigational buttons. I need to have the ability to have two windows open at once (one window from each row of buttons) and make them draggable. If anyone knows of a good tutorial please let me know.
Thank you!
View Replies !
View Related
Random Movie Clips
I have 5 movie clips, each with 20 frames. I would like one to play and then randomly choose which one of the five it plays next. I know how to play random frames but the movie clips need to start on frame one and end on frmae 20 then randomly choose wich clip to play next.
Can this be done and if so how can I do it???
Thanks for the help
brian
View Replies !
View Related
Random Movie Clips..
Hi there, i was wondering how i could have 10 of my movie clips appear randomly on the screen(different _x and _y) but also between every 20 to 40 seconds..
Does anyone know how to do this?
See ya
zerodonor
View Replies !
View Related
Random Movie Clips
Is it possible to have a set of 5 movieclips that flash will play any given one when the particular section of the movie is accessed. Is there a randomizer i can use to attach the names of movie clips? How can i do that?
Thanks.
View Replies !
View Related
Random Movie Clips
OK. let me see if I can explain this properly.
I have 10 movieclip icons positioned on the stage in a specific order.
I would like to have a 10 second lead in that displays each movieclip in a random/different position until they finally fall into their correct order.
Now, the positions won't be completely random. There will only be 10 positions that the movieclips can utilize and I don't want to have multiple movieclips per position.
Here is a visual: Each number represents a movieclip.
00 01 02 03 04
05 06 07 08 09
09 06 01 08 00
02 05 03 07 04
04 09 02 06 01
00 08 03 05 07
03 08 02 00 09
01 07 05 06 04
Does this make sense? Notice how the numbers stay in the same 10 positions. They just are different in every second/frame of the lead in.
Does anyone know how to code this properly?
View Replies !
View Related
Random Movie Clips Please Help If You Can
Hey people...
can anyone out there help ....
i want to create a mc that contains several diferrenct images.....which appear on screen until the user closes the movie ..the oonly thing is i od not want the images to play in the same order each time the movie goes back to frame 1 of the mc...
does anyone out there know the action script i should apply or of any good tutorials or source files i could look at ...thanks for the help by the way it is falsh 5 i am using..........
thanks
View Replies !
View Related
Random Movie Clips
I am trying to make buttons pop up on random intersections of a invisible grid (or anywhere if possble) for a specific amount of frames. Is there also a random movement action script for the buttons where you can control the size of the movement and how complex the movements are. Thanks for all your help.
View Replies !
View Related
Random Movie Clips
Hello all. For the home page to my site, I would like to have it so that whenever someone comes to the home page, 1 of 5 different flash animations will play randomly. That way every time they might see something new. Any leads on a tutorial or what I need to do to accomplish this. Any help would be appreciated. Thanks.
Daniel
View Replies !
View Related
Random Movie Clips
Thanks for reading my post. I have a script that randomly displays a movie clip of a logo. As shown below:
function showLogo(){
var rndNum:Number = Math.round(Math.random()*11);
this.attachMovie("logo" + rndNum, "logo1_mc", this.getNextHighestDepth(), {_x:0, _y:0});
}
setInterval(showLogo(),1000);
It seems to be working. But, I still have two problems.
1. The moviclips stay on the stage after a new clip called.
2. I'd like to have the movieclips fade in then out.
My questions:
1. setInterval() doesn't seem to be called. The online change in the interval between logos comes from the length of the main timeline. How do I get it to work?
2. How do I remove a movieclip from the stage? Do I apply it to the moveclp being shown? Or the moviclip calling the function?
3.How does the _alpha function work?
I'm new to doing this. So, I thank you for your patience in advance.
View Replies !
View Related
Random Movie Clips
Does anyone know how to call up random movie clips when a button is pushed? I have 5 clips with audio and animation that I want to call up radomly when clicked. Thanks for any help.
View Replies !
View Related
AS 2 Random Movie Clips
I have three different movie clips linked out of the library.
I would like to set it up so (randomly) it will be a different movie clip that comes up when the user brings up the site. Any thoughts on how to achieve this?
View Replies !
View Related
Load Movie But Now I Want To Go Back To Parent And Play A Frame MX04
I have three swfs:
a.. slide1.swf (parent)
b.. slideshow2.swf
c.. namemov.swf (the logo I want to appear after the slideshow plays)
On slide1.swf I have a preloader, then it has part of a slideshow. Then I
load slideshow2.swf. That plays. Now, on slideshow2.swf's last frame, I want
it to go to slide1.swf and play frame "name". At which point I want
slideshow2.swf to play and loop while namemov.swf is loaded on a higher
level.
Final result is you see a slideshow, then the name appears while the second
part of the slideshow loops underneath it.
I have been trying, and trying, and trying to do this but every time I get
to slideshow2.swf it just loops in on itself.
PLEASE, PLEASE HELP... : (
View Replies !
View Related
Random Scrolling Movie Clips
ok i will try to explain this the best that i can. I want to be able to have an asteriod field type effect. In other words i want to be able to have movie clips appear on the left side of the screen and scroll...random speed and y values acroos the screen til they get to the right side and then appear on the left agian. I know this can be done, if your not sure what i mean check out http://www.kirupa.com/about/linkus.htm and its basically the effect in the link too button.
ANY HELP WOULD ROCK THANKS
Keith
View Replies !
View Related
Loading Random Movie Clips
I'm trying to randomly load different movie clips at different time intervals. I know the loadmovie clip action, etc, but I do not know how to set up the action script, could somebody point me to the right direction?
Thanx in advance
Chap
View Replies !
View Related
Random Timing On Movie Clips
I'm suffering through trying to understand actionScript. I use Flash MX.
Right now I'm working on the classic "blocks falling" when on mouse rollOver. It's a grid of the 81 blocks in a 9X9 square. )Of course, each block is an instance of the same clip.) When the blocks fall away they reveal text. It works fine. However...
What I'd LIKE to do is have them fall at random time intervals WITHOUT the use of the mouse. I've looked around FlashKit for random stuff, there's a lot about changing clip properties, but I found nothing that tells a clip WHEN to begin.
Any code suggestions?
View Replies !
View Related
Loading Random Movie Clips
Hey guys,
I have been designing flash for a little while now but never really learned actionscripting. My tweening is good though. Could anybody please help me put the following mini-project together?
Here is what I want to do:
I have designed a little presentation for my website. It begins with a preloader, then a 'welcome' movieclip.
Firstly, should this movieclip be a movieclip or should it just tween on the main timeline? As it only plays once, I guess it doesn't need to be a movieclip, right? Should it be a seperate scene?
Secondly, I have designed six additional movieclips that I want to play in a random order after the welcome.
Thirdly, I want to conclude the presentation. Should I use a movieclip or a scene?
View Replies !
View Related
Display Random Movie Clips?
Let say I have a scene with a random character to appear ho would I do that?
Would I put all the symbols (with a character in each) in the scene and somehow hide them? and then randomly real one?
Or would it be that could only load one at a time?
Thanks in advance.
View Replies !
View Related
Random Load Movie Clips
Hi there,
Could someone point me in the right direction..
I have created my site perfectly and each clip loads from Movie Clips etc.. What I have is on the homepage different areas such as news, clients, features.. What i want to do now is in each of these areas load a random movie clip to make the site look like it is more dynamic.. Has anyone got a script for this that i can pre select say 3 - 5 swf files to load randomly or in order each time the page is refreshed. I would want to do this for each MC so the site looks dynamic.
Thanks.....
View Replies !
View Related
Random Cycles Of Movie Clips
Hello,
I have about 6 movie clips, labeled one, two, three, etc that I want to appear randomly, one at a time for about 5 seconds, then dissapear and load another, etc.
Also, I have 6 buttons and when one of them is rolled-ever, is it possible to pause this randomization?
Thank you in advance----Shadoman
View Replies !
View Related
Random Clips In A Movie In A Set Place
I’m using flash mx to make this.
I have made the following movie and I wanted the 4 movie clips inside to display randomly (snail, worm, hot air balloon and airplane)
Here’s a link to the swf file if this helps visualise it better.
I was using a script suggested by someone on the site, but I realised that it wouldn’t work in the way I wanted as it just pulled the clips from the library and didn’t put them in the right place within the movie.
I wanted the clips to appear randomly at different time but at set places on the screen.
Can you think of any way I can do this?
View Replies !
View Related
Stop Random Movie Clips?
hey
i have created a littl game where random movie clips appear in random places, when they are clicked on, they dissapear.
the only thing is that i cant seem to stop the entire scene after a while so that it will go onto the next scene, instead the random mc's keep appearing throughout all the scenes...
how can i stop the scene after a certain time???
i attached a demo file to show what i mean.
please help!
View Replies !
View Related
|