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




Complete Movie Cycle



I am currently working on a gallery for images. I've built preview buttons with a fade movie on the over state. I was wondering how I could tell the movie to complete it's cycle from the over state once the mouse has moved off the botton.

My idea was inspired by the images buttons at:
www.fullsail.com
The page that I'm working on is at:
http://www.image202.com/2.0/I202_Portfolio_PR.html

It's still under development.

Let me know any suggestion/insite.

thanks much.



FlashKit > Flash Help > Flash General Help
Posted on: 09-26-2003, 02:08 PM


View Complete Forum Thread with Replies

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

Cycle Colors On Movie Clip
What i'm trying to do is make a movie clip box change colors with each consecutive click. I only need 3 colors...green, yellow, red. Basically, it's a couple different status boxes, and each click on that box will change the color, then repeat itself (go back to green).

Any help is appreciated!
Thanks

2 Logical Questions About Movie Event Life Cycle
Hi all

the 1 Question : can someone describe the Movie Event Life Cycle

first is Load Movie Then what

for example in ASP.NET The Live Cycle is

Page_Init

Page_Load

Control Events

Page_Unload

Page is disposed


the 2 Question : does the Load Movie executes more than one

at a run time ?

thanks a lot

FLA Supplied: Cycle Thru Movie Clips When Pressing A Button
Hi All,

I have a problem because I don't know what I am doing. I am very new to programming. The coding you see below is just a try after looking at various bits of code on the Net but not really knowing how they work.

What I want to do:

Using Flash MX

Each time I press the same button, I want a different text statement to display. Press once, one statement shows. Press again, a different one shows, etc. You get the picture.

What I have attempted:

FLA URL: www.geocities.com/dominic1_nz/

I have three movie clips on the first frame of the main timeline, each named "page1", "page2", and "page3". In these movie clips I have a text statement on the second frame. It's not on the first frame because I do not want the text to show.

On the first frame on the timeline, I have this code:

_root.n=1

My code on the button instance (stored on the first frame):

on (release) {
if (_root.n=1) {_root.page1.gotoAndStop(1); _root.n=2;}

else

if (_root.n=2) {_root.page2.gotoAndStop(2);_root.n=3;}

else

if (_root.n=3) {_root.page3.gotoAndStop(2); _root.n=1;}

}

Any help appreciated - I'm learning!!

How To Cycle Both Ways Through Numbers Using Buttons, How To Rotate A Movie Clip
Hi there,

I use Flash 8, and my questions involve a radio simulator I'm developing, which I've posted a screenshot of below:



As you can see, there is a large dial on the left. The arrows above the dial are supposed to rotate through the digital numbers on the screen, which are located in a dynamic text field called channel_txt. When it hits 01, it is supposed to go back to 88. For the left arrow, which scrolls DOWN through the numbers, this works fine, but the right arrow, which is supposed to scroll UP, does nothing. What's more, when the right arrow is hit, then the left arrow won't scroll through properly afterwards, coming up with things like NaN. The dial's instance is named select_mc.

This is the code I used for the left arrow:
code:
on (press) {
select_mc.onEnterFrame = function() {
channel_txt.text -= 1;
select_mc._rotation -= 5;
mySound_sound = new Sound();
mySound_sound.attachSound("16-9");
mySound_sound.start(0,1);
if (channel_txt.text <= 9) {
channel_txt.text = "0" + channel_txt.text;
}
if (channel_txt.text < 1) {
channel_txt.text = 88;
}
}
}
on (release, releaseOutside) {
select_mc.onEnterFrame = function() {
null;
}
}


It would seem to me that all I'd need to change for the right arrow, would be to change the operators for line 3 to "+=", which is what I've done, but this does not seem to be the case. That is what I did for line 4 (which rotates the dial), and that works fine. All other code is the same for the right arrow. Does this ring a bell with anyone?

My second question involves the smaller dial to its right, the "vol" dial. All I'm trying to do right now is to get it to rotate. The code for the left arrow is:
code:
on (press) {
vol_mc.onEnterFrame = function() {
if (vol_mc._rotation > -120) {
vol_mc._rotation -= 5;
}
}
}
on (release, releaseOutside) {
vol_mc.onEnterFrame = function() {
null;
}
}

