ActionScript 3.0 :: Button To Load Movie On Main Stage

Mar 19, 2010

Im trying to load a movie using a button. I just want the button, when hit, to load an external .swf file inside the movie clip playing.

In AS1, (I never did learn AS2) this is what the button command said

on (release) {
loadMovieNum(�About.swf�, 0);
}

So how would this translate into AS3?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Load External Swfs As Pages Onto The Main Stage On The Click Of A Button

Jul 20, 2011

I have created a website which loads external swfs as pages onto the main stage on the click of a button. I am using Flash CS3 and Actionscript 3.0. Here is my code:

[Code]...

View 6 Replies

ActionScript 2.0 :: Click The Button On The Main Movie To Load The Next And Play The Transition?

Jul 18, 2006

All works fine untill I do something to the loaded swf.For example if I click a button on the loaded swf the button works but then when I click the button on the main movie to load the next and play the transition the transistion doesnt work.If I dont do anything to the loaded swf the transitions work.Is it something to do with the paths being changed when the loaded swf is acivated?

View 2 Replies

ActionScript 2.0 :: Buttons And Transitions - Load In External Swf Files Into An Empty Movie Clip On The Main Stage Called Container

Jan 11, 2004

I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following

[Code]....

I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.

[Code]....

View 4 Replies

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

ActionScript 2.0 :: .load Six Separate External .swf's Into The Main Movie While The Main Movie Loads Too

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

ActionScript 1/2 :: Load Movie - Randomly Load Other Swf's (individual Ads) Into Main Swf After

Apr 2, 2009

I am pulling double duty with this question as it serves two purposes. I am developing a total flash controlled ad system for myself, but also need to use the same theory for a project for work.

Concept: I have a main movie (ad rotator system) that I then want to randomly load other swf's (individual ads) into this main swf after a set period of time. The random load I got set no problem. The problem I am having is to get it to move to the new Frame label of the main movie which then loads the smaller swfs. I am using the LoadMovie with nInterval time delay command in flash to load the movies.

[Code]....

View 5 Replies

ActionScript 2.0 :: Load A Set Of 6 Images Using Xml Into 6 Mcs On The Main Stage?

Apr 26, 2010

I want to load a set of 6 images using xml into 6 mcs on the main stage: The xml is easy enough. What I've got is:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<images>
<image src="imageone" />
<image src="imagetwo.jpg" />[code].....

how to import them in to the mc's on the main stage: they are named mc1, mc2 to mc6.Also, because the images will vary in width and height, I need to align them to the center horizontally, and aligned at the bottom of the holding mc.

View 1 Replies

ActionScript 3.0 :: Load A Script From Movieclip On Main Stage?

Jul 23, 2009

I have a movieclip which contain a function called loadBody() in frame 4 where u can find in the following script,

how can I load that function of that movieclip in main stage(_root)? [code]...

View 2 Replies

ActionScript 2.0 :: MX-Load Html Txt File To Main Stage?

Dec 15, 2002

I have the ActionScript working fine on the main stage. Once I convert all layers into mc_clip, then put the mc_clip into the main stage, my html txt file no longer appear on the scroll area. Below is the ActionScript on the first frame in mc_clip. Also, the button 1 and button2 ActionScript to display the html.Questions:How to call the html to display on the main stage?

This is the ActionScript in mc_clip:
//load html txt file
loadVariablesNum("davehtml.txt", 0);

[code]....

View 4 Replies

ActionScript 3.0 :: When Load .swf Into Main Swf The Stage Command Does Not Work

Dec 14, 2009

I use stage in my scrollbar: this.stage.addEventListener (MouseEvent.MOUSE_UP, stopScroll); When I load this .swf into my main swf the stage command does not work. I still want to use stage, is this possible?

View 4 Replies

ActionScript 2.0 :: Load Movie And Pass The Variables Needed From The Main Movie

May 28, 2002

I'm trying to do a demo with a fastforward button and a rewind button that will go to the next scene and previous scene...however, due to the format that my predecessor created used...I'm stuck with alot of scenes. The navbar (ff and rewind buttons) is in a .swf file called main. The actual demo is in demo3.swf. I created a loader scene to redirect to the correct scene (when ff and rewind are hit), but I'm not sure how to pass the variables needed from the main movie.

View 4 Replies

ActionScript 2.0 :: Targetting - Use LoadMovie() To Load Movie Into Main Movie - Buttons No Longer Work

Oct 1, 2003

