Controlling MC From Timeline By AS. Help Please
I have a MC in my movie. I want to control it's properties in different frames in the main timeline. For instance at the 1. frame change it's position at frame 50 change it's alpha at frame 100 change it's scale
until now I have done all this by motion tweening but I know AS is the best way. Could anyone help me on this?
Thanks mx-guest2004
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 03-27-2004, 09:57 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Controlling A Movie Clip's Timeline Separately From Main Timeline
I've got a problem here that I've been trying to figure out for a while now, and it seems like it should be way easier than this. Here's what I've got:
I'm trying to make a neato little flash swf with lots of buttons that you can push and another little movie clip will show some little animation.
I thought I could get this done pretty simply by making a bunch of buttons, giving them an over, down, hit, sound, etc. and then having one single movie clip do all of the animations, but cleverly use stop(); and gotoandplay();
I have tried a few different ways, searched through the help & tutorials, looked all over forums on the internets, and I still can't get this to work. The main timeline is really just 1 frame, and its only purpose is to just hold all of the buttons. I have given all of the buttons instance names (ending with _btn). There is a separate layer in the main timeline for the actionscript alone, and was hoping to put all of the gotoandplay commands there. The code that I am trying to use in that frame is:
Code:
this.WV_btn.onRelease = function(){this.productzmovie_mc.gotoAndPlay(2);
};
The productzmovie_mc has a command to stop(); in the first frame, and I am trying to get a button to skip to the next frame to get it going. I put a stop(); on the last frame of that animation so that it won't run through the whole thing on the first button press. If I remove that stop(); on the first frame, the whole animation just runs whenever I test it and the button has no effect.
I thought this would be way simpler than making 25 separate movie clips and hiding them or spawning them. Does anyone know what I could be doing wrong here? This seems like a pretty simple operation, and I am probably screwing up some mundane detail (I always do that). Be gentle, I am trying to learn Flash and I am a bigtime n00b. I can post the .fla if you need to see it, but it's pretty simple so far, just lots of buttons.
Thanks!
Child MC Timeline Controlling _root Timeline
I have a main Timeline which holds a child MC. The Child MC (text01aMC) runs to a length of 156 frames (text fades up and fades down). I'm trying to move the main time line forward one frame once the child clip has reached frame 156.
I'm using the following code:
stop();
if (_root.text01aMC._currentframe>=156) {
_root.gotoAndPlay(2)
}
This code doesn't seem to do anything?
Can anyone help.
Controlling Timeline ?
Ok, I need help!!!!
Does anyone know how to control the first part of your animation so it only plays once and the second part to loop continuosly????
I have an intro piece that i would like to have play once and stop and then play my movie which will loop.
Any clues????
CONTROLLING TIMELINE
I'm having a hard time controlling my timeline from a movie clip. My MC (menu) is running on the main timeline. It has a button (called characteristics). When clicked I want the main timeline to go to a different frame in a particular scene.
In my MC I have:
on (release) {
tellTarget ("_root") {
gotoAndPlay ("Devices","25");
}
}
It seems to work when I Control+Test Scene from Flash. But when I run the .swf it continues to take me to a different scene. I've tried changing "Devices" to other scenes that I have and that seems to work, but why can't I get it to go to the right scene? Any ideas?
Controlling A Timeline
ok heres my problem: I have a button, which is inside an MC, which is inside another MC. I want to add script to the button which plays the first frame of the movie clip that contains the button.
Hope this is clear. thanks guys
Controlling The Timeline
how would one control the timeline with a slider bar such as the one used in this microsoft demo:
http://www.microsoft.com/cmserver/evaluation/demo.htm
Controlling Timeline
I'm having a problem. I have a Main Movie In Level 0. I load a movie into level 1. How do I make the buttons in level 1 communicate with the main timeline and timeline for the mc's on level 0? Thanks.
http://www.netfiremedia.com
Controlling .swf Timeline Via PHP?
say I wanted to add a line of code to a php script that told an swf something like:
_root.soundmovie.play();
can this be done?
basically im using a realtime counter with a flash interface that loads the current total visitors in a txt file. I want to add to the php so a sound will play when someone first enters the site... but im a complete newb when it comes to php.
any help would save me hours.. hehe
thanks
ps. the counter is running on my homepage if you wanna check it out
Controlling The Timeline
I am trying to achieve the same result as the buttons work on the below website.
http://www.okaidi.com/okaidi/en/index.asp?2
The way I see it is:
1) There is a long horizontal fla movie consisting of images.
2) when you click on a button the movie is taken to a particular place on the timeline and stops on a certain image etc.
How do I do this in actinscripting????
Any ideas as it's a cool effect.
Controlling A Timeline
Hi
I'm new to actionscript!
Have tryed to write an if else sentence but grrrrrr its hard when you are not into programming.
My problem:
I have a movieclip that runs as an intro to my movie.
The first time the movie runs I want it to run all the way!!!!
But the problem is that when it stops I have a button who controls it with a simple play action.
and I cant get it to:
_root.portfolio.play(95);
which means to me that it should play frame 95
but it doesnt?
Why???
SO I tried to write in the first frame:
set (moviecliP,1)
if{movieclip=1;
play();}
and in the last frame
set (moviecliP,2)
and in frame 95
if{movieclip=1;
play();}
else{ stop;}
Help anyone
Controlling Timeline In Swf
how do I controll the timeline in a loaded swf?
It is a video within an swf and I have buttons to control play pause and rewind
thanks
HELP Controlling Timeline
Hello,
I came across this tutorial on controlling the timeline (play, stop, reverse, etc.)
http://www.flashkit.com/tutorials/In...-698/index.php
I was wondering if anyone could shed some light on how this code could be modified to work if you were to load the swf with the controller and animation into a main host movie clip? The animation doesn't work b/c the root has changed, but i'm not quite sure how to fix it...?
Any help would be greatly appreciated!
Controlling Timeline
I have a flash project that loads external swf's into itself, and I was wondering if from within that external SWF i can make a button that would control the timeline in the main movie ? And how I would do that, thanks !
Controlling The Timeline From Another Swf
Hoping someone can help me with this... suppose you have a master timeline, into which you've loaded another swf which acts like a menu, so to speak. From this menu, you click a button, which takes you to a frame of the master timeline. I've tried using tell targets but I'm getting a bit bogged down in this. I'm wondering if anyone has any examples I can take a look at?
Thanks!!
Controlling MC From Timeline
Sorry..i just cant think today.
I have a mc that the x and y are scaled acording to its content (well i measure it and input the variables!)
On the initail mc i have (instance of scaler)
Code:
onClipEvent(load){
easeSpeed = 5;
target_xscale = 410;
target_yscale = 270;
}
onClipEvent(enterFrame){
_xscale += (target_xscale - _xscale)/easeSpeed;
_yscale += (target_yscale - _yscale)/easeSpeed;
}
then on the buttons i have;
Code:
on (release) {
scaler.target_xscale = 410;
scaler.target_yscale = 160;
}
....all works fine, however during the movie, on the main timeline i want to introduce a keyframe and reference the scaler mc and change its dimension rather then using a button....how do i do this?
thanks in advance
Controlling Timeline
Hellooo I have 2 questions...
1. is there a way i can add actionscript to a keyframe to remember the last keyframes actionscript? i have a timeline with some external swfs loading on keyframes and when they choose the next section (just moves along the timeline to next set of thumbnails) i need it to remember the last project (keyframe) they clicked on?
2. i have a movieclip with some buttons in that i need to control the timeline, i was given some code for this but it keeps going to the 1st scene timeline and not the timeline on the 2nd scene of the swf its inside...if that makes sense lol. so i just want the buttons to control the timeline that the movieclip is on from within the movieclip.
can anyone help with these? sorry if i havent given the best description of what im looking for, im still really new to all this! x
Controlling Timeline From A Php
Hey guys this one has been baking my noodle all day (as I’m not that good at scripting)
I am creating a php site and a flash menu at the top.
The menu fields have a submenu and on rollover they appear. something like this
products Services
car | boat | house cleaning | hair cut | washing
now what i want is that when you are on a page of a certain top menu the appropriate submenu is automatically displayed for example if I click car it takes me to car.php and then the submenu for products is automatically displayed (as car is within products)
the submenus are time line based to products fade in on frame 15 services fade in on frame 25 and so forth.
I can create 5 different flash files and have something like this at the start of the timeline
gotoAndStop(15)
in the second one it would be
gotoAndStop(25)
and so forth although instead of having a preset number it would be great if this number could come from the php so when embedded it could possibly be something like
menu.swf?menu=services
in the flash i have
if (menu==profile) {
gotoAndStop(15)
}
if (menu==services) {
gotoAndStop(25)
}
if (menu==projects) {
gotoAndStop(35)
}
but it is not working - it just goes to the last one on the list (projects)
Any ideas guys?
Controlling Mc Timeline From Other Mc...
Hi All,
can anyone tell me what I am doing wrong here please?
I am trying to do the following I have a movieclip (CENTERpages) on the timeline that has an mc called lock within it - this lock contains 15 frames - there is a stop action on frame 1 and frame 10
I want to add some script to a button in another movieclip on the timeline (mymenu) that will check if the movieclip (lock) is on frame 10 or frame 1 and if it is on frame 1 the lock clip needs to play frame 2 and stop on frame
and for the other buttons I want to detect if the lock clip is on frame 10 and if it is the lock clip is on 10 it will go to and play frame 11 onwards
I have tried to do it with this script:
[php]on (release) {
if (_root.CENTERpages.mylock.currentframe == 1) {
_root.CENTERpages.mylock.gotoAndPlay(2);
}
}
Controlling Mc Timeline From Other Mc...
Hi All,
can anyone tell me what I am doing wrong here please?
I am trying to do the following I have a movieclip (CENTERpages) on the timeline that has an mc called lock within it - this lock contains 15 frames - there is a stop action on frame 1 and frame 10
I want to add some script to a button in another movieclip on the timeline (mymenu) that will check if the movieclip (lock) is on frame 10 or frame 1 and if it is on frame 1 the lock clip needs to play frame 2 and stop on frame
and for the other buttons I want to detect if the lock clip is on frame 10 and if it is the lock clip is on 10 it will go to and play frame 11 onwards
I have tried to do it with this script:
PHP Code:
on (release) {
if (_root.CENTERpages.mylock.currentframe == 1) {
_root.CENTERpages.mylock.gotoAndPlay(2);
}
}
and for the other:
PHP Code:
on (release) {
if (_root.CENTERpages.mylock.currentframe == 10) {
_root.CENTERpages.mylock.gotoAndPlay(11);
}
}
why won't that script work?
Controlling A Mc Timeline With Another Mc Help Pls
Here is what I'm trying to create but having real difficulty with it, if anyone can help I would really appreciated.
I'm trying to sync 2 movieClip together by having one movieClip behave like a button that rotate when drag. When that button is rotating and dragging, it sync with another movieClip timeline.
Basically, I have a movieClip with 5 different images having a fading tween animations call "main_mc". I'm trying to control main_mc timeline with another movieClip name "drag_mc".
Drag_mc movieClip needs to function like a button that when you press and drag, it can be rotate clockwise or counterclockwise, but while you're dragging it, it controls "main_mc" movieClip timeline.
So if I drag clockwise, the main_mc timeline will go forward, if it's counterclockwise, it will go backward. But basically, the rotation of the drag_mc have to sync with main_mc timeline.
Is it possible?
Sorry for the explanation, it's the best I can describe it. Thank you.
Kritter
Controlling An Mc Timeline With A Mc._x
Hi, i have made a mc in which a long text has to be scrolled using a pointer.
Here is what i have within the mc:
- a layer on which my long text moves top to bottom from frame 001 to frame 201, using tweening
- a layer on which i have a mc (pointer_mc) that is dragable onPress
- the course of pointer_mc on the _y axis is 400 px from top position to bottom position
Here is what i want to do:
- i want the timeline to advance/goback according to the _y.pointer_mc position
i.e. if the pointer_mc._y = 1, timeline is at frame 001, if i move the pointer down, the timeline follows.
Am i clear enough? Can i do that? I tried with this:
this.onEnterFrame = function() {
_root._currentframe = pointeurAuto_mc._y;
}
Here is the file.
Many thanks for helping.
Controlling MC From Timeline By AS. Help Please
I have a MC in my movie. I want to control it's properties in different frames in the main timeline.
For instance
at the 1. frame change it's position
at frame 50 change it's alpha
at frame 100 change it's scale
until now I have done all this by motion tweening but I know AS is the best way.
Could anyone help me on this?
Thanks
mx-guest2004
Controlling MC From Timeline By AS. Help Please
I have a MC in my movie. I want to control it's properties in different frames in the main timeline.
For instance
at the 1. frame change it's position
at frame 50 change it's alpha
at frame 100 change it's scale
until now I have done all this by motion tweening but I know AS is the best way.
Could anyone help me on this?
Thanks
mx-guest2004
Controlling Timeline From A Php
Hey guys this one has been baking my noodle all day (as I’m not that good at scripting)
I am creating a php site and a flash menu at the top.
The menu fields have a submenu and on rollover they appear. something like this
products Services
car | boat | house cleaning | hair cut | washing
now what i want is that when you are on a page of a certain top menu the appropriate submenu is automatically displayed for example if I click car it takes me to car.php and then the submenu for products is automatically displayed (as car is within products)
the submenus are time line based to products fade in on frame 15 services fade in on frame 25 and so forth.
I can create 5 different flash files and have something like this at the start of the timeline
gotoAndStop(15)
in the second one it would be
gotoAndStop(25)
and so forth although instead of having a preset number it would be great if this number could come from the php so when embedded it could possibly be something like
menu.swf?menu=services
in the flash i have
if (menu==profile) {
gotoAndStop(15)
}
if (menu==services) {
gotoAndStop(25)
}
if (menu==projects) {
gotoAndStop(35)
}
but it is not working - it just goes to the last one on the list (projects)
Any ideas guys?
Fscommands - Controlling A Timeline
Hi! I'm trying to figure out how to do this:
I have a file called clients.swf embedded in clients.html. This page is a list of 30+ buttons. When a button is pressed, I need it to go to a specific frame label in the movie portfolio.swf which is embedded in portfolio.html.
So far, I know I need to use fscommand to do this and add some javascript and html. But I can't figure out how to do this. And Colin Moock's tutorial isn't helping.
Can anyone give me specific instructions on how to do this? Let's say I have a button in the clients.swf on clients.html which when released should go to portfolio.swf in portfolio.html to frame label "beach". I need to know:
- actionscript code I need to attach to the button in flash, along with command, argument, and any other script I may need to attach to this button (goto, get URL, etc).
- javascript (and vbscript) which goes in the head of the html document (I'm assuming it would go into portfolio.html not clients.html, but maybe js is necessary in both?)
- html code to go inside the embed and object tags
- anything else I should know
Thanks!!
Erin
Controlling The Timeline With Keypress
I would like to have the timeline jump to another scene when the B key is depressed. I have created an action layer. Would I put this command, whatever it is, in a keyframe? As I am a graphic designer an not an actionscripter (yet) any help would be appreciated.
Regards,
Dave
Controlling Main Timeline ?
Hi,
I'm having serious problems in trying to control the main timeline (as in scene 1, where you start from) from within a movie clip. The scenario at the moment is that I've got a list of buttons in a movie clip, that clip is within another movie clip which is placed on the main time line. So basically what I'm trying to do is that when any of those buttons are clicked it should play that movie clip and at the end of it should jump to a corresponding scene depending on which button was pressed. I tried using variables but couldn't get it working.
Does anyone here have any ideas how I can make it work?? By the way this happens to be an urgent problem so any quick responses would be majorly appreciates !
Thanks,
Usman.
Controlling Another Scene's Timeline From An MC
Is it possible to move the playback head to a frame number in Scene 2 by clicking on a button in a movie clip inside Scene 1?
I've tried TellTarget, _root, _parent...etc. to no avail.
Thanks for the help!
Controlling An Mc From Another Mc - Not Both On The Main Timeline
Below is a link to what started this -
http://board.flashkit.com/board/show...hreadid=312161
What I want, is to know how I can control an mc within an mc on the maintimeline from within another mc also on the main timeline...
Do I go back to _root and then up again, or just directly access the mc I need to?
Controlling An Imported Swf Timeline
I have an external swf which I load into my main movie. The problem that I have is that I cannot find a way to target the swf properly once loaded so that I can navigate through it.
I want to use buttons, ones in the main movie, to navigate to specific frames within the imported swf.
Is there something I am missing or is this just not possible? Any help is appreciated.
Thank You -
Controlling Timeline With Audio
I'm recreating a demo in Flash that I originally created in Director. The piece was timed by the voice over using the "if soundBusy" Lingo script. I've tried everything and can't get Flash to do this.
How do I create a piece that forces the playback head to loop in the current frame while a sound plays completely, then moves on to the next frame when the sound is finished.
Thanks,
John
Controlling Functions Across Timeline
I have a layer I have called functions. In frame 1 I am adding a frame action that will control all of my functions throught the entire movie. The keyframe will cover all frames.
Where I am stumped is when I try to call a function from let's say frame 10 of another layer.
My function in frame 1 of the functions layer is this
mybutton_btn.onPress = function() {
test_txt.text = "hello";
};
on frame 10 of the content layer I have the button and the text box mentioned above.
If I understand things right, as long as a function is across the movie it shoudl work, no matter where my button is.
Can someone offer some advice. I really prefer to keep all my coding as close to frame 1 as possible.
Thanks in advance.
Combobox Controlling Timeline?
I need to know how to use the combobox component to be able to control the timeline. I have very little knowledge of actionscript, so the more help, the better. I have looked for tutorials on the internet, but I still have found none.
Sean Cannon
Controlling Timeline With Slide Bar
Could any one point me in the direction of a tutorial on Controlling a Timeline with Slide Bar, if they know of one please? Have read soome stuff that says its possible but cant find out how to do it.
Cheers
Controlling Main Timeline From MC
Hello,
I have a button nested in a Movie Clip. I want this button to control the the main timelines in one of my scene. When I use the following script:
on (release){
gotoAndPlay("presentation",1);
}
or
on (release){
_root.gotoAndPlay("presentation",1);
}
It doesn't do anything. If I try this script:
on (release){
_root.gotoAndPlay(1);
}
It will go to the first frame of my original or top scene which I have named splashScreen, not the one in which the Movie Clip is contained. If anyone knows how to script this correctly, it would be much appreciated!
Thanks!
If Statements Controlling Timeline
HI
I have made a body mass index converter, and would like flash to jump to certain frames depending on the user's bmi value. They are split into 5 sections
Underweight less than 20
ideal 20 - 25
overweight 25 - 30
obese 30 - 40
dangerously obese more than 40
I have done the the underweight and dangerously obese parts. But how do i tell flash to jump to a certain frame if the user's bmi value is between 20 - 25 for example?
Thanks
Controlling MC Timeline With SPACE
Hi everyone, I'm working on a game and I was hoping someone here could help me figure out something important. In my game, the space bar is the action key, and will be used to do various things in each level such as opening doors and talking to people. But something I would like to make possible is to undo things you've done by pressing the space bar again. For example, I want the player to be able to press space when the character hit tests a window MC and open the curtains, and then if they press space again the curtains close.
I have created the movie clip for the curtains opening and closing which rests within the main movie clip for that level. In the curtain movie clip, there are three frames. The first, labeled "null", contains a stationary graphic of closed curtains. The second, labeled "open", contains a movie clip in which the curtains open and then stop on the last frame, therefore staying in the open position. The third frame, labeled "close", contains a movie clip which reverses the previous action and closes the curtains, stopping on the last frame to leave them in a position which matches the "null" frame's graphic.
I gave the character this script so far:
if ((this.hitTest(_root.fireRoom.curtainControl)) and (Key.isDown(Key.SPACE)) and (_root.fireRoom.curtainControl._currentframe="null "))
{
_root.fireRoom.curtainControl.gotoAndStop("open");
}
if ((this.hitTest(_root.fireRoom.curtainControl)) and (Key.isDown(Key.SPACE)) and (_root.fireRoom.curtainControl._currentframe="open "))
{
_root.fireRoom.curtainControl.gotoAndStop("close") ;
}
*This section of script lies within an onClipEvent (enterFrame) handler.
But I need some help because I don't think I'm going about this the right way. I want to tell the movie that if the character is touching the curtain clip, and the space bar is pressed, and the curtain clip is sitting on the "null" frame, then to go to and play the "open" frame and open the curtains.
Then if the character is touching the curtain clip, and the curtain clip is sitting on the "open" frame, meaning the curtains have opened, and the space bar is pressed, to go to the "close" frame to close the curtains.
I just realized something else I need to do is to somehow return to the "null" frame so that the player can open and close the curtains again after doing so once. Hopefully that all made sense. I've been messing with this for a while now and I would appreciate any help you can give. Thanks in advance.
Controlling An External MC Timeline.
I was wondering if there are resources where i can learn how to controll the timeline of an external movie clip. I want to load an external movie clip with a button on the main timeline.
For example. i have a drop down menu and after pressing, it will load an external movie clip and have it play the beginning but then it jumps to the appropriate frame label.
I've tried looking on google and here but don't know what to look for?
Please help.
thanks
Controlling Timeline With Scrollbar
Hello all,
I've made a movieclip that is dragable over a small distancebut only vertical. I've also made two other movieclips with an animation of 50 frames inside. Now when my animation starts the dragable MC is in the middle of its range of motion. At this point I would also like to have the other two MC's to be in the middle of there animation, that would be frame 25. When dragging my dragable MC upwards the other two MC's should go towards frame 50. Vice versa off course when dragging my MC downwards.
Can anybody help me with this.
thanks
Controlling Timeline From Within Symbol
Ok guys, I've reached a dead end in my project because I can't figure out how to control the timeline of a symbol from within another symbol. I know how to control the main timeline from within a movie clip but what I want to do is when a button is pressed it will make the timeline of another symbol on the main timeline jump to another point.
Nothing I've tried is working. If you guys can help me out it'd really be appreciated.
Help With Controlling Timeline With A Mediacontroller
Hello all, i have an issue that i can work on the solution so i ask for your help.
I´ve made a tutorial with captivate (adobe´s screen capture program) and then imported into flash 8 (after almost 4 hours of web searching i finally could do it copying a dll into flash 8 files and folders), then completed the animation with more stuff, effects, sounds, transitions, etc.
i did this because i realized that captivate cant stream content (you need adobe´s breeze for that) so i thought make it on flash.
I tried making the swf video in order to later make it a FLV so i can stream it, but the quality of the swf to mov or avi doesnt look good.
then i remembered that flash is naturally a streamer (sort of speak) but now i need something the user can use to control de movie.
long story short, what im trying to do now is to put a mediacontroller kind of control, so i can controll the timeline of the movie (im talking abour 3000 frames) so it would be good that i can add play/pause buttons, rew/fwd buttons and progress bar.
I tried to do this but i can make it work. i´ve been searching for this answer in the board also and i cant find somithing to work with.
thank you all in advance for your help.
Controlling Timeline And Movieclip
Hello,
I have a stop function on a button:
on (release) {
_parent.stop();
}
which stops the main timeline. I also have a movie clip that resides on that main timeline.
The stop(); command stops the main timeline, but I need to stop the movie
clip timeline as well. When the movie clip does not stop it goes out of sync with the main timeline.
I would think is possible but I can't figure out how to accomplsh this.
As well, I'd need to be able to play(); or resume both as well but once the stop is solved I would guess I could apply the play(); function to that as well.
Any help would be very apprecited!
Controlling Sounds Across Timeline
Hi all,
I have a timeline control bar that allows you to go to any position in a scene (about 2 minutes long). I have sounds that go along with various mcs. The problem with playing sounds is that they just play, regardless of where in the timeline you might then go to. My desire is to have a sound only play if the main timeline is within the sounds length, and then quit if the main timeline is moving outside of that sounds range.
Design considerations :
If the timeline is within a sounds length, the sound only needs to start and play from the beginning - no need to get the position of the timeline in relation to the sound and play from that point. So far, this means we have to do nothing, because flash already does this for us.
It doesnt matter if the timeline is moved around within a particular sound, the sound can just keep on playing - very similar to the above design consideration - we do nothing again.
All I care about is stopping a sound immediatly if the timeline is moved off the sound. Here is my attempt at this problem, Im not quite sure why its not working :
this.scene.soundclipOne (etc) are mcs that I use to track each sounds length (each mc is the length of its respective sound file). If the timeline is over an mc like soundclipOne, then it will provide a ._visible = true.
code:
vone = new Sound(this.scene.soundclipOne);
vtwo = new Sound(this.scene.soundclipTwo);
vthree = new Sound(this.scene.soundclipThree);
vfour = new Sound(this.scene.soundclipFour);
vone.attachSound("soundOne");
vtwo.attachSound("soundTwo");
vthree.attachSound("soundThree");
vfour.attachSound("soundFour");
var vcheckOne:Boolean = false;
var vcheckTwo:Boolean = false;
var vcheckThree:Boolean = false;
var vcheckFour:Boolean = false;
onEnterFrame = function () {
if (vcheckOne == false) {
if (this.scene.soundclipOne._visible == true) {
vone.start();
vcheckOne = true;
}
}
if (this.scene.soundclipOne._visible == undefined) {
vone.stop("soundOne");
vcheckOne = false;
}
if (vcheckTwo == false) {
if (this.scene.soundclipTwo._visible == true) {
vtwo.start();
vcheckTwo = true;
}
}
if (this.scene.soundclipTwo._visible == undefined) {
vtwo.stop("soundTwo");
vcheckTwo = false;
}
if (vcheckThree == false) {
if (this.scene.soundclipThree._visible == true) {
vthree.start();
vcheckThree = true;
}
}
if (this.scene.soundclipThree._visible == undefined) {
vthree.stop("soundTwo");
vcheckThree = false;
}
if (vcheckFour == false) {
if (this.scene.soundclipFour._visible == true) {
vfour.start();
vcheckFour = true;
}
}
if (this.scene.soundclipFour._visible == undefined) {
vfour.stop("soundTwo");
vcheckFour = false;
}
};
I know there has to be a much easier way to do all of this. I have about 20 or 30 sound files for each flash file, so I have to write out 20 of these things. Any solutions?
Thanks.
Nick
Controlling Timeline Of Loaded SWF
I've loaded an SWF into a blank container in my main movie. Within this loaded SWF, I have a 'frame variable' assigned to each frame. After loading this SWF, I'd like to tell Flash to goto the particular 'frame variable'. I'm having trouble determining the syntax for this.
Again, possibly similar to this:
container.swf.gotoAndStop(frame variable)
Please help me code this - thanks in advance!
Controlling Another Swf Timeline From Button
Hey everyone! I have a navigation swf that is loaded via the MovieClipLoader class into my master swf. Here is an example of the code I am using:
// re-enable the submenu options
function reEnableOptions() {
this.btnBio.enabled = true;
this.btnPictures.enabled = true;
this.btnLinks.enabled = true;
}
// define the function of the buttons:
this.btnBio.onRelease = function() {
reEnableOptions();
this.enabled = false;
_level0.myMCL.loadClip("bio.swf", 5);
}
this.btnLinks.onRelease = function() {
reEnableOptions();
this.enabled = false;
_level0.myMCL.loadClip("links.swf", 5);
}
this.btnPictures.onRelease = function() {
reEnableOptions();
this.enabled = false;
_level0.myMCL.loadClip("slideShow.swf", 5);
}
My question is this:
I would like to add a "home" button, however the screen I want it to land on is the last frame of the opening splash movie. Is there a way to combine a loadClip and a gotoandPlay?
[F8] Controlling Timeline With Slide Bar
Hi
I am using flash mx professional version.
I am working on a project where i need a slide bar to control my animation.'
say for eg.. i have a main movieclip name "movies" and inside this movieclip i have some 4 to 5 movie clips and each mc has some animation inside it.
Now i need to place a slide bar for each mc so that i can run the animation using the slider.
Please help me!!
Regards
Nirupama
Controlling AS Movie On Timeline
So I downloaded an old film effect from this site. I replaced the picture that is getting the effect with one of my own. Now I want to just used this movie for a few frames or so as part of a bigger movie. The entire effect is on 2 layers, one keyframe each, and it is done using action script. What is the easiest way to call this movie up on the time line for X number of frames? I am completely new to flash but I have a good amount of knowledge on the verbiage (symbols, keyframes, etc). Thanks!
|