Line 3 is there just to get it to stop rotating at a designated point. The dial's instance is named vol_mc. The dial to ITS right, labeled "SQL", works perfectly in this regard. The only difference in the code is that its instance is sql_mc. This one really perplexes me, because I can't figure out why one works fine and the other not at all, when they have the same code. Any bells rung on this one? The dials are not on the same layer; I don't know if that's relevant.

Thank you so much to anyone who can pinpoint what I've left out or done wrong on either of these. I'm guessing it's not too complicated, but I just don't know. Much appreciated!

Todd

Can You Complete My Movie ?
Hi all, new here, great forum !

I am working on a new movie for my site. I am happy with what I have so far but have hit a stumbling block. Please take a look at the .fla file and let me explain.
The timeline proceeds to a certain point until the tweens and fades are complete. At this point of the timeline I am happy for it to stop and the only thing I then require is for the >> & << buttons to work. I have 110 images which need to be shown in the white box (one at a time of course) and with each new image, the blue text which reads 'Badge 101' needs to increase by one (102, 103, 104 etc...)
To keep the swf size down I want to pull the images in from a folder on the server. Can you help ?????

Cheers
Gary

Redirect After Movie Is Complete
I Have An Intro For My Page, And I Want It To Redirect To My Main Site After It Is Shown. Any Help?

Movie Complete Qiestion
hi!
ive asigned this code to the timeline when ive put the movie

Code:
intro.onMovieComplete = function() {
gotoAndPlay("anim1",1);
}

and it wont work!
any suggestion?
thanx in advance!

Closing Movie Once Complete Help
Hi everyone,

I'm a newbie - well, sort of - and I'm stuck. If anyone could help, I'd really appreciate it.

I have a main shell .swf that calls other .swf files into it using URLRequest, once a user clicks a certain button (i.e., user clicks button 1, movie 1 plays, button two, movie 2 plays). Got that to work great. Problem is, once one of those movies is complete, I want the movie to automatically close and go to the next frame without the user having to do anything. I don't know how to have an event listener know if the movie is complete - Once I do that, I can just have it close the movie and move on, or add an other action...

Please help!! Thanks

Complete Movie Needs To Be Resized
please forgive me for posting a question that's already been asked numerous times. to minimize wasting your time I did search the forums but the problem I ran into was just me getting more confused.

my question, I have made a complete flash site and found that I need to resize it. is there any easy solution to resize everything (objects, text, etc) without manually resizing everything one by one? Any help would be much appreciated. Thanks.

Loading Complete Movie Before Play
I have an intro and it has 2 scenes, the first scene loads fast, but the second scene takes to long, I don't want the intro to start until the entire movie is downloaded and I would like to have a loader playing until it does, can any of you guys help me ? Please send me the script.I'm in a big big hurry ( as always ) THanks

Action For Closing The Complete Movie
hi,
What's the action name for closing an movie? I mean the whole movie window. I have a button for it, but don't know the action.

Thanks!

Pause Movie Until Sound Complete?
Hi all - I've created a software demo of sorts in flash - mostly scenes of screen shots showing mouse clicks, 1 video in one scene, etc. After testing the movie out, I noticed a lag - the voice overs were not matching up with the mouse clicks. I thought maybe I could put a pause at the end of each scene to wait until the sound caught up - is that possible? I have NO idea what I'm doing, please bear with me.

Here's what I've started with, but.. it don't werk! DAH!


Code:
stop();

import flash.net.URLRequest;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.events.*;

var soundReq:URLRequest = new URLRequest("sounds/intro2.mp3");
var sound:Sound = new Sound();
var soundChannel:SoundChannel = new SoundChannel();

sound.load(soundReq);

sound.addEventListener(Event.COMPLETE, soundPlay);

function soundPlay(event:Event):void{
sound.play();
}
soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete)

function soundComplete(event:Event):void{
gotoAndPlay("play","Intro");
}
Any help? ideas on how I can sync this up?
Thanks so much!!

Dragging Complete Flash Movie Is It Possible?
HI!

Ive been using flash since flash 4 and would consider myself intermediate/advanced. I havent used flash in a while however and have gotten rusty.

