ActionScript 2.0 :: Reference The Clips That Were On Those Levels?
Jan 12, 2004
What I want to know is - if you build a swf that has lots of levels (say from using createEmptyMovieClip), and then you load that swf into a movie clip(containerMC) on another swf - does the first swf still contain all those levels? Or is it flattened?
And if it is flattened - how do you reference the clips that were on those levels? Can you just use _root.containerMC.instancename? where instancename is the name given to the clips that were created inside the createEmptyMovieClip.
This simple script loads 50 of "a.swf" into my movie however you can only see one on stage.I can use a create emptyMovieClip with coordinates to accurately place all the clips on stage,however I am trying to use just levels, instead.I have tried....
I am trying to create a hitTest between two duplicated objects. The code below is on a bullet. Bullets hit "bad" MCs that are called bad + x (X being a number from 22 - 40). I can't get it to work. I belive that I am not referencing the duplicated MCs correctly
Code: for (x=22; x<42; x++) { if (this.hitTest("_root.bad" + x)) {
how to cross reference two buttons, or clips like they do here:
[URL]
I'd imagine there are a lot of arrays involved. I'm just not sure how to get started...I would need everything to be dynamic...for I am doing a project very similar...I guess a better question would be how to do multiple relationships like this...
I have an empty movie where I load some content (images), but i need the reference to be on bottom right of the content, while flash load the content with reference point at top left. I think that it is possible to change reference point with as2. Working with as2 and flash player ver. 9 on flash cs3.
I am wondering how to correctly reference child/parent movie clips when creating event handlers? I have a button within a movie clip, which is within a movie clip.This is what my handler looks like right now:
The button instance name is ButtonSeats Problem is, I get this:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Also, if I were to move the vent listener directly into the movie clip where the button is located, how could I reference the parent/ parent timeline(the main timeline)? Am I correct to understand that .this refers only to the current clip?
I have a label I am referencing form a movie clip inside the movie clip which contains the "label_2." Here is the code I used: MovieClip(parent.parent).gotoAndPlay("return_2"); Now I need to reference a instance name of a movie clip in side the same scene.
It's me again and I'm running into a problem. So, I have this movie clip that is nested inside multiple movie clips. I want to tell Flash to perform an action when that movie clip hits another movie clip in the main timeline. It's just collision detection for a game using the hitTestObject code. I was thinking of using MovieClip(root), but that won't work since it's nested so much.
For loop generates clips containing clips. I need to access a specific clip (look_back) within the parent clip generated by the loop. Not sure how to do this.[code]
I'm having this frustrating error showing up and I have no idea why. Let me show you my classes and see if you can spot anything wrong. First, here's my ILode interface:
So the problem I'm having is the compiler is throwing that 1000: Ambiguous reference error for any reference to instance.priority or instance.label. Why??? Instance is typed to IFlexLodeInstance, and IFlexLodeInstance lists method signatures of priority and label getters, and it inherits ILode, which lists method signatures for priority and label setters. What can I do to get the compiler to stop complaining?
My code is an external .as file. Google provides this code on their demo, which contains the this keyword:
[Code]...
Notice that I have 4 calls to console.log. The first 3 fire, but after the new GATracker statement, the 4th does not fire. I have a feeling that I'm overriding the entire package with the object created from new GATracker when I should be passing a different context. I believe the correct context I should pass is whatever this defaults to when not inside of a package/external file, I assume it references the main stage object.
I am setting up a flash game with seven toggle on/off buttons that all do the same thing.I know how to assign them all to be able to do the same function in the main timeline. What I can't figure out is how to get them all to also do the same function within each of their respective movie clips.
I've been trying to reproduce an animation effect I've seen on the Armani website, but I'm stuck trying to duplicate an empty movie clip with image loaded into it. The duplicates exist and I can move them, but they are invisible. Since the duplicates reside on depths above the intitial clip I'm confused about why they are invisible. The duplicates are scripted to follow behind the initial clip - each offset by 30 pixels (though I don't have that working perfectly).
I have created a loop to add my clips by class and give them a name
[Code]...
Then I want to loop through these clips and change the alpha, I have tried casting as I thought that was how you do it but I get the 'cannot convert string' error
I'm planning navigation for my new site (see screen grab of proposed navigation corner). I want the words to swap levels and appear in front of others on roll over.
OK, just found this tutorial [URL] but I put the buttons into the MCs.
*BUT* - I want them to return to their original positions on RollOut - is this possible. I tried duplicating the code but substituting rollover to rollout and set the parameter to 0 or 1 or 2 to make them go back to a level I want them at.
I am having trouble with unload an loading movies. Basically I am loading a movie into a container, which works a charm:
[Code]....
I want to unload them both when a close button is pressed on the third loaded swf? Also, ideally I would like to add that second movie clip into a container, so I can position it correctly, but when I try copying the code I use on the first, it doesn't seem to work...is it to do with the "root" bit perhaps?
On frame 30 of my root timeline, I have dragged five different instances from my library onto the stage. I gave each one a distinct name, oneBtn, twoBtn, threeBtn, fourBtn, fiveBtn. I added a MouseEvent for each of these five objects, and ran a Trace to make sure I am able to identify the objects. At first, I used e.target.name but it returned instanceXX (instance23, instance84, instance83...). I think this happened because within each of those buttons, I had a movie clip within it so I can apply filters to them. I decided to trace e.target.parent.name. On two of the five objects, I was able to trace oneBtn, and twoBtn. On the other three, I still got instanceXX. I tried tracing e.target.parent.parent.name and I was able to trace the other three buttons, threeBtn, fourBtn, fiveBtn.
how come I need to target two different levels (e.target.parent.name & e.target.parent.parent.name) on my objects when I dragged them from the library and placed them onto the stage within the same timeline?
im using flash cs5, as2.i have a main index fla that loads into it 5 swf's.i need these 5 to be loaded into a lower level than the main index fla (index has to be the highest level)[code]
I cant believe how the simpliest things are more complex to do in AS3.I tried to target a movieclip from inside another movieclip called bat_mc and these dont work!root.ball_mc.gotoAndPlay(2);orlevel0.ball_mc.gotoAndPlay(2);
I have a flash project with three non overlapping panels (visual spaces) each of which contains different movie-clips. Each movie-clip in a particular panel is the child of that panel.Now, I want to drag one of the movie-clips from one panel to another (remove it as a child from the first panel and add it to the other) without a jitter and proper drag.What is the appropriate way to handle the drag architecturally
Now I know that you smart people know what the AS3 alteration is...Do you guys mind saying what it is...I know in AS2 it used to be levels but now it is...?
but is there anyway to fade the levels of a movieclip.
basically i keep loading jpgs, into a level of a movieclip. now i want to create a fade between one to the other. figure easiest way would be to have the jpgs load onto next level with alpha 0.. then once loaded alpha to 100 and unload the bottom jpg from previous level.
The problem I'm having is loading my info boxes. Basically, I want the the info boxes to stay on the middle of the main stage and also make the scroll mc non selectable (so that other mc's cannot be selected). I've been trying for ages to get this working but can't seem to make the buttons play the relative info box movie clips.Currently, the info box mc's are in the same movie clip as the mask & scroll mc. However, the buttons I want to activate the info box mc's are in the scroll mc. If I put the info boxes in the same mc as the buttons then it works fine but doesn't keep the info box moie clip in the middle of the stage as you can still scoll/select other itms in the mc.
I want to load in a new _level *.swf. This new level contains a button which will have a stop command, which I want to work with an MC in the _root *.swf level.