ActionScript 3.0 :: Reference MovieClip Within Same Timeline?

Jul 12, 2010

How can I reference a MovieClip within that same MovieClip's timeline. (I want to reference itself). Inside the MoviClip on the first frame I have this:
this.alpha = 0;
I want the MovieClip to have an alpha of 0 but it is still set at 1.

View 9 Replies


Similar Posts:


Flash :: Reference A MovieClip Symbol Later On In The Timeline

Jul 22, 2011

I've been trying to reference a Library symbol that is introduced in Frame 2 by using it's instance name, using timeline scripting only. I am trying to make a colour picker MC symbol for multiple re-use. Firstly I drew a small button on the stage and converted to MC, called textColourPicker of type CPicker (the class used to represent this MC in the Library). Inside this MC I have a button symbol called pickerButton

[Code]....

View 1 Replies

ActionScript 3.0 :: Reference A MovieClip On Root Timeline From Document Class?

Sep 28, 2009

So I have a MovieClip symbol created in the Flash IDE with a baseClass of flash.display.MovieClip and Class name of "Square". I have placed it on the timeline of my fla at frame 30 and given it an instance name of "square". How can I control that MovieClip from my DocumentClass? I have an ENTER_FRAME listener listening for the arrival of frame 30. At that time I want to simply do something to the "square" MovieClip. But I keep getting a compile-time error of "1119: Access of possibly undefined property square through a reference with static type flash.displayisplayObject.".

[Code]....

View 1 Replies

ActionScript 3.0 :: Reference Textfield On Timeline?

Feb 22, 2009

In de Flash IDE I create this movieclip 'MC1' and assign class MC1.as to it.

On the timeline, I add a textfield 'TF1'.

Now, in MC1.as I can change the textfield easily: TF1.text = 'text here'.

This works perfectly and I should not complain... however;

Is there a way I can tell my class MC1.as that there is a TF1 that is a textfield? So I can use codehinting?

If I add

Code:
var TF1:TextField;

the reference to the textfield is lost and now NULL. So that does not work.

View 1 Replies

ActionScript 3.0 :: X And Y Value To Reference To Main Timeline

Nov 8, 2009

I am positioning a movie clip within a movieclip, so obviously when I say for example:
ActionScript Code:
photo_mc.picture.x = 0;
photo_mc.picture.y = 0;
It positions the picture movie clip with in the reference of the photo_mc clip, and not the main stage. How can I reference it to the main stage (0,0)? - because the photo_mc moves around randomly, so to compensate would be pointless!

View 1 Replies

ActionScript 2.0 :: [Flash8] Assign A Variable To The Current Frame Of The Main Timeline (not Movieclip Timeline)?

Mar 16, 2007

I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.

View 4 Replies

ActionScript 3.0 :: Reference Main Timeline - Get Any Assistance?

Nov 24, 2009

I have a simple problem that I've been working on for hours, trying to go through trial and error myself. But here's the problem. I have a function on the main timeline named startClips. Now, I want to call this from from within two movie clips, the other nested inside the other. In other words, I have a movie clip called holder, and inside of a holder, I have a movieclip called homebase. Now, here is all the code I've been trying to use to access the startClips function which is own the main timeline from the movieclip homebase:

MovieClip(root).startClips();
MovieClip(root.root).startClips();
MovieClip(parent.parent).startClips();
this.parent.parent.startClips();

I can't figure this one out. Can I get any assistance.

View 3 Replies

ActionScript 3.0 :: Reference To Main Timeline Property?

Aug 29, 2008

I'm having to convert an AS2 app to AS3. In the AS2 app I have nested MovieClip in which is a reference to the main timeline (sloppy practice, I know, and now I'm paying for it).

