ActionScript 3.0 :: Controlling MC's On Stage From Within Other MC's

Feb 22, 2011

I am trying to control a movieclip's visibility on the main stage from within another movieclip. I have read many forums and tried pretty much everything without any success.

Here is an example: I have two movieclips on the mainstage. one called: animate_mc another called: info_mc

Inside animate_mc, I have a button & a function that when pressed should hide the info_mc. I have tried: this.parent.info_mc.visible = false; stage.info_mc.visible = false; (_)root.info_mc.visible = false; To name a few of many other possibilities I have tried, but I still have not managed to make it work.

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Controlling Mcs On Stage With A Class?

Mar 9, 2009

I have a main ButtonClassTest class that extends the MovieClip class. Then I have a ButtonTest9 class that extends this ButtonClassTest and a ButtonTest9.fla.It works fine (click, rollover, etc) when I link a movieclip in the library of my ButtonTest9.fla to ButtonTest9 and place instances of this mc on stage (button1_mc and button2_mc). However, I'm not being able to control anything about the instances themselves, like, setting button1_mc.alpha = .5 in my ButtonTest9 class.I tried a whole bunch of things, like Stage., this., putting it into functions, not linking the mc in the library and using new ButtonTest9 instead.

View 2 Replies

Actionscript 3 :: Controlling Objects Of Another Class That Are Already On The Stage

Mar 3, 2011

Let's say that I've a button object (instance of Flip) and a coin object (instance of Coin) on the stage. The coin object has two frames: one showing Heads and one for Tails.

MyCoin class is as following:

