ActionScript 3.0 :: Loading MovieClip On Top Of Main Stage

Feb 4, 2009

I'm new to AS3, and am having issues loading external swf files so that they appear on top of entities on the main stage. My main stage is an interface, and as buttons are pressed, external swf files are loaded. Some parts of the external swf files are meant to display over the interface, but they are under it.

Here's my code:
var _dummy1:Loader = new Loader();
addChild(_dummy1);
var url:URLRequest = new URLRequest("external.swf");
import flash.events.MouseEvent;
Button47.addEventListener(MouseEvent.CLICK,bClick3 );
function bClick3(event:MouseEvent):void {
_dummy1.unload();
_dummy1.load(url);
}

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Loading An External Swf File/movieclip Onto The Main Stage?

Jan 7, 2009

I am loading an external swf file/movieclip onto the main stage - it is a simple transition and once it has finished playing, I want to jump to a frame in the main stage.I've loaded the movieclip onto the stage, but don't know how to jump to another frame after it has played and stopped...what's needs to be added to this to goto a frame on the main stage........

on (release) {
loadMovie("black.swf", holder);
}

View 2 Replies

ActionScript 2.0 :: Loading A Movieclip Into The Main Movie From A Previously Loaded Movieclip

May 26, 2010

Im making a movie with a menu that loads movie clips according to which menu is selected simple enough. However, the newly loaded movie clip also needs to allow the user to load another movie into the main movie effectively swapping the first movie clip with the second. This needs to be done without using the main menu.

View 6 Replies

ActionScript 3.0 :: Loading An External Swf File On Main Stage?

Sep 3, 2010

I m loading an external swf file on main stage which has some links, I want if I click on any of these links the timeline of the main stage should chenge.

View 1 Replies

ActionScript 3.0 :: Go From Movieclip To Main Stage

Oct 4, 2009

I'm googling this as I speak, but I have a movie clip called intro_mc that plays in frame 1. My introduction(it's a web portal project that will be published to a server at college) is on frame 2. Can anyone help with the AS code that will take me from the played movie clip on 1 to the main page on 2? The movie clip stops at the end.

View 5 Replies

ActionScript 3.0 :: Targeting A MovieClip On The Main Stage?

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

ActionScript 2.0 :: Attach Movieclip To Main Stage?

Apr 9, 2011

I have attached a movieclip(linkage name newbox1) on stage dynamically to the main stage.When press a button, You can then drag the movieclip around to any position. When the button pressed the 2nd time i want a new movieclip. Howeer the movieclip dragged just returns back to were its attached .ii want to be able to dag unlimited movieclips not the same movieclip