Is it possible with FlashMX to be able to drag my whole published movie? I have a website in plain html which I want a navigation bar/remote to be made in flash. The navigation bar is made but I would like the user to be able to drag and drop the nav. bar where he/she pleases.

Not sure if I have explained this well so I will try again Is it possible to have a movie that is possible to drag and drop anywhere on my webpage? If it is possible then hows it done?

hmm still not sure if anyone will understand my lame attempts at explaining this. Any reponses would be greatly appreciated.

cheers!

Audio On And Off For Complete Flash Movie
I need to turn my audio off with a simple button and back on with the same one, the audio from all the movies attached to the main movie should be off when I press this button


ActionScript Code:
bgSound = new Sound(this);itquit = false;itgoes = true;bgSound.attachSound("sound1");bgSound.start(0.99);Btn_Mute.onPress = function(){ if (bgSound.getVolume() != 0) {  Btn_Mute.gotoAndPlay(2);  oldVolume = bgSound.getVolume();  bgSound.setVolume(0); } else {  Btn_Mute.gotoAndPlay(1);  bgSound.setVolume(oldVolume); }};


this is what i have but its not working.
i have different .wav throughout my flash and my button is correct, is called Btn_Mute.

please help.

thank you.

Tell Movie Clip To Play When Flv Is Complete
I have a movie clip with an instance of survey_mc

I have an flvplayback component with an instance of miMove_flv

I load the flv using the component inspector.

When The FLV is finished playing I want the movie clip survey_mc to play.



The survey_mc is just a box that pops up over the finished flv that gives the user the option to either continue what they were doing or to take the survey. I want this to pop up after each flv in my swf is complete

Thanks so much for any help. I've been trying to get this to work all morning with no luck.

Dragging Complete Flash Movie Is It Possible?
HI!

Ive been using flash since flash 4 and would consider myself intermediate/advanced. I havent used flash in a while however and have gotten rusty.

Is it possible with FlashMX to be able to drag my whole published movie? I have a website in plain html which I want a navigation bar/remote to be made in flash. The navigation bar is made but I would like the user to be able to drag and drop the nav. bar where he/she pleases.

Not sure if I have explained this well so I will try again Is it possible to have a movie that is possible to drag and drop anywhere on my webpage? If it is possible then hows it done?

hmm still not sure if anyone will understand my lame attempts at explaining this. Any reponses would be greatly appreciated.

cheers!

Complete Movie Clip Before Proceding...
I was curious if it is possible to have a movieclip with multiple frames, lets call it clip 1, be assigned to just one frame, yet still play out in its entirety before it proceded to the next frame. Any help would be greatly appreciated.
Thanks

Importing Complete Website To A Flash Movie?
hi there.. flashers..

please tell me is it possible to load an
entire website to a running flashmovie?

if so - how is it done??

thank you so much..

tobi

Newbie: How To Go To The Next Frame After Movie Clip Is Complete
I know this should be the simplest thing to do, but I can't figure it out. I have a movie clip on my timeline. I want it to play completely before the timeline moves to the next frame. Can someone point me in the right direction?

How? I Want To Turn And Complete Movie Into A Button? By Tomorrow?
HI Please help?
I'm a newbie and I need to know how to click anywhere on the complete size of a flash movie that sends the user to a web site link.. I know it's probably easy and need help??
Thanks anyone and everyone!!
Ed

Moving Foward On Movie Clip Complete
i got a movie to stream (here) using the MediaDisplay Component but now i'm looking for some actionscript that would let me move the root frame foward one after the clip completes

Thanks for the help

Ben

Script To Identify When FLV Movie Complete And Goto Scene ...
I am no Action Script expert!
Would greatly appreciate anyhelp to below:

We have craeted a viral video.

I converted raw video to an FLV file and created a swf playing file which progressively streams the FLV file.

At end of video I just want to have a final screen that shows some animated text. How is this done?!

That is my confusion. In the swf playing file (that “calls” FLV file) can one program an Action Script that identifies when video has stopped playing and then move to say Scene 2, Frame 1 to play animated text?

Much appreciated!