I have a movie. In it are some buttons and a dynamic text field. When I press the buttons is should load text from a database into the dynamic text field. If I run the movie by itself (ie. not by LoadMovie()-ing it into a different movie) the dynamic text field gets filled with text and all is well and good. However, when I use LoadMovie() to load this very same movie into my main movie, the buttons no longer work; the text field stays empty.

[Code]...

View 9 Replies

Actionscript 3 :: Load An External Swf To Main Stage From Instanced Child Class?

Apr 15, 2010

I am trying to get an instance of a class to the load an external swf and show it.So far I have the following:

1) I wrote a class that uses the Loader class to load an external swf "loadExtSWF".
2) I have a fla named "MainSWF.fla" that uses a document class "MainSWF.as".
3) I have the MainSWF.as file that instances "loadExtSWF" and calls loadExtSWF.startLoad to load the swf.

This almost works. The instance of loadExtSWF loads the external swf, but the swf is not displayed.If I replace the fla's document class with loadExtSWF (this has an empty constructor) instead of MainSWF, and run loadExtSWF.startLoad, then the external swf is loaded and displayed.[code]

View 1 Replies

ActionScript 3.0 :: Button On Main Stage - Cannot Put Actions?

Apr 19, 2009

I have a very simple .fla. One frame, one button on the main stage. I have named the button and when I right click>actions, it says I can't put actions in this area. So then I put the Actions on the main timeline/keyframe. The code below works, but I can't get code to work in the button that I placed on the main stage. This button is dynamically placed by the first two lines of code.

Code:
var MyButton:ButtonOne = new ButtonOne();
MyButton.x = 100;
MyButton.y = 300;
addChild(MyButton);
MyButton.addEventListener(MouseEvent.MOUSE_DOWN,startMC);
function startMC(event:MouseEvent){
myMovieClip.gotoAndPlay(11);
}

If I try to just have the code that looks something like this..
Code:
ButtonOne.addEventListener(MouseEvent.MOUSE_DOWN, startMC);
//movie clip function startMC sits here..
I get an error saying the symbol doesn't exist.

View 8 Replies

ActionScript 2.0 :: Fade In White Movie Clip Over Main Movie When A Button Is Pressed?

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

ActionScript 3.0 :: RemoveChild - Load A Movie To The Stage And Wipe Out What Was On The Stage?

Jul 28, 2010

I have 4 movies that need to be loaded in sequence. The first movie loads the second one, the second one loads the third, then the third one loads the fourth. What I can't figure out is how to make sure there's only one movie loaded at any time. I've tried removeChildAt(0) and other methods. What's the best way to load a movie to the stage and wipe out what was on the stage?

View 4 Replies

ActionScript 2.0 :: Exit Button From MovieClip To Main Stage

Apr 18, 2010

How to control button in movie clip in order to exit back to the main stage.
I used this code:
on(release){
_parent.gotoAndPlay(1);
}

The thing is: In the main page I have a manu you can choose to which movie clip to go. (The first frame on the main stage has a stop(); action in order to be able to choose). And the code bring me back to the main page but start the specific movie clip I exit from all over again. How can I stop this loop?

View 3 Replies

ActionScript 2.0 :: Changing Frame In MC With Button On Main Stage?

Oct 24, 2006

I have one button and it's primary role is to stop all sounds in the project when triggered. It is just positioned on the main stage in the main project, not inside of a MC.

I then have a very simple music playing system (4 buttons, one for each song) in it's own MC which displays text of the artist and title song when respective buttons are pressed.

This works fine, apart from the fact that when I click the 'stop sounds' button the text is still displayed from whetever the last song was that had been playing.

I was thinking there must be a simple method of incorporating an actionscript function into the 'stop sounds' button, so that when it's pressed it also takes control of the movie clip and moves it to the first frame which doesn't display any of this text.

I was thinking of a simple gotoAndPlay command followed by something, but I don't know the command to tell Flash where to find frame 1 of this movie clip rather than just frame one of the whole project.

View 3 Replies

ActionScript 3.0 :: Flash Cannot Find Button From Main Stage

Jun 23, 2011

I have a button that I cant link. This was the correct code for the movieclip.
Code:
MovieClip(this.parent).tint_mc.gotoAndPlay("on");
Only now I have a button inside a movieclip. And Flash cant find my button from the mainstage. I tried
Code:
Button(this.parent).fac_btn.addEventListener(MouseEvent.CLICK,link);

View 1 Replies

