ActionScript 2.0 :: Preloader - Load A Movie Clip After Pressing A Specific Button In The Main Scene
Jan 2, 2005
I wrote this AS for my preloader which schould be able to load a movie clip after pressing a specif button in the main sceene:
[Code]....
1) The problem is that to be able to target a movieclip I will need to give it a instance name. Where can i find this function in MX ?
2) I cannot understant how I schoul put a loadBar being a small movieclip on the main timeline, I think( the same timeline the container clip is at ) or maybe not ? well I am bit confused now..
Well I have done already a sceene preloader for my site and it works perfectly and i did not experience any problems as Im having now with this new kind of preloader.
View 2 Replies
Similar Posts:
Nov 30, 2006
i would like to have a preloader run in a movie clip rather than in the main scene...http:[url]....i have followed this tutorial exact and it works when i create it on the main scene,but the loading bar and text doesnt work when i build it in a movie clip.
View 6 Replies
Nov 19, 2004
I put a button in a movie clip to control actions in the main scene. Shouldn't that work? For some reason it doesn't.
View 11 Replies
Dec 25, 2002
I have this Preloader movie clip on one scene called "preloader" then i have content on the second scene called "main".The preloader works fine, its just that once it is loaded somehow it doesnt go to the "main" scene.This is the AS on the preloader MClip ::
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();[code].....
View 14 Replies
May 2, 2009
i have movie clip named serviceMenu which is instance of menuAll in Scene 1
scene 1 have 8 labels:
serv1 - serv2 - serv3 - serv4 - serv5 - serv6 - serv7 - serv8
inside serviceMenu i have 8 buttons
when i doubleclick serviceMenu it take me inside
menuAll which have 3 layers
1- 1 keyframe actions
2-1 keyframe for the button
here is the code for one of the buttons
servSix_btn.addEventListener(MouseEvent.CLICK, goServ6);
function goServ6(event:MouseEvent):void
{
serviceMenu.gotoAndStop("serv6", "Scene 1");
trace("button Clicked")
}
and here is the error: "1120: Access of undefined property serviceMenu."
am trying to target scene 1 labels
View 3 Replies
May 7, 2009
I can get by and make nice flash sites, but I'm still learning what goes where and am still borrowing code to get by.I've laid the problem out in some detail as I am sure that will save a lot of questions later on, but feel free to ask if you want more info.Problem is as follows: I've built a two scene flash site using open source code for the preloader scene:[code]The main scrolling menu scene works great when it's a one scene movie and the preloader code works fine with a load of other sites I've built, but when I put them together on this site (the code for the scrolling menu precludes the addition of a preloader directly into that scene so separate scenes are a necessity) everything goes to pot.When testing the site (both as a standalone SWF file and when embedded in an HTML file) the preloader works fine and the main scene appears correctly, but when you click on any button to move back or forth along the menu/timeline it jumps and jerks along very roughly and stops short of its designated point.
This causes the whole scene to fail as the designated timeframe for each button contains a movie instance that won't function until the specific timeframe is reached.It's odd behavior and I'm stumped as both chunks of code work fine separately.I've even tried a much simpler preloader that doesn't display percentage or anything, it just cycles between frame one and two until the movie loads and then plays it (just like this one, but with no bells or whistles).Unfortunately my lack of actionscript knowledge prevents me from even finding a simple term to sum up the problem so I've failed to find any similar issues on any forums or Google.
View 3 Replies
Aug 20, 2011
i have a menu with 8 buttons and every movie clip of them have the following script on it
[Code]....
what i need is when i press the movie clip it goes to specific scene label. i tried this code
on (release) {_parent._parent.gotoAndPlay("b")
}
but it doesnt work with movie clip but works with buttons only , so is there any equivalent code to use with the main code above of movie clip.
View 7 Replies
Feb 8, 2012
I am working with an iMAC running 10.6.8.I have created a flash file with only the main scene, which has a List button and a Home button. The List button has 20 links as a scroll list, each link installs a movie clip from the library.The problem I am having is the List button works fine until I add the Home button, then the Home button works fine, but the List button only works on the frame that the action is on. Each button is on it's own layer, and runs the whole length of the show, which is 220 frames. I have a stop label at each place a movie clip is to play.
If I remove the Home button from the main scene and put it into each movie clip, how do I tell the movie clip to go to the main scene frame 1?
View 7 Replies
Dec 1, 2009
I`m new here but as I`m working on my showcase for the university I experience a bit of a flash issues because of being noob What i can`t find out is what script to use so i can make a "back" button in a movie clip to load a designated frame (let`s say frame 5) from the main scene. I`ve tried this:
back_vs.onRelease = function(){
gotoAndPlay("sceneOne", 5);
}
[code].....
View 3 Replies
Jan 13, 2004
I have a menu bar as a movie clip and another movie clip acting as a slider. I want to on pressing a button on the Manu bar movie clip get the slider to slide across with easing. however I don't want the easing to be infinite so can't use a this._x*=.9 or some decimal < 1. Loop function only acts on the sinle fram so it too quick to see.
View 1 Replies
Sep 7, 2010
I am using Flash MX and am a complete novice to Actionscript. I created a movie clip with a dynamic text box that works fine when I test the movieClip scene. I brought that onto the main movie time line and when I go to test the movie, the dynamic text no longer works. I have tried different actionsript options on the main time line and on the movie timeline but cannot figure out where I am going wrong. Could someone give me a very basic walkthrough as to what I need to do to get this to work?
View 9 Replies
Jul 9, 2002
I want to load a movie loadMovie ("target", _root....) and so on. My question is can you target a specific scene in the load movie command?? I have a movie with a button that loads a new movie into level 0 so it replaces the first movie. Now in the new movie I have a button that unloads the new movie and loads the previous one. But it starts it off at the veru beginning of the movie. I want it to pick up where the first button click took place.
View 2 Replies
Jun 30, 2005
How do I access variables on the main scene from inside a movie clip.
I have a variable called player health, and inside the movie clip I want to do this, playerhealth -= 20, but its not working
View 10 Replies
Jan 22, 2009
Is there any code that basically says, if root frame = 2 then do this.. I basically need my movie clip to blur when the main scene hits certain frames. The movie clip pans around though with script thats why i cant just add a blurred image to a layer in the main scene.
View 6 Replies
Feb 25, 2003
How can I load/unload a movie located on the main scene, from a movie clip, or vice versa. Right now I can only load/unload a movie if located in the same timeline.
View 2 Replies
Sep 11, 2010
I wanted to create a portfolio in flash, so I designed the layout in photoshop, with different webpages in different groups. So groups i created: home, about, porfolio, contact, affiliates, topbar, menu.I use Creative Suite 3 or CS3I then imported the groups into flash as movieclips, using the import to stage function. here is the image of the main scene in the flash. (SEE IMAGE 1st thumbnail)I created a new layer on top of all the layers and used labels at equal intervals to differentiate between pages.here's the image depicting the same.(SEE IMAGE 2nd thumbnail)Now in the home movie clip, i made all the text layers as movie clips to make button animations and assigned sounds and actions to them i.e. rollver, rollout andclick events. here's the swf.(PM ME FOR SWF)I want to know the code or method to load the frame labelled ''about'' in the main scene when i click on the movieclip button 'about' which is in the movieclip 'home'. Here's the code i tried for the first 'about' button, but it returns error "1120: Access of undefined property event."
code:
ActionScript Code:
var OverSound:roll_over = new roll_over();
[code].....
View 0 Replies
Jun 25, 2006
I have a movie clip which, when closed, should send you to a specific frame on the main timeline... I have used frame labels on the main timeline... Here is a bit of my code so far:
[Code]...
View 5 Replies
Apr 2, 2008
I put a movie stopped, I want that when I press (enter) the movie go to and play my next scene. How I can make that?
View 2 Replies
May 16, 2009
I have in the Scene 1, on layer 2, Frame 2 a movie clip named "Festival_conteudo_mc".And inside of this i have a buton ( close_btn ) that I would like to close this movie clip and go to the Scene 1 - to the main menu.On Scene 1 I have my menu buttons ( Festival and Contacts ).
The problem is that i dont know how to make them communicate, I've tryed _root, and As3 tells me it doesnt exist and its replace by Stage...I too new in this stuff. What happens when i put
close_btn.addEventListener(MouseEvent.CLICK,menu)
function menu(Event:MouseEvent):void
{
gotoAndStop("Scene 1", 1);
}
It give Script no error, but when i Export the movie a error 1067 is reported.
View 1 Replies
Oct 7, 2010
This is what I thought would be pretty easy to do:
- I have 1 scene named: "ucScene"
- I have a Movie clip on frame 1 with instance name "ucMovie"
- Inside this movie clip is a button with instance named "ucButton"
When I click this button I want my "ucScene" to "gotoAndStop" on frame 10
[Code]...
View 2 Replies
Dec 28, 2009
No..not that type of parenting ;DOK,I have a main scene, then sitting in the root scene I have 2 movie clips.1)centro2)fotoIn the first movie "centro" there is a menu btnI want this menu btn to call up mclarge + its frame (1) thats housed 3 levels inside the foto mc in root.
Main scene - (1) centro (banner which houses menu btn)
(2) foto_mc
- Main_boy_mc (<---works if menu btn houses in here)
[code].....
View 0 Replies
Aug 30, 2006
I am looking for a way to fade in a white movie clip over my main movie when a button is pressed.
(i.e. When you press a button, a white rectangle will fade in over all other layers and then fade out after a couple of seconds. This is to make it look like the different pages are fading in and out without having to build the transition over and over again.)
View 8 Replies
May 26, 2009
I have a movie clip on a scene with a button inside. How can I make this button to go to play frames on the scene but not inside the movie clip in AS3.0?
View 7 Replies
Apr 26, 2009
I'm trying to make a flash website that has clickable buttons that will play different movie clips. But I dont know how to make it to just play the movie clip with the button you click without playing all the movie clips on the main timeline.
View 1 Replies
Jun 30, 2010
Trying to load a movie clip into another movie clip and control the loaded clip timeline from main stage.
Code:
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("Transcription-RNAChain.swf");
[code]....
The movie appears to load, as it appears on the stage, but it throws the following error in the debugger on frame 1:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Additionally, I'm getting neither the result of function loadingError or function finishedLoadingFunction.
View 3 Replies
Jan 4, 2012
I'm in the process of designing this site as a portfolio for my art and am in the process of creating and laying out the galleries. My idea was to create movie clip animated buttons that would react to the roll over stuff. I got that part to work the way I wanted it. But now, I can't seem to figure out how to put a "Gotoandplay" type of code on the buttons so that the timeline would jump to the appropriate frame and play. (I put an "on(release) gotoandplay" on it the way I would put it on a button but it never responds. I have a couple of buttons that work fine with a "geturl". so I thought a "gotoandplay" would work fine. If this can be figured out in a way that I can easily use it for all buttons with just the frame number needing alteration, that would be best. After you click the splashpage door jpg, there will be a piece of paper on the floor. That is a button which should trigger the animation that starts at frame 114. When clicked, the page lifts up and spread open to two pages. But it never reacts
[URL]
View 6 Replies
May 14, 2009
I've made a very normal animated pop-up menu for my flash website, i now want the items that show up to refer to the main timeline, i'm kinda puzzeled on this one, because i dont want to store all my content inside the movieclip (that was my first solution)
View 5 Replies
Feb 22, 2005
how do i make a button trigger a movie clip that targets specific coords? I'm building a map and when a button is click it goes to a defined point. right now it jumps to the coords, but i'd much rather it smoothly move instead. the other thing is that i would like it to move from whatever point it is currently at.
View 11 Replies
Mar 10, 2010
I have a movie clip on the main stage- inside that movie clip is a button- I want that button to contol a function on the main timeline-
example: Button Script
closeAll_btn.addEventListener(MouseEvent.MOUSE_DOWN, goCloseAll);
function goCloseAll(e:MouseEvent):void {
****don't know what to put here to activate "closeAllOpenMovieClips" function on main stage****
}
example: Main Stage Timeline Script
function closeAllOpenMovieClips():void { trek_mc.gotoAndStop(1); lost_arts_mc.gotoAndStop(1); rain_mc.gotoAndStop(1); vintage_mc.gotoAndStop(1);}
***don't know if I need more script on Main Stage Timeline that just "function" ***
View 5 Replies
Jan 29, 2012
I am making a website based in flash actionscript 3.0 i have a button nested in its own movie clip, because I have the button expanding to be able to read it i have figured out the only way to do this is by creating it as a movie clipa nd inside the movie clip creating it as a button. I added an event listener to the blog button by saying[code]...
i have named the symbol blog and have name the frame of where the blog page is going to be "blogframe" this line of code at the bottom is where i run into trouble the output window in Flash is saying "The blog button was clicked" just like i want it to. no errors are accouring why than is the playhead not going to frame "blogframe"? if the button is working when i click it the code is right i belive the problem here is it does not want the playhead to go to the frame i want it to. So i gues my question is, how can i make a button withing a movie clip interact with the main timeline?
View 3 Replies