How To Complete Playing A Movie Clip And Then Change Scene
Hi guys,
I am facing a dilemma in doing a flash profile presentation. Well, the problem is something like this. When the user navigates the different links, it inturns takes it through the different scenes made in flash. What i need here is, when the user clicks on a link, i need to animate all the existing elements on screen to move out using a movieclip and then want to change to the selected scene. ie. i need to play a movieclip placed at the end of the timeline and when this movie clip is finished playing it should go to another scene using gotoAndplay ("aboutus",1). In this case there are 5 links here, No matter which link the user chooses, the movie clip needs to be played and then go to the new scene.

Pls help me with this. Thanks in advance

Movie Clip Complete Animation Upon Rollout, Not Play Backwards
I have been trying for several days now to get a movie clip I'm working on to continue animation if the mouse is moved off of the clip before it finishes. I worked through the tutorial to get the clip to play backwards instead of simply jerking to the first frame, and although this is somewhat helpful, what I really need is for the movie clip to continue its full animation once, like I have seen on some menus (for example, when you move the mouse down a nav bar and the buttons leave a 'trail' after the mouse as each one completes its animation). Thank you in advance for any help you can give me.

URGENT : How To Identify Parent Movie When We Are Inside COMPLETE Event
Hi all
I am trying This Over 4 days to get a Solution, I don't know how to solve this.
Well, I will explain the Situation. I am Creating List of thumbNail using AS3 Coding. Everything is Working Fine.
After Loading the ThumbNail i would like to resize the Thumbnail to fit it in to the ThumbNail Size. To set the Exact size I need To get the Sample Size Movie which is placed inside the ThumbNail MC, i can't able to Get the Instance name . Here with i have attached my Sample Code. Please help me on this








Attach Code

//Create One Loader to load IMAGE
var myLoader:Loader = new Loader();

//Assign the OnComplete Evend Handler
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);

//Assign Image Progress Updater
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onImageLoading);

//Load an Image From Net
myLoader.load(new URLRequest("http://www.planetdv.net/ProductImages/adb_flash_cs3.jpg"));

//Add the Image To desired MovieClip or any location,
//Here the imgHolder_mc is placed in Stage.inside that MovieClip "base_mc" is placed, which is having a Vector rectangle Image inside it.
imgHolder_mc.addChild(myLoader);

function onImageLoaded(event:Event){
//How i have to access the imgHolder_mc.base_mc From here
//Please Note I need a Relative Path BCZ i am Attaching More Clips like imgHolder dynamically

var resultThumb:MovieClip = event.target.content as MovieClip;


//trace(resultThumb.parent.base_mc.width)
//The Above Code creates Error


trace(event.target + " :: " + event.currentTarget);

}
function onImageLoading(event:ProgressEvent){
loading_txt.text = String(Math.round((event.target.bytesLoaded / event.target.bytesTotal) * 100));
}

Preload Random Images In Main Movie Every 10 Seconds After Load Complete
Hi there,
I am working on a flash web site and I have a hald decent code for it but there are some bugs i cant figure out.
www.fadlighting.com/test
The following is the concept:
Load a random image from the folder on the server. Build preloader that showes size of image and percent remaining to load image. Wait 10 seconds and load new random image.

So far I was able to do so with the expert help of the Bible for Flash.
The following is the code i scrached together, This portion is at frame 1 of main time line
function loadFile(){

images = 13;
directory = "http://www.fadlighting.com/test/random/image_";
image = directory add Math.ceil(Math.random()*images) add ".jpg"
intro_holder.loadMovie(image);
var loadObj = intro_holder;

var initObject = {
_x: intro_holder._x +590 ,
_y: intro_holder._y +240 ,
target: loadObj,
loadExit: null
};

_root.attachMovie("loader","loader",2, initObject);
updateAfterEvent();
setInterval(loadFile, 10000);


}

loadFile();
// setInterval(loadFile, 10000);

// intro_holder.unloadMovie();
// updateAfterEvent();

the following code is in a Movie Clip called intro_holder in the library on frame 1 of its timeline
function checkLoad(obj) {
var lBytes = target.getBytesLoaded();
var tBytes = target.getBytesTotal();
var percentLoaded = Math.floor((lBytes/tBytes)*100);
bar._xscale = percentLoaded;
percent.text = Math.floor(percentLoaded)+"% of "+Math.floor(tBytes/1024)+"KB loaded.";
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
clearInterval(checkProgress);
_parent[loadExit]();
obj.removeMovieClip();
} else {
count++;
}
}
updateAfterEvent();
}
checkProgress = setInterval(checkLoad, 100, this);
stop();