ActionScript 1/2 :: HitTest Of A Movie On Main Stage With A MC Inside A MC

Aug 24, 2009

as the title says i am having two movie clips on main stage one called "land" and other called "char" inside "char" MC i have another MC called "ht1" i want to make hitTest between "ht1" and "land" but everything seems to fail, i've tried using _root, _parent?

View 3 Replies

Actionscript 3.0 :: Use Var Form Main Stage In A Movie Clip?

Aug 24, 2010

how to use var form main stage in a movie clip. when i try i get an error.

View 2 Replies

ActionScript 2.0 :: Playing Movie On Main Stage After Certain Frame In MC

May 6, 2008

I have a moviclip on the main stage with a stop action on the frame above. I want the movie to play ahead from that frame on the main stage after a certain frame is reached in the movieclip.

I tried using this simple function on the main stage;
if (_root.myMovieclip.signal._x = 100){
gotoAndPlay(win);
}

So when signal._x moves to 100 in the movieclip, the frame jumps to "win". However this doesn't work. I tried using a timer on the frame as well but it does not provide an accurate enough response.

View 7 Replies

ActionScript 2.0 :: Attach A Movie Clip To The Main Stage?

Feb 8, 2004

I'm trying to attach a movie clip to the main stage using:

[AS]
this.attachMovie("movieObj", mc1, 1);
[/AS]

However, it ain't showing up. Trace said the movieclip of that name is undefined, despite having the correct linkage and instance name. Anyone know why a movieclip might be MIA?

View 4 Replies

ActionScript 3.0 :: Flash - Play Movie Clip With The Button Click Without Playing All The Movie Clips On The Main Timeline

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

ActionScript 2.0 :: Simultaneously The Scroll Bars Either With A Button Somewhere On Stage Or With Another Main Bar

Apr 29, 2011

In the attached file you can see 2 .Fla files a CS5 and CS4, they are the same! I have a main global scrollbar which compares to the other scrollbars that are loaded from the countries drop down menu on the top left..(you can see it clearly) Scrollbars work fine...however... i do need the user to be able to scroll simultaneously the scroll bars either with a button somewhere on stage or with another main bar..

View 1 Replies

ActionScript 3.0 :: Referencing A Button On Main Stage From Inside A Movieclip?

Nov 22, 2009

On the main stage I have a button that I have made invisible once the file is loaded.  Inside a movieclip I have on frame 15 the following actionscript 3 code
 
button_mc.visible = true;
 
I want the button to become visible at the end of this movieclip.  I am not using an external as3 file, I am putting the as3 code in its own layer on the first frame.
 
I know it has something to do with the path to the button, but I cannot figure it out.  If there is anyone who can point me in the right direction for referencing instances by instance name that reside on the main satge from inside a movieclip

View 3 Replies

ActionScript 2.0 :: Getting Back To The Main Stage Once A Movie Clip Has Played

Jan 8, 2009

I'm using Flash 8 and I'm having an issue getting back to the main stage once a movie clip has played. I have my file set up with three movie clips on the main stage. One just plays which is the banner, there are two rollover buttons on that mc for panel1_mc and panel2_mc. When you rollover to view panel1 it plays fine, but inside I have another button to take you to panel 2. That wont work...this is what I have for code for the button inside the clip:

[Code]....

View 4 Replies

IDE :: Unloading A Movie - Can't Put The LoadMovieNum In 0 Level Because It Would Replace The Main Stage

Feb 26, 2009

I can't seem to unload a movie, I've tried every possible actionscript code and still it won't go away. My objective is to run in the main stage a sub menu and for that I've done sub pages each one with a previous and next button (inside the movie that will be loaded), and that's the catch. I can't put the loadMovieNum in 0 level because it would replace the main stage. So I'm trying to do on the button:

on (release) {
unloadMovieNum(1); // it was loaded into level 1
loadMovieNum("new_item.swf",1); // he overlays both movies with transparency
}

Is there anyway to remove the actual movie and replace it with the new one?

View 3 Replies

ActionScript 2.0 :: Button In MC Load Swf In Main Timeline

Jul 30, 2010

I've a problem about AS2 on button within a MC.

In my working flash, there are 2 MCs

1. a MC called content, full size as the movie, act as a blank platform to load external swf

2. another MC button containing a button, click to loadMovie, placed on top of MC content

I'd like to click the button in button to load an external swf in content.

The script I added on button in MC2

Code:
on(release){
loadMovie("XXX.swf", this.content);
}

[Code]....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved