ActionScript 3.0 :: Control Loader MC From Menu MC?

Nov 4, 2009

I am wondering what the best solution is to this problem. I have on my main timeline a movie clip (emptyMC) that I am loading my external SWFs into and I need to be able to access this loader movie clip from my menu, which is it's own movie clip on the main timeline. As it stands, when I have my buttons on the main timeline I have no issue. But once I put these same buttons into the menu MC I am lost as to how to "get back" to the loader on the main timeline to load and unload the external SWFs.Here is my current code that allows for me to load and unload with buttons on the main timeline. Is there away to modify this same code for my purposes?

PHP Code:
import flash.media.Sound;
import flash.media.SoundChannel;

[code].....

View 8 Replies


Similar Posts:


ActionScript 1/2 :: Flash Menu Component - Loader To Load An Swf When An Item Is Selected From The Menu

Oct 27, 2006

i created an application and it has a menu bar at the top of the stage it also has a loader component below it. i need the loader to load an swf when an item is selected from the menu. Does anybody know how to code this. I am using the following code:

[Code]....

View 1 Replies

Actionscript 3 :: Menu Bar Control In Flex , Handle Separate Method For Individual Menu Item?

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

Flex :: Menu Control - Click A Button And A Menu Is Displayed. Click That Button A Second Time And Hide That Menu?

Jun 20, 2010

Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.

How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:

<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;

[code]....

View 1 Replies

ActionScript 3.0 :: Using Loader To Load, Then Control A Swf?

Jan 29, 2008

I'm loading a swf with the AS3 Loader class. It's being done from a main.swf that has nothing but a preloader display. The content is all in the swf that I'm loading with the Loader class. It's working. But the swf's playhead seems to be already 40 or so frames down the timeline once it's displayed on the stage. So I want to tell the loaded swf to gotoAndPlay(1) after the preload is complete in the relevant handler. The handler fires, but I don't know how to access the swf in question.loader.content returns a DisplayObject and trying to talk to it with MovieClip properties throws errors. I've tried to cast it as a MovieClip based on various things I've seen via searches here and in the docs, but that's failing, too.How does one do this the "right" way?And for that matter, why has the timeline already started to play before the swf is visible on stage?