the code works but it does not wait for the image to be loaded before starting countdown for 10 seconds... and in between loads something is off... uhmmmm I can email fla if interested to long to post.

Thanks!!!

Preload Random Images In Main Movie Every 10 Seconds After Load Complete
Hi there,
I am working on a flash web site and I have a half decent code for it but there are some bugs i cant figure out.
www.fadlighting.com/test
The following is the concept:
Load a random image from the folder on the server. Build preloader that showes size of image and percent remaining to load image. Wait 10 seconds and load new random image.

So far I was able to do so with the expert help of the Bible for Flash.
The following is the code i scrached together, This portion is at frame 1 of main time line
function loadFile() {

images = 13;
directory = "http://www.fadlighting.com/test/random/image_";
image = directory add Math.ceil(Math.random()*images) add ".jpg"
intro_holder.loadMovie(image);
var loadObj = intro_holder;

var initObject = {
_x: intro_holder._x +590 ,
_y: intro_holder._y +240 ,
target: loadObj,
loadExit: null
};

_root.attachMovie("loader","loader",2, initObject);
updateAfterEvent();
setInterval(loadFile, 10000);


}

loadFile();
// setInterval(loadFile, 10000);

// intro_holder.unloadMovie();
// updateAfterEvent();

the following code is in a Movie Clip called intro_holder in the library on frame 1 of its timeline
function checkLoad(obj) {
var lBytes = target.getBytesLoaded();
var tBytes = target.getBytesTotal();
var percentLoaded = Math.floor((lBytes/tBytes)*100);
bar._xscale = percentLoaded;
percent.text = Math.floor(percentLoaded)+"% of "+Math.floor(tBytes/1024)+"KB loaded.";
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
clearInterval(checkProgress);
_parent[loadExit]();
obj.removeMovieClip();
} else {
count++;
}
}
updateAfterEvent();
}
checkProgress = setInterval(checkLoad, 100, this);
stop();

the code works but it does not wait for the image to be loaded before starting countdown for 10 seconds... and in between loads something is off... uhmmmm I can email fla if interested to long to post.

Thanks!!!

__________________
Anthony Palermo
aderium@bellsouth.net
http://www.aderium.com

For Cycle - AS2
Hi all,
I'm just a newby in As, so accept my apologies for dummy questions

In a new site, I need to create dynamically a raw of buttons (from a min of 2 to a max of 4), in which there will be always at least an image linked to the first button, and a small text linked to the last. In a word, every gallery I need to create will have from one to three images and then a small text.

I'm trying to develop a for cycle, but there is something wrong. In the library I've prepared the 4 buttons, with linkagename "pulsatondo1", "pulsatondo2", "pulsatondo3" and "pulsatondo4".
This is the code I'm trying to use:

var totbuttons:Number=4
var url:String="Mc"+i

for(var i:Number=0; i<totbuttons; i++){
var mc:MovieClip=this.createEmptyMovieClip("Mc"+i, i)
mc.attachMovie("pulsatondo", "pulsatondo_mc" +i, 10)
}

... but nothing happens. I think the problem is the url variable, maybe I mudt not use a string var, or maybe the èroblem is with "Mc" + i...
Could anyone give me a word of hope?

thank you in advance

AS 2 For Cycle
Hi all,
I'm just a newby in As, so accept my apologies for dummy questions

In a new site, I need to create dynamically a raw of buttons (from a min of 2 to a max of 4), in which there will be always at least an image linked to the first button, and a small text linked to the last. In a word, every gallery I need to create will have from one to three images and then a small text.

In the library I've prepared the 4 buttons, with linkagename "pulsatondo1", "pulsatondo2", "pulsatondo3" and "pulsatondo4".
This is the code I'm using:

createBtn()
function createBtn() {
trace ("createbuttons");
var totbuttons:Number=4;
pulsacontainer_mc.createEmptyMovieClip("btnMc", 0);
for(var i:Number=0; i<totbuttons; i++){
var mc:MovieClip=pulsacontainer_mc.btnMc.attachMovie ("pulsatondo"+i, "pulsatondo_mc"+i, i);
mc._x=300 + 45*i;
mc._y=300 + 30*i;
}
}

... and the function goes wrong, I can't recalli it in callback but the trace shows in the output!!!

another question: how can I modify var totbuttons? I have to recall the function in this manner : createBnt(totbuttons = 4) ....?
Or in another wway?

thank you in advance

Cycle An Image Using AS?
Hi all! Is there a code to cycle an image using AS? What i mean by this is say i want the image to scroll across the screen, and then when it hits a certian spot, start all over.. this way i dont have to make a 100000000 pixel wide image Thanks guys..

End Loop At 3rd Cycle...
im animating a MC through actionscripts. im very new to actionscripts so please bear w/me.

here's my code:

onClipEvent (enterFrame) {
this._x+= 5;
if (this._x>=100){
this._x= 0;
}
}


this obviously keeps looping... how do i make it stop looping after reaching the 100pixel for the third time?

thx in advance
H

Cycle Through Colours
hey, i've created code that draws a bar graph based on data returned from a dBase. I'm wanting each bar to be a different colour. The number of bars is always different (from 1 bar, to a 20-bar chart).

How can you do this so it cycles through the colours of the spectrum evenly? (ie: 3 bars = red, green, blue. 7 bars = red, orange, yellow, green, aqua, blue, violet) etc, based on the number of bars?

I know it's going to be along the lines of:

bar8Colour = toHex(spectrum/totalbars * 8);
bar9Colour = toHex(spectrum/totalbars * 9);

Cycle Through All The Sub Movieclips
Is there a good way cycle through all the submovie clips of a parent movie clip...

I know if they were named squentially i could go through them that way...but what if they arent....

any ideas??

Hue Cycle Animation
Hi.

I have an image, and I would like to animate it. What I would like to do, is shift the image through every hue, and have it play as a movie clip in a loop.

The general stuff is not a problem, but does anybody know how I can achieve the hue-shift? Would some actionscript do this for me? If so, could you maybe post the actionscript?

Thanks for your time.

6 Button Cycle
m trying to create a 6 button circular cycle in flash with movie clips. This cycle can rotate with the user clicking on any of the 6 buttons. My buttons are named in the array below. "healthySkin" is the main button position, which means, when the user clicks on any button, the movie clip under that button rotates into this position. My problem here is that, once the user clicks on any button and rotates into this position, how do i know which movie clip is under the original buttons, to tell that movie clip to go to where the healthySkin button originally was.

heres what i got so far... which i am just guessing

function Nav(obj:MovieClip) {
var navigation = new Array["healthySkin", "environMoist", "lowerSkin", "drySkin", "waterInfusion", "healthyCellular"]();
for (var i = 1; i < navigation.length; i++) {
obj[navigation[i]].onRelease = function() {
//want to rotate the cycle here
};
if (navigation[i] == "button1") {
//scale the movie clip which enters into button 1 position
//disable the other movie clip buttons until the user clicks
//a close button to get back to the main cycle
}
}
}

[F8] Walk Cycle
I need a walk cycle which the stick figure increases in pace, so he starts of slowly and then increases with the walk.

Please help

Game Cycle
Hi everyone,

I'm creating a simple flash game and I've read TONS of tutorials for the past couple of days, but none of them seem to answer my question.

I have one character, with 5 frames of animation in the movie clip. I would like to know how when you press either up, down, left, right, or go diagonally in any direction, flash plays the animation and the character movies in that direction. However, I also want to make it so that when you release the key, the animation stops at the specific place it was left off, and when you go in the same or another direction, it picks up where it left off.

Any help is appreciated. Thank you!

[CS3] AS2 Cycle Through Characters
Hi

I'm trying to do an effect where I have 3 characters (w b p) in 3 different textboxes and then each to cycle through random characters before reaching the correct one (say after 10secs), then to play a frame once completed. I can do this through loads of textboxes on the timeline, but would like to do it all in AS2. Does anyone know a good tutorial or which types of functions I would use so I can research it?

Thanks

Cycle Through Buttons
I have buttons that scroll a mc to different x postions. I also have a forward and backward button that cycles through the array i established for the x positions. How do I get the forward/back buttons to visually cycle through the down state of the other buttons?

Here's my code


Code:
Movieclip.prototype.scrollme = function(xPos) {
//this gets the current X position of the clip calling the function
cX = this._x;
//this works out the distance between its current X position and where it has to go
difX = cX-xPos;
//this sets the new X position of the clip
//the clip moves 1/5th of the total distance every frame
this._x = cX-(difX/5);
};
stop();
//variable starting value
arrayIndex = 1;
//timeline stopping postions
timelineXpos = new Array(0, 0, -760, -1520, 305);
//scrolling animation
timeline.onEnterFrame = function() {
this.scrollme(timelineXpos[arrayIndex]);
};
//buttons that scroll the timeline to specific x positions
//but1
controller_mc.but1.onRollOver = function() {
this.frameHold = this._currentframe;
this.gotoAndStop("over");
};
controller_mc.but1.onRollOut = function() {
this.gotoAndStop(this.frameHold);
};
controller_mc.but1.onRelease = function() {
arrayIndex = 1;
for (var mc in this._parent) {
var thisHold = this;
if ((this._parent[mc] == thisHold) && (this._parent[mc]._name.indexOf("but") != -1)) {
this._parent[mc].gotoAndStop("on");
} else {
this._parent[mc].gotoAndStop("off");
}
}
this.frameHold = this._currentframe;
};
//but2
controller_mc.but2.onRollOver = function() {
this.frameHold = this._currentframe;
this.gotoAndStop("over");
};
controller_mc.but2.onRollOut = function() {
this.gotoAndStop(this.frameHold);
};
controller_mc.but2.onRelease = function() {
arrayIndex = 2;
for (var mc in this._parent) {
var thisHold = this;
if ((this._parent[mc] == thisHold) && (this._parent[mc]._name.indexOf("but") != -1)) {
this._parent[mc].gotoAndStop("on");
} else {
this._parent[mc].gotoAndStop("off");
}
}
this.frameHold = this._currentframe;
};
//but3
//
controller_mc.but3.onRollOver = function() {
this.frameHold = this._currentframe;
this.gotoAndStop("over");
};
controller_mc.but3.onRollOut = function() {
this.gotoAndStop(this.frameHold);
};
controller_mc.but3.onRelease = function() {
arrayIndex = 3;
for (var mc in this._parent) {
var thisHold = this;
if ((this._parent[mc] == thisHold) && (this._parent[mc]._name.indexOf("but") != -1)) {
this._parent[mc].gotoAndStop("on");
} else {
this._parent[mc].gotoAndStop("off");
}
}
this.frameHold = this._currentframe;
};
//
//timeline forward and backward buttons
controller_mc.goForward.onRelease = function() {
if (arrayIndex<3) {
arrayIndex++;
}
};
controller_mc.goBack.onRelease = function() {
if (arrayIndex>1) {
arrayIndex--;
}
};

AS 2.0 - End Of Product Cycle?
I recently read an online post which left me with the impression that ActionScript 3.0 is not only more powerful, but easier to use than AS 1 or AS 2.0.

This has me wondering, will AS 2.0 be obsolete within the next year or two [I am still using Studio 8]?

Trying To Cycle Through 5 Images
This is my code, but only store1 and store5 fade in, then the movie stops. Where am I going wrong?



import fl.transitions.*;
import fl.transitions.easing.*;
import flash.events.TimerEvent;
import flash.utils.Timer;

var store1_mc:MovieClip;
var store2_mc:MovieClip;
var store3_mc:MovieClip;
var store4_mc:MovieClip;
var store5_mc:MovieClip;
var imageRequest:URLRequest;
var imageLoader:Loader;
var minuteTimer:Timer;


store1_mc = addImage("store1.jpg", 0);
store2_mc = addImage("store2.jpg", 0);
store3_mc = addImage("store3.jpg", 0);
store4_mc = addImage("store4.jpg", 0);
store5_mc = addImage("store5.jpg", 0);


store2_mc.visible=false;
store3_mc.visible=false;
store4_mc.visible=false;
store5_mc.visible=false;

TransitionManager.start(store1_mc, {type:Fade, direction:Transition.IN, duration:2, easing:Strong.easeOut});