ActionScript Code:
btn.onPress = function(){
[code].......

View 0 Replies

IDE :: Link Main Stage From Inside Of A Movieclip?

Dec 9, 2009

I created "symbol1" movie clip. And I have dynamic text "myscore" on the main stage.

I have this code inside of "symbol1".

mybutton.addEventListener(MouseEvent.CLICK, b1);
function b1(event:MouseEvent):void {
myscore.text = "30";
}

And it gives me this error. (1120: Access of undefined property myscore.)

It works only when text and actionscript inside of the same symbol. I tried like this root.myscore.text = "30"; but it still doesn't work.

View 2 Replies

ActionScript 2.0 :: Loading 4 External SWFs Into An Empty MC On The Main Stage For Each Of The 4 Projects?

Feb 12, 2010

The problem is this: I am loading 4 external SWFs into an empty MC on the main stage for each of the 4 projects.So you press a button on the main stage for a project, and it loads that specific SWF.These SWFs contain an opening text for each project, a button to "continue" to the gallery, then the text fades out and the gallery loads.That's all within the SWF itself.The SWFs work fine on their own, but the problem is that when I load the SWFs into the empty MC on the main stage, the "continue" button doesn't work correctly The SWFs load fine, it's just the button At first when I pressed the button it would send my main stage back to the first frame, so I thought it was because the AS for the button in the SWF was probably conflicting with the main stage and confusing it. I went back into the SWFs and tagged part of the SWF timeline with the name "togallery" so that when you click the "continue" button, in theory, Flash knows specifically where to go within the timeline of the SWF and not the timeline of the main stage.

That hasn't worked either. The button just doesn't work at all now, at least not when the SWF has been loaded onto the main stage. Again, it works fine on its own. So what can I do? How can I get a button within an external SWF to reference only it's own timeline and not that of the main stage?

View 1 Replies

Flash 10 :: While In Full Screen, Main Stage Resizing When Loading An External Swf

Nov 10, 2010

My main swf is 960x600 and loads full screen. it is a projector or swf, local. I have the code on frame 1 to ensure full screen and show all:

stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.displayState = StageDisplayState.FULL_SCREEN;

Then I load an external swf into a mc, and it goes full screen as expected. BUT the main swf that loaded that external one, at the time of load, suddenly gets scaled back down to its normal size: 960x600, on the top left corner of the Player Window (or the full screen), so somehow at 0,0. Whn I unload the external swf, I can put the code stage.scaleMode = StageScaleMode.SHOW_ALL; to get it back to where it was. But unfortunately I have some buttons from the Main swf that are supposed to be on top of the loaded one, and should stay where they are. But now they all move because of this scaling down.

the mc that is being used as a container for the loaded external swf is an empty mc located at 0,0. The external swf has the same size as the main one: 960x600

I searched and tried things but could not get it to stay in show-all mode when loading this external swf...

View 0 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 3 :: Call A Function On Main Stage From A MovieClip?

Feb 2, 2012

I have to call a function that is defined on the main stage of my project, and I have to call it from a MovieClip

View 3 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 3.0 :: Calling Function On Main Stage From Within A Movieclip?

Feb 9, 2010

I want to make 5 buttons visible after a logo has animatedI have a function called vis that successfully makes the buttons visible.How do I call this from within the movie clip (instance name 'logo'?)first frame of main timeline code:

stop();
function vis () {
webMC.visible = true;

[code].....

View 1 Replies

ActionScript 3.0 :: Add EventListener To Classes, When The Main Movieclip Is In Stage?

Jul 4, 2011

How to add EventListener to classes, when the main movieclip is in stage.

View 1 Replies

ActionScript 2.0 :: Loading A Movieclip Within A Main Movie?

Sep 2, 2010

I have created the gallery as its own movieclip and require it to open when the thumbnail images (within the main movie) are clicked on.The nature of the 'gallery' movieclip is such that on each keyframe there is a different picture and so when the thumbnails are clicked on i need the movieclip to open up within the main movie and jump to the frame that contains the large image of the thumbnail that has been clicked on.for instance to view the large version of the 3rd thumbnail the MC would need to jump to frame 3 when it has opened.

View 2 Replies

ActionScript 3.0 :: Move Main Timeline (stage) From Inside Movieclip?

Jun 11, 2010

I have an animation (movieclipX) on frame 2 of main timeline. At the end of movieclipX I'd like the main timeline to move to the next frame, frame 3. How can I do this??Sorry if this is an easy question, I'm in the process of learning.

View 8 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 3.0 :: Changing A Boolean Inside A Movieclip Via The Main Stage?

Jan 24, 2011

I have a movieclip and within it is a bit of actionscript and a couple of different movieclips to make it function like the button on a ball point pen (you click it and it stays clicked until you click it again).
 
var booleanClick:Boolean = false;
var colorTransform:ColorTransform = optBox.transform.colorTransform;
optHitState.addEventListener(MouseEvent.CLICK, onClickHandler);
function onClickHandler(myEvent:MouseEvent){

[Code].....
 
I don't want to get deeper into this monster of a project without making sure this is working first. Is my boolean working and just my trace statements aren't worded right or is my method to change the boolean wrong?

View 1 Replies

Actionscript 3.0 :: Change A Boolean Inside A Movieclip Via Main Stage?

Jan 24, 2011

I have a movieclip and within it is a bit of actionscript and a couple of different movieclips to make it function like the button on a ball point pen (you click it and it stays clicked until you click it again).[code]...

I don't want to get deeper into this monster of a project without making sure this is working first. Is my boolean working and just my trace statements aren't worded right or is my method to change the boolean wrong?

View 2 Replies

ActionScript 3.0 :: MovieClip Frames Skip Involuntarily On Main Stage

Apr 14, 2010

I have a movieclip in the main stage that has several frames. Then, I created a separate layer for the code that goes like this:
Code:
addEventListener(MouseEvent.CLICK, nextPage);
function nextPage(e:MouseEvent):void {
this.gotoAndStop(this.currentFrame+1);
}

Except for the last frame, which does not contain this code, seems to perform as expected. However, when I called up the same movieclip again by having it go back to a certain frame:
Code:
tutorial_MC.gotoAndPlay("2");
And the whole stuff seems to work fine, when I click and expecting the frame to go to the next, it seems to skip one frame and land on the other instead. For example, if I'm on frame 16 it'll jump to 18, then 20, and so forth. I tried other alternatives but they all seem to yield the same result.

View 4 Replies

ActionScript 3.0 :: Refer Back To The Movieclip In Main Stage From Other Movie Clip?

Jun 25, 2009

I had attach a few movieclip in the main stage by using addChild() method. If I going to refer back to them inside other movieclip, How can i do so..

For example,
//attaching at the main stage
var earth1:MovieClip = new earth()
addChild(earth1);

[Code].....

How can I refer back this Movieclip from other movieclip's timeline?

View 1 Replies

ActionScript 1/2 :: Set Specific Size And Position Of Preloader's Empty Movieclip On Main Stage?

May 1, 2009

it's possible to script an external preloader's empty movie clip to be of a specific size and position on the main stage? here's the script i've got for the preloader so far:
 
var my_pb:mx.controls.ProgressBar;
my_pb.mode = "manual";
this.createEmptyMovieClip("Portfolio", 999);
var my_mcl:MovieClipLoader = new MovieClipLoader();

[code]....

View 2 Replies

ActionScript 3.0 :: Call Function, Pass Value, Access Variable In Movieclip Class From Main Stage?

Nov 20, 2008

I have a movieClip named MC, and it's enabled with action script, with the class name MC_Rectangle and a Stage.I override the MC_Rectangle class file in a mc_rectangle.as external file.here is the code:

package{
import flash.display.*;
import flash.events.*;[ code].....

I have new a object in the main stage var

mc_rect:MC_Rectangle = new MC_Rectangle()

in main stage:

1. how can i access the variable "sequence" in "mc_rect"

2. how can i pass parametre from main stage to mc_rect via function setSequence(data:int)?

3. how can i call the function in addSequence() in mc_rect.

in asp.net, i usually use mc_rect.sequenct,mc_rect.setSequence(data), mc_rect.addSequence() to achieve my goals......btw, can function in mc_rect return out result to main stage?

View 1 Replies

ActionScript 3.0 :: MouseEvent Doesn't Work - When Drag And Drop The Container Movieclip On The Main Stage And Compile

Aug 1, 2009

I added a movieclip and named "bot_mc" in another movieclip. Then, In Action panel, I use bot_mc.addEventListener(MouseEvent.DOWN, xxxx). However, when I drag and drop the container movieclip on the main stage and compile. There is no error occurs but the MouseEvent doesn't work.

View 3 Replies

ActionScript 3.0 :: Loading Random MovieClip To Stage

Oct 18, 2010

I have 3 mc's in my library each with linkage "icon1", icon2", icon3". What I'm trying to do is load one of them randomly in to the stage. Here's the code I have so far:

Code:
//creating an array that holds the mcs
var iconsarray:Array = new Array("mc1","mc2","mc3");
//creating a random number to use for loading the mc
var randmc:Number = Math.round (Math.random ()*2)+0;
//this is just a string to hold the mc with the number, not used
var all:String = (iconsarray[randmc]);
[Code] .....

View 1 Replies

Professional :: External Image Loading Into MovieClip On Stage

Oct 18, 2010

I am trying to load an external .swf (actually it is only an image that I published as a swf file, not a complicated movie) but I get errors. I am trying to load the .swf into a movieclip and the movieclip appears on the stage. I have put the code in frame 1 where the image should appear (in the movieclip). The code that I used is below and works fine with a .jpg and when I load it directly on the stage, that is to say, when I put the code in a frame on the stage. Why does it not 'work' right now?

I have added 'parent' in 'parent.event.target.content.y = 200;' in the first frame of the movieclip timeline, to make sure that it will appear on the (main)stage. The error that i get is this one:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at galerie2010_fla::mcBallon1_11/frame1()

This is the code in frame 1 in mcBallon1:
var imageRequest1a:URLRequest = new URLRequest("images/SWFoverig/ballon1_702x368.swf");
var imageLoader1a:Loader = new Loader();
imageLoader1a.load(imageRequest1a);
addChild(imageLoader1a);
imageLoader1a.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete1a);
function onComplete1a(event:Event):void{
parent.event.target.content.y = 200;
parent.event.target.content.x = 205;}

View 2 Replies

ActionScript 2.0 :: Loading Random MovieClip From Library On Stage

Oct 20, 2004

I want to load a random movie clip from the library to an empty clip on the stage called (bg_graphics). the clips in the library are called (green, blue, yellow).

View 5 Replies

ActionScript 2.0 :: Command External SWF-file To Play Outside Of The Main Movieclip Via Button From Main?

Jan 17, 2012

I Have a flashmovie thats almost done and will soon hit the internet, but I want to add some animations into the website it�s two gears that I�m about to put at the bottom of the page and when a button releases in the main flashmovie the two bottom gears will turn a few frames and just stand still.These three movies are all separate (main movie, first gear and second gear).

It's a homepage designed in HTML and flash that has this "main flashmovie" in the middle of the screen, the size is about 1500(width)X800(height). And the gears is about 800wX200h placed at the left and right side bottom of the page. Dont worry the site is easy to apply to any screen resolution.I have been looking everywhere for any soul out there who suffering from the same problem but no success. Is it possible to script a button in the main movie to launch two separate movies in their own contents?

View 2 Replies

ActionScript 2.0 :: [CS3] : Getting GotoAndStop From Main Timeline To Movieclip Within Movieclip?

Nov 20, 2008

I have a main timeline with a button. I need the action for this button to gotoAndStop to a frame within a movieclip, within another movieclip. I have tried on the main timeline setting the actions of the button to:

on (release){
clip1.clip2.gotoAndStop("frame1");
}

and tried:

on (release){
_root.clip1.clip2.gotoAndStop("frame1");
}

lastly:

on (release){
_parent.clip1.clip2.gotoAndStop("frame1");
}

If I double-click on the movie clip (clip1) and then double-click on the movie clip (clip2), I have several frames labeled "frame1", "frame2", etc.The button doesn't work.

View 7 Replies







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