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
Similar Posts:
May 23, 2009
I've looked over thier website quite a bit and there is no clear method to get what I want to do working.I'd like to take this JW video player I've configured:
[URL]
and put it as the player for this
[URL]
I've tried a bunch of different methods but I just can't get it working on a blank .fla, let alone mine.
View 1 Replies
Sep 29, 2011
I have a SWF that is 300x250 and needed to be resized to 336x280. There were a lot of elements to work with and the resulting SWF needed to be less than 40 kb (my starting SWF was 35 kb). To make things as easy as possible I created a stage and background of 336x280 then imported the SWF into the library and centered it. The result fits the correct dimensions without having to resize every element in the original SWF and I was able to come in under 40 kb.The problem is that I need to control the number of times the movie loops. I tried to do this using the following code on the centered movieclip (instance name smallOne):
Code:
onClipEvent(load) {
if (!loopCount) {
[code].....
View 3 Replies
May 23, 2009
I've looked over thier website quite a bit and there is no clear method to get what I want to do working. I'd like to take this JW video player I've configured:[URL]I've tried a bunch of different methods but I just can't get it working on a blank .fla, let alone mine.
View 8 Replies
Jul 6, 2010
I'm using a scrollpane for a loaded external swf file. Scroll works fine but I want to add exra buttons to control the file such as size and position. If this is regular movie you can simply add the instance name and call it but in this cane since it's inside of component I don't know how I can reach it... The component is named "mySp" and the loaded swfg file is called "photography.swf" which I set it up in parameters tab under "contentpath"
View 1 Replies
Oct 19, 2008
I have loaded a SWF and attached to a MovieClip which exist in my current movie using the following code, and now I just want to access the loaded SWF to send it orders like play() or gotoAndPlay(); I have tried also: container= MocieClip(loader.content); instead adding child, but it trhows an error
View 10 Replies
Aug 12, 2009
Im trying to produce my online portfolio but for that i need to play movieclips backward and forward to various frame numbers.I found a very good script (as2) and it works great in the main timeline but inside a mc it doesnt work at all. this is the script
1. Call to Action Create an actionscript layer that extends the full length of your movie. In that layer, include the following actionscript:
function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();
[code]....
Using the code above, the movie will play either backwards or forwards to the desired destination.As i said before this script is great but it doesnt work inside an mc.
View 3 Replies
Dec 6, 2009
Im trying to produce my online portfolio but for that i need to play movieclips backward and forward to various frame numbers.I found a very good script (as2) and it works great in the main timeline but inside a mc it doesnt work at all.this is the script
1. Call to Action Create an actionscript layer that extends the full length of your movie. In that layer, include the following actionscript:
function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();
[code]....
Using the code above, the movie will play either backwards or forwards to the desired destination.As i said before this script is great but it doesnt work inside an mc.
View 1 Replies
Feb 25, 2011
This is my first time coding a website using ActionScript. So far everything has went very well, I designed the website in Photoshop, and imported to Flash CS5. Then I cleaned everything up, and started adding navigation to the various pages using buttons.The website is constructed in a very simple manner, there are five main pages and they are connected by buttons on a static navigation bar (the first page, home, doesn't have a corresponding button). Then there are nine sub pages, that each contain information on a character of the game, and are connected to corresponding buttons in the 'Character' layer/MovieClip. My four menu buttons (Story, The World, Characters, Extras) all navigate correctly without problems.
The problem arises because inside my Characters page (a movie clip) are nine buttons, each linking to a different page. These buttons should bring the timeline to the frame specified, but when the buttons are clicked nothing happens. I've spent hours searching for a solution to this, but with no avail, and I have a feeling the answer is prettysimple.gotoAndStop("gowang", "Scene 1");line in the Gowang character button function with:MovieClip(root).gotoAndStop("gowang");
View 3 Replies
May 8, 2008
I have a Nav Bar on my _root timeline. Inside of which I have buttons and MC's. I want to have all the code for my buttons on the _root timeline. So, I can adjust from there.
Below is an example of what I'm trying to do from the _root timeline Actions Layer:
Code:
// ------ NAV BAR ON MAIN STAGE -----------------------------------
// ------ Instance Name = NavBar ------------------------------------
// ------ Button inside of "NavBar" = MyButton ----------------------
[Code].....
View 8 Replies
Jul 26, 2007
I am currently working on a Flash application in which I have several vertical bars that go across the window, and when one of the bars is clicked on, the others move to either the left or the right to create space to the right of the selected bar for a large image.[URL].. I have already written enough of the script to get the bars to move to where they should be when they are clicked on, but they do it instantly--there is no show of movement between point 1 and point 2 (this being the starting and ending x coordinates for each movieclip).
If you're wondering about any of my number values, they are the way they are because the document is 800 wide, it has 5 vertical bars within it, each of them 30 wide, and the bars are 5 pixels apart when placed next to each other. Anyways, here's the script I am currently working with:
[Code]...
With this code, all the speed variable does is determine the length of the pause before the bar goes from its original x coordinate to its final x coordinate. I have tried to replace the line that reads "clip3_mc._x += speed;" with several variations ("clip3_mc._x ++;" , "clip_mc._x = clip_mc._x + 15"), but I don't think that's the issue.
View 1 Replies
Jan 8, 2011
Am gonna create an encyclopedia program, consist many of Chapter. I have difficulties about controlling external swf inside my Main swf. This is my Main.as in Actionscript 3
public class utama extends MovieClip {
var loader:Loader;
var urlReq:URLRequest;[code]........
Am using eksternal page as a Chapter, and A Chapter consist of many Pages (it using Scene)
For an example :
Chapter 1 --> Page 1 it will be represented as hal1.swf-->Scene 1
Chapter 1 --> Page 2 it will be represented as hal1.swf-->Scene 2
Now, How to control it, I still didn't get it ??
View 1 Replies
Jul 24, 2009
how to add like a youtube type control bar into a swf to control a movieclip inside the swf so i can add any movie clip in and change a few varibles and still have the whole thing self contained inside the swf. I have been looking for about 2 hours now and i cant find any info on what im looking to do has
View 2 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
Oct 27, 2011
i have dynamic buttons in movieclip and i want the movieclip goto 2nd frame once some one click single movieclip while rest remains in 1st frame.the movieclips can be in arrayi have some code here:
Actionscript Code:
var mc:MovieClip = new MovieClip();for(var i:int = 0 ; i < numberOfButtons;i++){ var btn:MovieClip = new button();
[code]....
View 5 Replies
Mar 9, 2009
I'm just trying to find the right action scrip for instance on my button to control the movie clip it is within.I have currently tried..
on (press) {
mc_lexisnexis_main.gotoAndPlay(2);
}
[code].....
View 4 Replies
Jan 30, 2007
I made a movieclip to put the blocks(which are movieclips too) in a breakout clone.lets give the container movieclip the instance name "container"the blocks are preset in that container with their own instance names...what I want to do is a hittest with those blocks but I found out that.[code]
View 3 Replies
Mar 19, 2007
much like the title says. how do i put code in the main timelinesuch as gotoAndPlay(x)x refering to a a frame inside a MC inside a MC.
View 5 Replies
Dec 8, 2009
I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property called "desc" or "description" to each movieclip and have it trace that property's value when clicked. Here is the relevant portion of my code as it stands:
ActionScript Code:
var iXML:XML = new XML();
iXML.ignoreWhite = true;
[Code].....
View 6 Replies
Sep 20, 2011
I have a transparent windows (skinnable). Inside, I'd like to preview some pdf file. BUT, in the only a black screen appear
View 3 Replies
Feb 2, 2005
I am trying to create a gallery where each thumb is housed inside of it's own movie clip that will have more data, but it keeps failing because it won't let me refer to the newly created instance of the movie clip. Below is what I am trying to do.
var xml:XML;
var xmlReq:URLRequest = new URLRequest("xml.xml");
var xmlLoader:URLLoader = new URLLoader();
[code]....
View 2 Replies
Jun 6, 2010
I am trying to create a gallery where each thumb is housed inside of it's own movie clip that will have more data, but it keeps failing because it won't let me refer to the newly created instance of the movie clip. Below is what I am trying to do.
var xml:XML;
var xmlReq:URLRequest = new URLRequest("xml.xml");
var xmlLoader:URLLoader = new URLLoader();
[Code]....
It dies every time on that last line. How do I refer to that vidThumbn instance so I can add the imageLoader? I don't know what I'm missing. It feels like it should work.
View 2 Replies
Mar 1, 2011
I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
[Code]...
View 9 Replies
Mar 1, 2011
I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
Here is the loading code..
var context:LoaderContext = new LoaderContext();
if(Security.sandboxType == Security.REMOTE){ context.securityDomain = SecurityDomain.currentDomain };
var objLoader:Loader = new Loader();var mRequest:URLRequest = new URLRequest("SomeURL.swf");objLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, onSWFLoadComplete);objLoader.load(mRequest, context);
[Code]...
View 1 Replies
Jan 25, 2012
I have a Button that is inside MovieClip1 which is inside MovieClip2; yet when i click the Button it doesn't dispatch Event.
View 5 Replies
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
Apr 25, 2011
is there any way I can link a button inside a MC on frame1 to a frame inside another MC that is located on another frame.Ive got 2 frames in total. On the first frame Ive got an Mc and inside this one Ive got a button that needs to be linked to frame number 50 which is inside a MC located on frame number 2.
View 1 Replies
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
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
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