ActionScript 2.0 :: Targeting Sections In Main Timeline From Separate Menu SWF?
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
Similar Posts:
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
Jun 3, 2010
I want to clean up my main timeline by breaking it into 3 sections and putting each section into its own clip. My main timeline is then only 3 frames long with one clip on each frame. Of course, trouble is, the main timeline doesn�t wait for the first clip to play before progressing to the second. Do I need some code in the second main timeline frame to tell it to wait til the first clip has finished?
View 3 Replies
Nov 28, 2011
So I have 2 frames at main timeline, one named "Game" and one is "Menu", they are just a movieclip eash does its own thing. I am in the "Game" playing, I want to change settings so I go to frame "Menu"... when I am back to frame "Game", everything is reseted!! I soon realized this is what Flash has been doing and it's a good thing... But I really want to know how to by pass the resetting now...
View 2 Replies
Jul 14, 2010
Im making an interactive video menu system in flash cs5, Ive split each menu page into labeled sections along the timeline. I have the following code placed in a specific labeled section so it should jump to the "Directory Screen" when the 3 key is pressed:
stage.addEventListener(KeyboardEvent.KEY_UP,fl_KeyboardDownHandler_9)[code].....
But when it goes to the Directory Screen, if I press 3 again it shouldnt do anything but flash seems to remember the code and when I press 3 again on the "Directory Screen" it skips to the next labeled item for some reason.
View 2 Replies
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
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
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
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
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
Jun 21, 2003
I have a button that I want to have load a movie when pressed. It works, howerver, the movie loads in a separate window instead of the the main timeline where I would like it to. How can I correct this? Here's how I have it scripted now:
[Code]...
View 3 Replies
Jan 31, 2012
Hiding Button on Main Timeline from inside separate Movieclip
View 1 Replies
Oct 22, 2008
I am creating a very basic menu. My project consists of a main file that then calls other swf's to fill in the rest of the content. My main timeline is this. There is an preloader which hasn't been built yet, a intro section that is two movie clips (one loads the layout, one fades in my buttons). Then when all this loads, I load the first swf. My difficulty is that I am trying to get my buttons, which are held in mc_buttons, to change the variable myLoader on the main timeline. So when you click on a button, it swaps in a different swf for the current loaded one. I have tried calling the following code attached below.
My error is:
"1119: Access of possibly undefined property myLoader through a reference with static type flash.display:DisplayObjectContainer."
Now, if I define the myLoader variable in the mc_buttons and do an addchild() there, I get the correct content, it just is on top of the old content which isn't what I want...
View 12 Replies
Aug 31, 2010
I have a problem with gotoAndPlay option.I have 2 layers with 3 keyframes, on 2nd frame i have movie clip image_mc which has a dropdown menu and here i will stop the timeline. On mouseover of image_mc I will get a dropdown in which if I click on 1st menu the timeline should go and stop on 3rd keyframe of main stage, but its going to 3rd frame inside movie clip, how to come out of mc on click.
View 1 Replies
May 4, 2010
I am attempting to have the main timeline move from a stopped position over a movie clip to frame 1, where my start menu is.The code I'm using does move the timeline but in doing so it somehow breaks the 4 buttons I have in frame 1.
My code in the movie clip:
stop()
function replayMovie(event:MouseEvent):void
[code].....
View 13 Replies
Jun 13, 2011
I want to do something like this (Dell home page):[URL]
(But I want the cycling to stop on the selected screen once a button has been clicked.)
It can either cycle continually through the screens (I need 9 of them), or it can cycle once & then stop on the last one.
At this point, I don't really care *sigh*
I can make a movie based on this technique
[URL] (What a PITA to be unable to post links!)
that lets me jump to various sections of the timeline when buttons are clicked, and I can make the entire timeline run & then stop (or repeat), but I can't combine the two.
View 6 Replies
Dec 29, 2009
First like so many I am new to actionscript and I'm almost there but I cant figure it out. Either way I am putting a scrollbox in each section where there is a graphic. So for every section there will be a new scrollbox with new info. It goes to each section perfectly but as soon as you use the scrollbox and then try to go to another section the content from the scrollbox is still on the page.
View 4 Replies
Jun 26, 2009
i need to fire separate method for individual menu item clicked ,so that individual item can handle separate method.and i need know what all the properties are available in menu item like type="radio".
<mx:MenuBar id="jj" labelField="@label" itemClick="MenuItemClick(event)" x="23" y="228">
<mx:XMLList>
<menuitem label="File">[code]......
View 2 Replies
May 6, 2005
I am trying to create a nav system that expands to show sub-sections when the user rolls over main section buttons.Let me describe exactly (as best I can) how this would work:A vertical list of 5 menu buttons is stacked and distributed at equal distances.The user clicks a button (lets say Button 2) and Buttons 3, 4, 5 slide down to reveal the sub-nav below Button 2. When the user clicks or rolls back to any of the original 5 buttons, that subnav closes up.Does anyone know of a good tutorial for this type of nav or have anything I might be able to dissect and work from?
View 3 Replies
Dec 23, 2004
I want to load six seperate .swf's into the main movie while the main movie loads too. So in simpler words, i want to be able to load all of the swf's the same time i am loading the main swf.
View 2 Replies
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
Jul 12, 2010
on MC2's timeline I want to target objects on the main stage. Not sure on how to write that without using root. I've been trying deviations of
MovieClip(parent).MovieClip(parent).mcName.
View 3 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 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
Nov 4, 2011
I have the MovieClip named dessin, which loads another MovieClip named dessin (dessin.dessin). Now, there is a MovieClip named displayPlane, in the new MovieClip (dessin.dessin), in the MovieClip named displayPlane, there is a variable, which goes as follows:
Actionscript Code:
var _loc3 = displayPlane.attachMovie("displayNode", "displayNode_" + projectCount, projectCount);
inside that clip, there are multiple MovieClips in vars, I am trying to specifically target one var, the following:
Actionscript Code:
var _loc8 = this.attachMovie("closeBtn", "closeBtn", 5);
I have tried this code to target that specific MovieClip with no success.
Actionscript Code:
_root.dessin.dessin._loc3._loc8
View 2 Replies
Oct 16, 2009
I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that?
see the code and comments
public function mainClass()
{
//stage declaraction
stage.align = StageAlign.TOP_LEFT;
[Code]....
View 5 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