package
{
import flash.display.MovieClip;
public class Coin extends MovieClip

[Code]....

Problem: How do I reach the coin object on the screen via onMouseClick function? Let's say that the object on the stage has instance name of myCoin. I suppose that had I not done this with an external class and simply used actions from the frame I could just use the instance name as a variable. I couldn't figure to do the same it in an external class. Do I first create the object which is already on the stage?

View 1 Replies

ActionScript 2.0 :: Controlling Stage.width If Over 1300?

Feb 14, 2005

I'm trying to say, "if the stage width is over 1300, then make the stage 1300. If it's less than 1300, just let it be whatever value it already is. I tried this but it doesn't work.

if Stage.width > 1300 {
Stage.width = 1300;
} else {
Stage.width = Stage.width;
}

I have a function that expands the stage width to be whatever size the browser window is, but don't want anyone with an apple cinema display or something comparable to have the stage that wide.

View 4 Replies

ActionScript 2.0 :: Controlling Stage.width If Over 1300

Feb 14, 2005

I'm trying to say, "if the stage width is over 1300, then make the stage 1300. If it's less than 1300, just let it be whatever value it already is. I tried this but it doesn't work.[code]I have a function that expands the stage width to be whatever size the browser window is, but don't want anyone with an apple cinema display or something comparable to have the stage that wide.

View 4 Replies

ActionScript 3.0 :: Controlling Labelled MovieClip On Stage From A Child .as File

Jun 20, 2009

I have an FLA file with a movieclip on the stage which is labelled "blok", and a button on the stage labelled "button1". This FLA is attached to a file called main.as through the document class.

In the same folder where I am storing main.as I have a second .as file called secondFile.as. I have imported this class into main.as using: import com.tests.secondFile;

and in the constructor of main.as I have put:

loadB=new secondFile(button1);
addChild(loadB);

Within secondFile.as my constructor looks like this:

public function secondFile(button1:SimpleButton){
button1=button1;
button1.addEventListener(MouseEvent.MOUSE_DOWN, buttonPushed);
}

[Code]....

Basically I'm trying to get the MovieClip labelled "blok" to move by 50 pixels on the stage when button1 is pressed, but when I test my FLA I get the following error:

1119: Access of possibly undefined property blok through a reference with static type flash.displayisplayObjectContainer.

I would have thought that this.parent.blok would control my movieclip labelled blok on the stage of my FLA from within secondFile.as since secondFile.as is a child of main.as which is the document class of my FLA, but obviously this is not right.

how to access labelled items on the stage from within a child object.

View 6 Replies

ActionScript 2.0 :: Code Optimization - Controlling MovieClips Buttons On Stage

Jan 7, 2007

I am sure that this code can be optimized so I don't have to type 8 instances (only 2 shown) of the (almost) same code.

kabinet.onRollOver = function() {
this.fleka._alpha = 70;
this.izlaz=false;
} kabinet.onRollOut = function() {
this.izlaz=true;
[Code] .....

What I am aiming for is to have a way to pass "kabinet", or "operativni" etc. to a function or smth... The code is used to control mc buttons on the stage. It works, but it's ugly and not practical, obviously. I tried with
[var]onRollOver = function() {
Inside a function, var being the parameter of said function ("kabinet", "operativni" etc.), but to no avail. Also tried with the with(var), thingy, but with the same result.

View 3 Replies

ActionScript 3.0 :: Controlling Output On Stage - Change Color Of Text Externally

Feb 12, 2012

ActionScript Code:
myTextField_txt.defaultTextFormat = new TextFormat("monotype", 16, 0x0CFF00, true);
This controls the output to the stage of my fetched text. It works great, but I would VERY much like to control this externally as well. The color for example. How would I call this in a flash variable to change the color externally? Is it possible with this code?

View 2 Replies

ActionScript 3.0 :: Flash Controlling Stage Area For Mouse Trail Effect?

Feb 14, 2012

I created a 300x250 Web banner for Google with a mouse trail effect. The banner will not upload because, according to the Google tech people, the banner contains animation that goes "out of bounds." Common sense tells me that if a mouse effect is applied to a Flash banner, then it should only be occurring when a user mouses over that banner. However, I was told that the mouse effect does indeed take place outside the 300x250 banner boundaries, which is preventing the banner from being fully uploaded live.

Does anyone know how to define the stage area so that the mouse effect only occurs in this 300x250 space? Perhaps the only way to get around this is to create a 300x250 hidden button and somehow make the mouse effect occur on rollover. If that is the case, then does anyone know how to do that?

View 2 Replies

Controlling One MC From Another?

Jun 23, 2009

i have two MC with two swf files loading into them on my main file. what i am trying to do is have buttons in one MC move something in the my 2nd mc. i know that the _root. will work for controlling my main file but I'm don't know how to go about controlling anything inside of other movie clips.

View 5 Replies

Controlling Multiple Swf In Mc?

Apr 30, 2009

I have 4 buttons in a mc (go to frames and then call up individual swfs (one, two etc)) and play within mc eg.

[Code]...

A person can start any swf by clicking a button and then change the swf by clicking another button.

Is there a way to check if a .swf is running and only work when none are running?

View 4 Replies

Professional :: Controlling One Swf With Another

Aug 23, 2010

I have a site I am working on which has a Flash intro.  The other pages of the site hold a menu that's created in Flash.  For some reason my client wants the ability to go back and view the intro again, which is easily accomplished with navigateToURL.  HOWEVER the intro is broken into two distinct parts and I need to target the second part, which would require something along the lines of gotoAndPlay(500); or something to that effect.
 
What I am having problems with is how do I target a specific frame in a completely different movie, the intro, using a button from the Flash menu within the site.  I'll try to explain it a bit easier.  The top button on staticMenu.swf, which is placed throughout the site (aboutus.aspx, portfolio.aspx, etc...) needs to target frame 500 of mainIntro.swf which is embedded in default.aspx.

View 1 Replies

ActionScript 1/2 :: Controlling Mc From Another Mc?

Feb 23, 2011

I'm mostly a point-and-click user of flash. I'm in CS5 and have built a simple flash website (with A/S1-2) having a primary swf (content.swf) and other transparent swf (home.swf, contact.swf, etc.) that load in for each menu button. When another menu button is clicked, my A/S instructs to unload all mc's from level 1 and load in the next swf in that same level.My challenge. I need to have a button in "home.swf" go to, say, "contact.swf". How can this be done?

View 3 Replies

ActionScript 3.0 :: Controlling One Swf With Another?

Sep 29, 2009

I have to control one swf file with anoter. The situation is as it follows: there are two swf files in my HTML page. One of them contains a movie clip, and the other - buttons, which must control the first one - for example play this movie clip, go to a frame in this movie clip and so on. Is this possible? Maybe there is a way to connect both swf files with AS and after that use the inner instance names.

View 2 Replies

ActionScript 2.0 :: Controlling One SWF With Another SWF

Nov 17, 2009

I have 2 swf's on one HTML page in 2 sperate cells of a table. Each one is a file-o-fax style tab menu. I want to be able to make the tabs in the unselected swf retract to their original position, when using the other swf.

Not sure what I mean? Check out [URL]

View 5 Replies

ActionScript 2.0 :: Controlling One Swf From Another?

Feb 1, 2004

Is there a tut kirupa or other on controlling one swf from another.so clsic example having a loaded playback bar then loading vid or mucis and the universal playback bar can control it.Could this be done either way of loading swfs (Into a movie on the main swf or loaded by levels?)

View 3 Replies

ActionScript 2.0 :: Controlling A MC From Another MC?

Aug 5, 2008

I've got two Movie Clips "MC1" & "MC2" on my main timeline with buttons that give them life so if i click on "MC1" then it plays the open and stops on the "up" frame the next frame in the movie is the "out" which plays the Movie Clip out. but when "MC1" is up and you click on "MC2" i want "MC1" to play the out frame. I'm guessing at this but is this anywhere close?his is the code attached to the button inside of "MC2"

Code:
on (release) {
if ( _root.MC1 = ("up"))

[code].....

View 6 Replies

ActionScript 2.0 :: Controlling A .flv From A.swf

Jun 12, 2009

I have a external .flv movie, that loads as a full screen background movie on the main stage. Using the Netstream class and the instance name of 'netStream' I just want to be able to pause/play this movie when the user click on a button. The button is inside a movieclip.

I thought something like this:

on (press) {
netStream.pause("http://www.website.com/background.flv");
}

View 1 Replies

AS2 :: Controlling Url And External SWF?

Jul 6, 2009

I'm attempting to create a website that uses externally loaded swf files into a shell animation like in Creating A Full Flash Site, only I'm trying to give each swf its own website url (ie. site.com/home, site.com/page2) while still using a single shell animation.

View 1 Replies

ActionScript 2.0 :: Controlling MC Inside One MC From Within Another MC?

Aug 6, 2010

I have three buttons I have built as MC's. In each on the MC's timeline I have another MC's with instance name voted01_mc, votecd02_mc, and voted03_mc, respectively. And each of the MC Buttons have instance names Q01_btn, Q02_btn and Q03_btn.

I would like to find a way to control the "visibility" of a movie clip inside one movie clip from inside another MC. I am sure there is a way to do this such as:

Q02_btn.voted02_mc._visible = false;
Q03_btn.voted03_mc._visible = false;

if the MC I wanted to make invisible was on main timeline I would do something like:

root.voted02_mc._visible = false;
root.voted03_mc._visible = false;

SO this would be inside Button MC 01 making the MC inside 02 and 03 invisible.

View 3 Replies

Dynamically Controlling Many Instances At Once?

Mar 19, 2011

i am trying to control 30 instances of a movie clip dynamically. the instances are as follows

ship1
ship2
ship3

[code]....

coming from php i would just set up an associative array like list array('speed'=>array(false,false,true,...),'weapon '=>array(true,false,....and so on I can not for the life of me figure out how to store this information and then use it as a variable name later.my end result should look something like this .. i just don't understand how to do this in as3 .. it seems unnecessarily convoluted.

Code:

foreach($upgrades['speed'] as $key => $val)
{
UpgradeScreen.'speed'.$key.visible = $val);
this would dynamically call

[code]....

i know the above is incorrect.I want to create this so that it is completely dynamic and the instance names can be feed in dynamically as the array or whatever is being looped.

View 9 Replies

ActionScript 3.0 :: Controlling A MC From Within A Function?

Oct 20, 2008

I dont really know if I can put this into words correcly so I'm including enough code(AS3) to show what I mean. I can see the results from my trace statement so I know my function is ok, but I'm seeing an error once I try to make my MC disappear. Need something inplace of "this.lowerThird_mc.visible = false;". Also, I should note that this code is in a MC that is on the stage where the other MC is.

function onCuePoint(infoObject:Object):void
{
if (infoObject.name == 'CuePoint5')
{

[Code]....

View 3 Replies

Controlling FLV From A Different Area Of The Page?

Aug 19, 2009

I was wondering if I could assign seperate buttons to play, rewind, stop or pause an FLV in my timeline from a seperate area of the page like a remote control as opposed to using a skin in which the buttons would have to sit under the flv. Do I have to use an events listener? Does anybody have an example of the action script I could use. I am using version 2.0 PS. The flv is a progressive download.

View 1 Replies

ActionScript 3.0 :: Controlling A Flv Component?

Jan 18, 2010

I have a small website and on one of the pages I have a progressive video inside an flv component. However, when I go to a new page the video plays in the background and if I hit the play button twice, the video 'double plays'. Is there a way to control and flv component with actionscript 3? I tried using the stop(); command within the function that selects the pages but I get an error message:

[Code]...

View 1 Replies

ActionScript 1/2 :: Xml % Controlling Timeline?

Jan 25, 2010

Well, I have a project where I would need a XML with a % range from 0-100 to controll a timeline. The concept is to fill a bottle. So the timeline would animate from empty to full. But must be controlled with a XML number and its all in AS2...

View 18 Replies

Actionscript 3 :: Controlling The Mc's Of A Loaded SWF?

Apr 26, 2010

I have a controller.swf which loads an external swf into a movieclip.

news_mc = loadEvent.currentTarget.content as MovieClip;

the swf is called "news.swf" and has a movieclip on the maintimeline, frame 1 called "sb".

I have tried everything to access this such as

mews_mc.sb.alpha = 0;

but nothing works?

View 1 Replies

Flash :: Controlling SWF From Javascript

Aug 22, 2010

I have a SWF embedded in an HTML web page and want to move to a specific frame when a trigger is clicked. But nothing happens when I click the trigger, as though the js just doesnt communicate at all with the swf.SWF is written in flash cs4 (a3)The link to the website is [URL]..I have read the text books over and over and researched high and wide on the internet and as far as I see I have done everything correctly but I cannot get this to work. The swf is very basic, just a green box moving accross a small stage. The desired gotoframe would make it cross at a lower height (just a dry run for a more complicated swf)

View 2 Replies

Actionscript 3 :: Controlling As2 Swf Playback

Oct 8, 2010

I am embedding a swf built in flash 8 into an as3 project. When I call stop() or gotoAndStop(0); on the MovieClip that represents an instance of the embedded swf it stops for a sec and then continues. Trying to call removeChild on the mc removes it from the display but the audio in the swf keeps playing. The swf, in this case must be embedded, I cannot use loader.[code]

View 3 Replies

Controlling A Swf Using External Javascript?

Aug 27, 2007

I am working on a project that needs to have the swf controlled by an external javascript file, I'm looking for something very simple like basically telling the swf what frame to go to in the main timeline. I know it's possible because I did it 4 years ago, the problem is that project and computer are long gone.

View 0 Replies

ActionScript 3.0 :: Controlling The MC Of An External SWF?

Feb 14, 2009

I've loaded my external SWF, now I want to animate a MC within that external swf, however, when i try, the animation freezes (or won't start at all), but the external SWF DOES load.Here is my loader code

Code:
var _externalMovie:MovieClip
var _url1:URLRequest = new URLRequest("intro.swf")

[code]........

View 4 Replies







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