ActionScript Code:
private function onLoadComplete(event:Event):void {
// what can I do to take _loader.content and make it accessible for a gotoAndPlay() or some

[code].....

View 5 Replies

Remove Loader And Button Control. Want To Play Automatically?

May 18, 2009

I have bought a flash template in which I want to incorporate into another movie but I need to remove the preloader and button control. So in other words as soon as I preview it, it should play automatically without first seeing a preloader or having to click on a button to play the movie.

View 3 Replies

Professional :: Control The Swf Movie Loaded In Loader Component?

Oct 13, 2010

I have an external swf file loaded in loader component. The external swf loaded in loader component is stopped initially. I want to play it by a button outside the loader component which is located in the main swf movie.

View 1 Replies

ActionScript 3.0 :: Loader.swf To Load A Menu.swf File?

Jul 22, 2010

I'm making a loader.swf to load a menu.swf file. I'm done this dozens of times the same way and it has worked perfect. But this time...when I load my menu and trace it out, the loader keeps loading and reloading the menu.swf infinitley and I don't know why.

The only thing I've discovered is that my menu.swf file will load just fine IF I delete all of the actionscript from it. If there is even a comment in there the infinite loop starts again.

[Code]...

View 4 Replies

ActionScript 2.0 :: How To Get Menu Control Throughout Whole Movie

Aug 13, 2004

I have a menu that controls my movie right, I was wondering how I could make a little sliding bar like on a media player. Where u slide it to a certain spot and it goes to a certain spot in the movie. How I could get my menu to stay throughout my whole movie?

View 5 Replies

ActionScript 3.0 :: Menu Buttons - Changing Variable Loader On Main Timeline

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

ActionScript 3.0 :: Control Main Stage From MC Menu?

May 3, 2010

I want to have a hidden menu so I have put some buttons in a MC and added it to the main stage but I am having trouble controlling the stage with the buttons in the movie clip. I think I need to reference the main stage some how... parent or something like that but I'm not really sure and don't know where to put the code.

Code:
stop();
import flash.events.MouseEvent;

[code]....

View 2 Replies

ActionScript 2.0 :: Control Menu With Cursor Keys?

Mar 22, 2010

I have created a simple menu with 4 buttons[code]...

What I need to do is control this menu with the cursor keys. For example, right key selects the button on the right, down key selects button below... etc. Once selected, the enter key will invoke that button.

View 2 Replies

ActionScript 3.0 :: Scrolling Menu With Mouse Control

Nov 6, 2010

I've been searching through here constantly for a thread about a horizontal scrolling menu for actionscript 3, but I can't find any that are what I need. I have something that has been written for AS2, but I don't know how to write it for AS3.

This is the script I have now, that I got from a website called Sitepoint (Flash Script - Scrolling Menu With A Scrolling Background, I'd link but this is my first post here).

xm = 0;
function xpos(bar_length,mul)
{
hpos = 400;

[Code].....

I like it because its all based on the x position of the mouse which I feel makes the scrolling easier to control than a variable speed, not that it matters too much.

View 2 Replies

ActionScript 2.0 :: Flash Menu To Control IFRAME

Feb 12, 2005

I want to scroll through pages in an IFRAME in a HTML page with my Flash menu.

It works partly but it doesn't go back and forth correctly. This is the code I have now:

Code:
myUrl = 1;
btn1.onPress = function() {
if (myUrl<4) {

[Code].....

View 4 Replies

Flex :: Remove The Icon Indent In Control Menu?

Oct 26, 2009

I use PopUpButton object and inside a Menu object. For some reason it has default text indent (even when an icon is not defined). How can I remove this indent?

View 1 Replies

Flex :: Hyperlink - Control The Context Menu On A Link In HtmlText When?

Jul 16, 2009

I created a Flex application with a textArea. I'm populating the textArea's htmlText property.I have a context menu on the textArea, but I don't see how to make a different context menu when the user right clicks on a <a href...>link</a>. Can I control the context menu for a link displayed inside of the htmlText of a mx:TextArea?

View 1 Replies

ActionScript 2.0 :: Mouse Movement (up And Down) To Control The Expansion / Collapsing Of A Menu?

Apr 7, 2004

I need the mouse movement (up and down) to control the expansion / collapsing of a menu.

View 3 Replies

ActionScript 2.0 :: Menu Slider - Can't Get The Button To Control The Motion Of The Movie

Mar 11, 2003

I am trying to make a menu that has a "slider" arrow at the top that points to the current button that you clicked. Right now I just have it so that if you click a button it changes the x position of the arrow movie clip to go over a certain button. I would like to create the effect where it moves slower to the different buttons and then it "springs" back and forth over the button getting closer and closer until it finally stops.

I have tried using some formulas that I found on the web, but I can't get the button to control the motion of the movie.[URL]

View 3 Replies

ActionScript 2.0 :: Mouse Movement To Control Expansion / Collapsing Of Menu

Apr 7, 2004

I need the mouse movement (up and down) to control the expansion / collapsing of a menu.

View 3 Replies

ActionScript 3.0 :: Using Loader To Load An External Swf And Control The External Swf?

Nov 17, 2010

as3 is new for me, but i would like to write a script using loader to load an external swf, and control the external swf. But I find I can't control the swf, because there are no fixed instance name. here is my script.

[Code]...

View 3 Replies

Actionscript 3 - Flex / Flash - Open The Swf In A Browser Window That Doesn't Have The Browser Control Bar Or Menu?

Oct 27, 2010

The title essentially is the question, how do I open the .swf without the browser's control bar junk? and maximize the window?

View 2 Replies

ActionScript 3.0 :: Video Control Menu For Youtube Video In Flash

Nov 22, 2010

by following a tutorial on [URL], I was able to display a youtube video in flash, but the problem is that the video doesn't have a control menu. Just wondering if there is a way to make one, either it is customized or some default menu provided by youtube or flash.

View 0 Replies

ActionScript 2.0 :: Expanding / Collapsing Menu - Should Have Remember The Last Visit Menu And Show The Menu

Jun 5, 2004

I have created this site with a expanding / collapsin menu. When a user selects a menu e.g. "hammers" then the menu is loaded and show the submenues. When the users closes the menu by moving the mouse away from the area the menu collapses. If the user expands the menu again the menu should have remember the last visit menu and show the menu.

View 4 Replies

Flash :: Professional - Add New Menu In Menubar And New Menu Item Inside The Help Menu

Feb 27, 2011

i want to add new Menu in flash IDE and i want to add inside the adobe flash menu. How i can add new menu in menubar and new menu item inside the help menu. is it possible to do this things if yes then which language i have to use for this. what is way to start development and what is the .MXP file and how to create this .MXP file.

View 1 Replies

ActionScript 3.0 :: When Click In On Menu The Actual Menu Does An Alpha To 0 And The Next Menu Appears?

Jan 27, 2010

The menu is like this http:[url]... (the site is in portuguese but it doesnt matter), when I click in on menu the actual menu does an alpha to 0 and the next menu appears using the alpha from 0 to 100 (and some animations like the cellphone going up).Now, how can I do a menu like that, whatever the menu I choose, it does that alpha animation ?

View 1 Replies

ActionScript 3.0 :: Loader Or Loader Context - Container Loads The Module From An Absolute Path

Jan 23, 2009

I have two swf files, each one almost with the same classes, the most important one is a Singleton class, each swf does "singleton.getInstance()". The diference is that one swf is like a container and the other one is like a module. So when the container loads the module from an absolute path like loader.load("file://c:/modules/module.swf") or loader.load("[URL]"), two different singletons (same class) are created

But when the container loads from a relative path like loader.load("module.swf") , just one singleton is created (that is what I want) I am just intrigued with this behavior, could someone explain me this? PD: I believe is something related to loaderContext and applicationDomain but It also appears that isn't working right. -Patricio Foieri , Vertigo Labs

View 1 Replies

ActionScript 3.0 :: Loader Event.INIT Fires But Loader.content Is Null?

May 9, 2009

The title describes the problem: Loader.load() is firing the INIT event, but in my listener it's reporting loader.content as null. The description for INIT event is "Dispatched by the associated LoaderInfo object when the properties and methods of the loaded SWF file are accessible."I'm loading a lot of JPG images, and 95 percent of the time it works fine; the init listener fires and reports valid loader. content.I absolutely need loader.content available because I need to set the bitmap smoothing property to true.I've tried using Event.COMPLETE and it has the exact same problematic behavior.

View 13 Replies

ActionScript 3.0 :: Game App Runs Fast In Simple Loader And Slow In Other Loader?

Apr 28, 2010

I'm feeling a bit low now as I have been suffering this for months. A simple loader loads my simple game and runs VERY FAST on even slow pcs BUT when I build this other loader, it goes quite slowly and I don't know where the app is going wrong. WHERE is the processing consumptoin coming from out of my app.

[Code]...

View 1 Replies

ActionScript 3.0 :: Loader Disappearing - Set The Dimensions Of The Loader So The External Swf Doesn't 'spill Over', The Result Is A Blank Screen?

Mar 26, 2010

I have the following code which simply loads an external swf, puts it in the right place and should all be hunky dory.This works:

Code:
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest=new URLRequest("foobar.swf");[code].....

to set the dimensions of the loader so the external swf doesn't 'spill over', the result is a blank screen. No matter how high I set those dimensions it just doesn't display anything.

View 4 Replies

ActionScript 3.0 :: ADDED Event In Loader.load And Loader.loadBytes

Sep 13, 2010

I got this very strange behavior from FlashPlayer debugger 10.1 r82. When I call loader.load method, no ADDED event is dispatched to the loader object. But if I open the file and call loader.loadBytes instead, an ADDED event is dispatched to the loader object. I suspect the ADDED event is dispatched because the content is being set as the child of Loader object, but why in the other case it is not dispatched?

View 4 Replies







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