if(_root._currentframe == 3){ ...

which threw an error. I changed it to

if(stage._currentframe == 3){ ...

but it's still throwing an error. The same thing happens when I try to reference a variable defined on the main timeline...

var inPlay:Boolean; //on frame 1 of the main timeline
if(stage.inPlay){ ... // on a frame in a nested clip. This also throws an error.

View 1 Replies

Flash :: Reference Symbols On The Main Timeline?

Apr 8, 2010

this is one of those upsurdly basic questions for which google does not work. I have usually dispatched events from my classes and dealt with the user interface in the document class. But now i want to separate all the UI in a separate class, accessible by other classes. have added it as a child to the main/document class, but how do i reference the main class without going through parent.parent shananigans?dit. one more thing i remembered. Some of my UI elements are not programatically added.here is the code i have. i get possibly undefined property error.

package rpflash.ui {
import flash.display.Sprite;
import flash.display.MovieClip;

[code].....

View 2 Replies

ActionScript 2.0 :: Reference Main Timeline From External Swf

Dec 13, 2006

im trying to tell my main movie to goto a certain movieclip in the timeline from my loaded external swf heres the code Im working with,[code]I can tell the script is executing because the external movieclip unloads itself but the main movie does nothing.

View 1 Replies

ActionScript 3.0 :: Reference A Root Timeline From Loaded Swf

Dec 12, 2009

I'm loading a lightbox as an image gallery, but I'm working on changing it to full flash. My site is structured with external swfs. I ran into a barrier, because I'll need to load the images (and reference the stage size) in the root timeline, but I don't know how. MovieClip(root) only references the smaller loaded swf's main timeline.

View 1 Replies

Professional :: Moving To A Frame In Movieclip Timeline From The Main Timeline

Apr 26, 2011

I am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.

[Code]...

View 1 Replies

Flash :: Reference Var From Frame On Timeline In An Object Class?

Jan 17, 2011

I'm using Flash Professional cs5/AS3 I'll try and describe this the best I can. I'm new to ActionScript. So, in my timeline I have a var on a frame that represents "lives" and i have some code in the timeline that takes down the number of lives depending on certain events, which all works great.

so, now i wanted to make a constructor class that I could reuse for a bunch of movie clip objects and I only want these objects to be able to move if the lives variable is greater than certain number. So now, building my constructor class for these objects i just wanted put an if statement that is looking to see if the lives are greater than a certain number, which if it is then should make these objects do what i want...But, when i run the project I get "1120: Access of undefined property lives."

lives is the var I made obviously like I said, and it works fine being referenced everyone else except when I make a new .as file for these objects then try and reference it. I get the same error when I try and establish "lives" in the main project class too. I'm not sure where I should put this var or how I can make it so i can reference it from an object class. I'm not really sure how to word or describe my issue which has made it hard to search for a tutorial.

View 3 Replies

IDE :: Child Movieclip Timeline Changes Don't Show In Parent Timeline?

May 21, 2009

Why does a child movieclip only show the first frame within the IDE, regardless of where you are in the parent timeline?If you throw a movieclip with 25 frames onto the main timeline, which also has 25 frame, you don't see the nested movieclip's frame-progress while you scroll through the main timeline.Is there a setting somewhere in preferences or somewhere that will enable you to see a nested movieclip's frame position from the main timeline?  Like you do with After Effects composites?

View 3 Replies

Actionscript :: Symbol To Reference Button Instance On Main Timeline?

Sep 30, 2009

How would I reference a button instance on the main timeline in the actionscript within a movie clip symbol?For example: btn1.addEventListener (MouseEvent.ROLL_OVER, main1Over);where btn1 is an instance of a button on the main timeline but is not found within the symbol itself.I will then be dragging that movie clip onto the main timeline when it's finished.

View 3 Replies

Access An Instance Reference To Document Class From Stage's Timeline?

Dec 30, 2009

Is there a way to get an instance reference to the document class to call a method of it from the stage's timeline?I see that here's a possible solution: using a singletonOther solution I though of is using stage.getChildAt( 0 ) but it's not very nice.Is there an 'official' instance reference? because the document class is obviously instantiated at startup, but is that instance accessible in any way without having to use a custom solution like the ones mentioned?

View 1 Replies

ActionScript 3.0 :: Reference Main Timeline - Accessing StartClips Function?

Nov 24, 2009

I have a function on the main timeline named startClips. Now, I want to call this from within two movie clips, the other nested inside the other. In other words, I have a movie clip called holder, and inside of a holder, I have a movieclip called homebase. Now, here is all the code I've been trying to use to access the startClips function which is own the main timeline from the movieclip homebase:

MovieClip(root).startClips();
MovieClip(root.root).startClips();
MovieClip(parent.parent).startClips();
this.parent.parent.startClips();

View 8 Replies

ActionScript 3.0 :: Reference MovieClips On The Main Timeline From Inside A Class?

Mar 31, 2010

I've been programming with AS2 for a few years and I just made the switch to AS3. I'm hoping there is an easy solution to this problem. I have a class 'Actor' (extends MovieClip) that needs to hitTestPoint on a nested MovieClip 'root.World.walls' in a function moveRight(). The line of code looks like this: ...while (MovieClip(root).World.walls.hitTestPoint(pnt.x, pnt.y, true)) {... But I keep getting various errors when I try different solutions.

View 1 Replies

ActionScript 3.0 :: Make A Reference To A Movieclip Instance That Is In Another Movieclip?

Jul 17, 2011

I am trying to make a reference to a movieclip instance that is in another movieclip.

Here's the deal: I have a main timeline for different pages of a website...then within that I make all of the art on each page into a movieclip so I can do animations every time that main timeline frame is called to, yet still keep my main timeline clean.

Within one page's movieclip I have a few buttons that I want to use to go to other pages by referencing them on the main timeline.I have been using this: (home_about is the about us button on my home page, and frame 31 is on the main timeline).

home_about.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_6);
function fl_ClickToGoToAndPlayFromFrame_6(event:MouseEvent) :void
{[code].............

Since this home_about is within another movieclip,I get the access of undefined property error. Do I need to change the code I've pasted above or add in variable definitions to fix this?

View 1 Replies

CS3 Play (reference) MovieClip Instance From Within MovieClip

May 20, 2009

I am trying to create an interactive graphic. Basically, it's three squares layered on top of each other, with a large square in back, a medium square centered in the middle of the large square, and a small square in front centered in the middle of the medium square.

When you roll over the medium square, say, it expands to almost the size of the large square and some text fades in, and the small square on top of it fades away. When you roll off of the medium square, it goes back to it's smaller size, and the small square fades back in.

Currently, I have the actionscript in the movieclip to make the medium square get larger and smaller (and the text fade in), but I need to somehow reference the instance of the small square movieclip to hide it when I roll over the medium movieclip.

My actionscript for the medium square activity, currently:

Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){

[Code]....


how to have this rolling over action get rid of the small square and then bring it back on roll out.

View 2 Replies

Actionscript :: Reference A Dynamic Movieclip From An Outside Movieclip

Feb 21, 2010

I have built a movieclip (parentMC) that houses two movieclips within it (mcA, mcB).

in mcA, i'm dynamically attaching movieclips from the library through a loop.

in mcB i'm trying to reference a particular movieclip from mcA via "_parent.mcA". Doesn't seem to be working. However, when i reference said movieclips from the loop within mcA - or even parentMC, it works fine.

View 2 Replies

ActionScript 2.0 :: Reference A Dynamic Movieclip From An Outside Movieclip

Feb 21, 2010

i have created a movieclip (parentMC) that houses two movieclips within it (childA and childB)

in childA, i am dynamically creating movieclips via a loop:

Code:
var newX = 0;
var pagTotal = 8;
for(i=1; i<pagTotal+1; i++){

[Code].....

...and in childB i'm trying to reference one of these created movieclips via "_parent.childA.pagClip01" so on and so forth.

but they dont seem to be working. when i trace the dynamic clip from within childB i keep getting "undefined" in the output. however, I can reference the movieclip from within childA, and even from parentMC no problem.

i've used _root and _level0 absolute paths and still the same failed result.

View 1 Replies

ActionScript 3.0 :: Button On Timeline - Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Sep 22, 2009

I have these actions on Frame 1 which works fine...

[Code]...

The button on that frame (frame 50) is a new instance of the mainMenu button which was used on frame 1, but with new code (see below), which tells it to gotoAndStop on frame 2, but doesn't work. Any thoughts on this?

[Code]...

View 3 Replies

ActionScript 3.0 :: Error: Access Of Possibly Undefined Property COMPLETE Through A Reference With Static Type ClassThis Is Timeline

Aug 24, 2011

I'm trying to fade in a button when my flv finishes, but I get this error: Access of possibly undefined property COMPLETE through a reference with static type ClassThis is timeline code. I don't know if that matters. I'm sure this is more simple than I'm making it, but I've looked at it too long.

ActionScript Code:
btnContinue.setStyle("textFormat", btnformat);
btnContinue.useHandCursor = true;
btnContinue.addEventListener(MouseEvent.CLICK, btnContinueHandler);

[Code]...

View 3 Replies

Flash - Tell The Root Timeline To Root.gotoAndStop(2); From The Timeline Of A MovieClip Added Using AddChild?

Nov 7, 2011

How do you tell the root timeline to root.gotoAndStop(2); from the timeline of a movieClip added using addChild?In the maintime line I have

addChild(fade_eng);

and in fade_eng I have the following on frame 20

root.gotoAndStop(2);
this.gotoAndStop(1);

But I am getting 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:Stage.

View 1 Replies

ActionScript 2.0 :: Button Inside Movieclip To Control Another Movieclip's Timeline?

Oct 23, 2009

I have a button inside a movieclip, to which I would like to apply a rollover function. When rolled over, this button (inside MOVIECLIP 1) would make (MOVIECLIP 2) jump to second frame. I'm using Flash 8.This is turning onto a real headache for me, since i've searched every single forum and thread concerning this matter, and nothing seems to work.

View 7 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

ActionScript 2.0 :: Using A Movieclip Rollover To Change Another Movieclip Timeline?

Jan 7, 2010

Using a movieclip rollover to change another movieclip timeline?

View 1 Replies

Actionscript 3 :: Access A Movieclip On The Main Timeline From Within A Movieclip?

Mar 6, 2012

Working on an RPG type flash, and I have to be able to control a text-box from quite a few locations. The one that is causing me trouble is the inventory. I need to be able to access the textbox with an instance of "statusWindow" from within the inventory clip (instance name "inventory"), so when I mouse over an item within the movieclip it will change the status window on the stage.In this instance I want to mouse over inventory.invHealth from the main timeline to get the display.itemName and itemProps are strings containing information about the item.I tried the following but it gave me a "possibly undefined" error.

invHealth.addEventListener(MouseEvent.MOUSE_OVER, itemStats);
function itemStats(e:Event):void
{
root.statusWindow.text = itemName+"
"+itemProps;
}

View 1 Replies

ActionScript 2.0 :: Reference Movieclip Within It?

Jul 26, 2004

If I have movieclip named box01_mc inside movieclip btn01_mc and I wanted to change box01_mc's alpha to 0 on the rollover of btn01_mc how would I write this? I tried writing the following code on btn01_mc but it didn't work[code]...

View 6 Replies







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