minuteTimer = new Timer(4000);
minuteTimer.addEventListener(TimerEvent.TIMER, onTimerFired);
minuteTimer.start();



function addImage(imageURL:String, imagePosition:Number)
{
var image_mc:MovieClip
image_mc = new MovieClip;
imageRequest = new URLRequest(imageURL);
imageLoader = new Loader();
imageLoader.load(imageRequest);
image_mc.addChild(imageLoader);
image_mc.x = imagePosition;
addChildAt(image_mc, 0);
return image_mc;
}



function onTimerFired(event:TimerEvent):void
{
if (store1_mc.visible == true){
store1_mc.visible = false;
TransitionManager.start(store2_mc, {type:Fade,direction:Transition.IN, duration:2, easing:Strong.easeOut});
}

if (store2_mc.visible == true){
store2_mc.visible = false;
TransitionManager.start(store3_mc, {type:Fade,direction:Transition.IN, duration:2, easing:Strong.easeOut});
}

if (store3_mc.visible == true){
store3_mc.visible = false;
TransitionManager.start(store4_mc, {type:Fade,direction:Transition.IN, duration:2, easing:Strong.easeOut});
}


if (store4_mc.visible == true){
store4_mc.visible = false;
TransitionManager.start(store5_mc, {type:Fade,direction:Transition.IN, duration:2, easing:Strong.easeOut});
}


}

Stop At Cycle End
I'm trying to figure out how to stop I mc's animation at the end of the current cycle (or begining of next) but I want it to finish the cycle first.


ActionScript Code:
so gotoAndStop(0);

does not work because the animation stops in the middle of the cycle.

Does anyone know what i need to do to make this happen ?

mm

Cycle Through Button
Hi, how would I create a collection of my buttons so that I can step through it and perform action such as append "_btn" to all button names etc. How would I do that?

Cycle Through Swf´s In Folder
I could really need some assistance.
I am using the "Preloader and Transition for Dynamic Files" tutorial.

What i want is to have a forward and a backward button, so that you can cycle through some swf´s located in a folder.

*s

Walk Cycle
Wow i havent posted here in forever. Anyway, does anyone know how to do a good walk cycle. either stick or symbols. i know the shape tween version. i just need the general walk cycle to study. thanks

AS2 - Cycle Through Characters.
Hi

I'm trying to do an effect where I have 3 characters (w b p) in 3 different textboxes and then each to cycle through random characters before reaching the correct one (say after 10secs), then to play a frame once completed. I can do this through loads of textboxes on the timeline, but would like to do it all in AS2. Does anyone know a good tutorial or which types of functions I would use so I can research it?

Thanks

Break The Cycle
I've got this cycle:

myInterval = setInterval (slideShow, 5000);

function slideShow () {
gotoAndPlay (13);
}

and I want to break it using a stop button. I'd like it to play forever if left untouched, but to stop with a button. a generic stop won't do it.

anybody?
thanks.

How Do I Cycle Through SWFs?
Hey all,

I was well on my way creating a Flash banner with 4 different buttons which users could press to select different SWF files for viewing. Then I found this tutorial on kirupa, and just followed that instead.

My question is, how can I modify this banner setup so that it cycles through the 4 different SWF files without user intervention? On top of that though, I want the users to be able to stop the cycle and, if they'd like, be able to choose a specific ad.

I'm no actionscript guru, but I'm thinking its something along the lines of when an SWF reaches a certain frame, it load the next one. However, when one swf ends and the next one begins, will the first one close so it doesn't take up the processor?

Thanks in advance.

Walk Cycle
Hi everyone
I encountered some problems while creating a walk cycle
I use Flash 2004 MX and I created head, body, left leg, right leg
left arm, and right arm seperately as graphic symbols
then I created a movie clip which contains all of the above symbols
Each symbol has their own layer in the movie clip

My problem is that when I drag the movie clip into a scene and
test it, the parts that move are all gone!! All I see are just the head and the
body!!! WHY ??:roll: I'm so confused!

another thing is that I don't know how to make the walk cycle a real cycle
'cause I can't make it loop :shock:
I tried to use actionscript gotoAndPlay(1); to make them
start from frame 1 but it didn't work.....

Can someone please help me?
Thank you very much :D

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