Actionscript 3.0 :: Targeting A Mc In A Different Timeline?
Dec 30, 2009
I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame.
mc_1 is on frame 1
mc_2 is on frame 40
mc_3 is on frame 81
as the main timeline plays the clips each one fades to the other.
I need to know how to target this scenerio
after mc_3 plays I need to have a goToAndplay (frame) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.
I know how to do off a button
but there is no buttons, the action needs to happen when the playhead reaches the last frame of the main timeline in main.fla
View 2 Replies
Similar Posts:
Dec 30, 2009
I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame. mc_1 is on frame 1 mc_2 is on frame 40 mc_3 is on frame 81 as the main timeline plays the clips each one fades to the other. I need to know how to target this scenerio after mc_3 plays I need to have a goToAndplay (20) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.
View 5 Replies
May 18, 2009
The site has 6 pages: home, contents, contact, about, showreel, corporate. I have a panoramic photograph as a background across all my pages. When a button,such as contact, is clicked the timeline is enabled and scrolls across the panoramic to the 'contact' area of the photograph.I have a few questions relating to how I can achieve this. 1.) On my actions layer I have this code on frame one: stop(); enter_site_btn.addEventListener(MouseEvent.CLICK, buttonCLicked); function buttonClicked (event:MouseEvent):void { play(); } So when you mouseClick the timeline plays and goes to the next stop point on the timeline which is the contents section. On the contents page are the buttons which lead to the other sections. So far I have this code: stop(); about.btn.addEventListener (MouseEvent.CLICK,buttonCLicked) corporate.btn.addEventListener
(MouseEvent.CLICK,buttonCLicked) showreel.btn.addEventListener (MouseEvent.CLICK,buttonCLicked) contact.btn.addEventListener (MouseEvent.CLICK,buttonCLicked)
Each of the buttons work, but I want the timeline to play and go to the page which corresponds to the button which is clicked, not just to play the timeline until the next stop point. Is there a code which would enable the timeline to play and go to the correct section, and not just roll without a target? 2.) I also want to be able to write a code which enables the timeline to move to any section in the same amount of time. What I mean by this is that if it takes 2 seconds (48 frames) to go from the first section to the second section, I also want it to take 2 seconds to go from the second section to the sixth section (240 frames)
View 40 Replies
Feb 9, 2010
I'm loading an external swf into a project and I want to be able to start and stop the loaded swfs timeline at will.... I'm loading swf into an MC: loadMovie("myFile.swf", swfHolder_mc);
View 1 Replies
Feb 3, 2011
I have this project that will basically work like a slideshow. I am trying to do things the right way and avoid scenes so I am building each slide as a separate mc and then placing them on the main timeline. What I'm trying to do is get the playback head to advance to the next frame on the main timeline once the mc reaches its last frame. I have found code that works but it seems pretty ghetto:
var _root:MovieClip = MovieClip(root)
stage.addEventListener(Event.ENTER_FRAME, text2);function text2 (myevent:Event):void { _root.gotoAndStop("slide2");}
I guess I have two basic questions:
1. What is the proper way to target a frame on the main timeline from within a mc in as3?
View 6 Replies
Jun 30, 2004
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.
my code is:
on (release) {
_root.crystal.gotoAndPlay("editions");
[code]....
View 1 Replies
Feb 20, 2006
I have a MC with buttons in it. When the button is pressed, I need to tell another MC to go to a marker on its timeline. Do i target the MC name (from the library) or the instance name? would it be something like Code: _root.mc1.mc2.mc3.gotoAndPlay("label");
View 4 Replies
Jun 30, 2004
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.[code]but it only works when the crystalMC is on the first frame of the root.is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?
View 1 Replies
Dec 31, 2011
Is there any way to control nested MovieClip instances placed on the timeline without naming them through the Properties panel? Are there any unique identifiers I can refer to?
Using instance names (like instance33, instance12, etc.) doesn't help since names are just properties, but how about references like sprite187_27 (as returned by trace(this) inside a MovieClip on the TimeLine)?
(Using ActionScript3, Automatically declare stage instances disabled)
View 1 Replies
Jan 1, 2011
So from the headline u know that i want to do but i don't know how to do it!
ActionScript Code:
/// activate the mc with the button from the main Menu
mathSecondMenu.addEventListener(MouseEvent.CLICK, otvoriVtoroMenu);
[Code]....
the problem is that i can get to the button from the first event, but i can make the Mc "proba" to go to "math_basic"!
View 8 Replies
Nov 18, 2008
I'm working on this project, where i attach movies to an empty movieclip. In these attached movies, i have a button that needs to target a function on the main timeline. Example:
on the main timeline, i have an action that loads a bitmap onto the background: loadBitmapSmoothed("background.jpg",bg_con); On the main timeline, i also have a button with following action:
on(release){
this.mc_holder.attachMovie("MC_products",1);
}
Then, in the attached movieclip i have a button that needs to swap the image previously loaded into the 'bg_con'-movieclip, like thus:
on(release){
_root.loadBitmapSmoothed("product_1.jpg",bg_con);
}
For some reason, this doesn't work. I've also tried using _level0. but nothing happens.
View 5 Replies
May 27, 2005
The swf successfully loads where I want it to, but I'm having trouble moving the new movie clip to a specific keyframe in the timeline.
Code:
on (release) {
_parent.productImage.loadMovie("./flash/BT_Closeup.swf");
_parent.productImage.gotoAndStop("set2");
}
View 1 Replies
Oct 31, 2011
If I have a movieclip on the main timeline, and a button in that movie clip. How would I go about getting it to advance the main timeline to its next frame? I understand that in AS3 movie clips are not connected to the timeline in the same way as they are in AS2 but I dont understand why the following works, or if there is a better way?
stop();
next_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent) {
MovieClip(this.root).nextFrame();
}
View 2 Replies
May 2, 2011
How to target a label within a movie clip on the main timeline, from a button within another movieclip on the maintimeline.
View 0 Replies
Jan 16, 2006
[URL]
I made a site, but the menu isn't loading properly. If you reload the page the menu loads, but not sure why not loading every time.
Right now menu and site sections in main SWF file. Maybe I put the menu into a separate SWF file it would load properly?
If the site sections are in the main SWF timeline, then how do I do the actionscript for the menu buttons?
Ie)
menu in level7
main site in level0
site sections are "product section", "about us section", "glossary section" on main timeline
So I'm not loading any SWFs, just moving between sections on main timeline.
View 2 Replies
Jun 10, 2009
why the timeline inside these movie clips and the timeline on the main scene have to correspond to work. [URL]
View 1 Replies
Aug 20, 2011
I've been looking for a tutorial to create a timeline scrubber (not animating specific movie clips, but actually a scrubber that can move along different keyframes of a timeline that has a series of images on it).I found a bunch of these (scrubber controlling specific movie clips): http:[url]....but nothing that allows you to just scrub back and forth on the whole timeline in the exported swf.
View 3 Replies
Feb 2, 2010
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
View 2 Replies
Mar 16, 2007
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
View 4 Replies
Mar 2, 2006
I have made a navigation that is a movieclip, now within the movieclip are 6 movieclips that are the "buttons" of the navigation. This is then placed on the maintimeline as the movies navigation. When one of the "buttons" is pressed i want it to go to a specific point on one of the 6 movieclip "buttons" timeline. This is the code that I have used before on the maintime line to target a movieclip there... but never a mc within an mc. First, would I still place this code on the maintime? or within the mc that the 6 mc buttons are placed? Second how would I target the nav buttons mc's?
stop();
but1.onRelease = function() {
this.gotoAndStop(9);
[Code]....
View 2 Replies
Apr 30, 2009
I am just trying to use actionscript 3.0 (Flash CS4) to change the 'Parent' timeline from a button in the 'Child' timeline
[Code]...
View 2 Replies
Apr 26, 2011
I am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
[Code]...
View 1 Replies
Mar 13, 2011
I have researched the subject for some time now and still haven't figure it out.I use midas3 library (Midi-actionscript3) to import midi to flash. I get each note-item on a timeline. I get the divisions value (192) and all of the "GET-TEMPO" elements are equal to 81.I tried a lot of combinations to get the actual time of the midi but still no good (timeline*192/60 for example).The reason I know it is not synchronized to the actual time is that when I visualize the notes as simple rectangles in flash - I check if they appear exactly to what the mp3 file plays (I have converted the midi file to this mp3 using simple conversion program)I have read a lot about how all is calculated but still haven't figure out the number I need to use to get it right (timeline * MysteriusConstant = ReaTIME, what is the value of MysteriusConstant? is it really constant? and if not how do I calculate how it is changed?)
View 1 Replies
Oct 2, 2011
I have 3 layers in the timeline, and I want to make a new layer, and then use the new layer to be my first frame (like a startpage).
View 2 Replies
Oct 9, 2009
I have a file comprised of 1 scene and two movie clips. The clips are instanced into the Main Timeline and occupy Frames 1 and 2 respectively.MovieClip1 is an animation that has navigation buttons that appear at the end of the clip. I'm trying to get mouse click navigation to make Frame 2 on the Main Timeline active.
Here is what I'm trying but it is not working:
btExplore.addEventListener(MouseEvent.CLICK, ExploreClick);
function ExploreClick (evt:MouseEvent):void {
gotoAndStop(2);
}
this takes the animation to Frame 2 of the Movie Clip Timeline not Frame 2 the Main Timeline.
View 9 Replies
Jul 4, 2009
I'm having some problem with the workflow of flash.I make web banners everyday att my work att it is important to me to have the banners easy structured so I can copy effects, tweens and symbols to a new banner. I have Flash CS3 pro.I always start by making a symbols. And then in the symbols own timeline I make the animation or effect.
The big problem I'm having is when I have the main (scene1) timeline with many frames, and then have symbols on that timeline, with it's own timeline with some frames. The frames in the symbol timeline is okey, but at the main timeline the frames is too short or too long so the animation of the symbol cuts of early or it plays more than one time (too many frames).
How do I calculate how long a symbols timeline should be so It maches the main timeline?What happens to me is that I always have to adjust the symbols timeline and the main timeline, and this I have to do many times.
View 2 Replies
Jan 15, 2009
I've got a dynamic textfield clip which is placed twice on the stage. It also includes a button. Funny thing is, the first trace works (tracing its _y value: 0 for clip 1 and 200 for duplicate clip 2). When I press the down button of both clips however it traces undefined though it's the same line. How does onPress mess up the targetting of both clips? [code]
View 6 Replies
Nov 11, 2009
1. I'm loading an external swf onto my main swf.
2. Then I'm tweening an object which is separate to the loaded swf.
3. When the tween has completed I'm calling a function to make the loaded swf gotoAndPlay(2);
[Code]....
View 8 Replies
Feb 12, 2010
I have 2 SWF (swf1 and swf2). I want to load swf 2 into 1, but getting it start on a label or a particular frame.I use this to load SWF 2
Code:
on(release){
loadMovie("movie2.swf",0);
}
How do i target it to start from a label in a scene from movie2.swf?
View 3 Replies
Apr 28, 2011
I'm trying to target an MC that is already placed on the stage (as opposed to adding it from the library).
But I get this error:
Quote:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com::Test()
at objects_fla::MainTimeline/frame1()
[Code]....
View 5 Replies