Get _x Of Nested Mc
Inside mc1 lie smaller mc2 and mc3 in the upper left and right corner respectively. How do I track the _x of mc2 and mc3 relative to the main stage? Basically, I want to know when mc2._x>mc3._x.
Thanks.
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-21-2004, 10:02 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flex Nested Arraycollections And Nested Repeaters
I can't figure out how to get a dataProvider from a nested ArrayCollection. I'll try to provide as much code as possible without dumping my whole project in. If I miss something critical, let me know.
Here is the concept. Clients have Projects. Projects have Images. I want to show this relationship in a form. Displaying the list of Images for each Project is where I'm stumbling.
This is what it looks like in xml.
Code:
<data>
<client name="clientName">
<project name="project1">
<image name="image_1.jpg" />
<image name="image_2.jpg" />
<image name="image_3.jpg" />
<image name="image_4.jpg" />
</project>
<project name="project2">
<image name="image_1.jpg" />
<image name="image_2.jpg" />
</project>
</client></data>
Now, when I load the .xml in, I have custom classes for Clients, ClientList, Project, ProjectList, ImageList and I push all the xml data into that structure. Basically each of the list classes contains a 'list:ArrayCollection' value that contains the various items in that list as well as the functions to add and remove items in the list. The lists are what I use as dataProviders in the form.
Each Client object has a ProjectList that contains all the Projects for that Client. In turn, each Project has an ImageList that contains all the images for that project.
The populateForm below is triggered when a combobox changes. It receives the event with a client attached.
Code:
private function populateForm(event:Event):void{
//selectedClient becomes the
var selectedClient:Object = event.target.selectedItem;
/*this is easy enough. I already gave each client a name value and this displays it to the textfield in my form.*/
clientName.text == selectedClient.name;
/* this is also working. I'm using the 'list:ArrayCollection' of that client's projects as the dataprovider for the first repeater in my form */
projectRepeater.dataProvider = selectedClient.projects.list;
//imageRepeater.dataProvider = ?????
//skipping ahead to my mxml
<mx:Form>
<mx:FormItem>
<mx:VBox>
<mx:Repeater id="projectRepeater">
<mx:Panel width="500" title="{projectRepeater.currentItem.name}">
<mx:VBox width="100%">
<mx:Repeater id="imageRepeater">
<mx:List labelField="name" dataProvider="{????}"/>
</mx:Repeater>
</mx:VBox>
</mx:Panel>
</mx:Repeater>
</mx:VBox>
</mx:FormItem>
</mx:Form>
How do I set an appropriate dataProvider for the imageRepeater? The projectRepeater makes sense because I can layout all projects for each client. But the images are nested. How can I target them?
Referencing A Nested, Nested Movie Clip
Here's the setup.
let's say you have a movie clip called "parent" on the root timeline.
On frame 1 of the parent clip, you have another clip called "childA"
On frame 2 of the parent clip, you have a clip called "childB"
so, only childA is on frame 1, and only childB is on frame 2
also, let's say that both childA and childB each have a local function named "Add"
using dot syntax, you can call those functions from the root timeline:
_root.parent.childA.add(); or _root.parent.childB.add();
however, Flash only seems to be aware of those children that exist on the currently selected frame of the parent. In other words, if the current frame in the parent mc is 1, you can use parent.childA.add(); but not parent.childB.add();
Is there any way to be able to reference a child movie clip in a parent movie clip when the child is not on the currently selected timeline?
I can't put all the child clips on every frame, because I need to be able to print the entire parent movie clip (multiple frames, so each child can only exist in their own frames).
Thanks in advance for your help or insight!
Cheers!
Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.
var container:Shape = new Shape();
When I change the below from a Sprite to a Shape I get this error:
"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."
var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y
this.addChild(container);
container.x = 140;
container.y = 140;
var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y
container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;
var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y
box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;
Thanks,
Eric
How To Play Second Nested Mc After First Nested Mc Finishes?
Hi all,
I am very new to action script - I am sure there is a stupidly simple way to do this:
I have an mc named logoclip. Within logoclip, I have one mc (instance: logointro) nested in frame 1(label: logoin) and one mc (instance: logogrowth) nested in frame 2 (label:logogrow). After the first mc finishes I want the second mc on frame 2 to play. The first mc is tweened with actionscript with the final tween finishing after 132 frames.
I'm not sure what the best way is to do this. Any suggestions?
Cheers
Nested Shapes Vs. Nested Sprites In AS 3.0
Nested Shapes vs. Nested Sprites in AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.
var container:Shape = new Shape();
When I change the below from a Sprite to a Shape I get this error:
"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."
var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y
this.addChild(container);
container.x = 140;
container.y = 140;
var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y
container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;
var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y
box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;
Thanks,
Eric
Edited: 05/20/2008 at 07:46:30 AM by clem_c_rok
Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.
var container:Shape = new Shape();
When I change the below from a Sprite to a Shape I get this error:
"Call to a possibly undefined method addChild through a reference with static type flash.display:Shape."
var container:Sprite = new Sprite();
container.graphics.lineStyle(0,0xFF6600);
container.graphics.beginFill(0xFF3300);
container.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
container.graphics.lineTo(100, 0); // move to left 65 x and 0 y
container.graphics.lineTo(100, 100); // from 65 x to 20 y
container.graphics.lineTo(0,100); // 0 x to 20 y
this.addChild(container);
container.x = 140;
container.y = 140;
var box_1:Sprite = new Sprite();
box_1.graphics.lineStyle(0,0xFFFFCC);
box_1.graphics.beginFill(0xFFFF00);
box_1.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_1.graphics.lineTo(80, 0); // move to left 65 x and 0 y
box_1.graphics.lineTo(80, 80); // from 65 x to 20 y
box_1.graphics.lineTo(0,80); // 0 x to 20 y
container.addChild(box_1);
box_1.x = 10;
box_1.y = 10;
var box_2:Sprite = new Sprite();
box_2.graphics.lineStyle(0,0x92E9FE);
box_2.graphics.beginFill(0x92E9FE);
box_2.graphics.moveTo(0, 0); // start line @ 10._x and 0 Y
box_2.graphics.lineTo(60, 0); // move to left 65 x and 0 y
box_2.graphics.lineTo(60, 60); // from 65 x to 20 y
box_2.graphics.lineTo(0,60); // 0 x to 20 y
box_1.addChild(box_2);
box_2.x = 10;
box_2.y = 10;
Thanks,
Eric
Nested Shapes Vs. Nested Sprites In AS 3.0
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.
var container:Shape = new Shape();
When I change the below from a Sprite to a Shape I get this error:
1061: Call to a possibly undefined method addChild through a reference with static type flash.display:Shape.
Communicating From A Nested Clip To Another Nested Clip
I keep getting "TypeError: Error #1009: Cannot access a property or method of a null object reference." and I don't understand why.
What I am trying to do is to communicate from inside a movieclip nested in the main timeline to another movieclip nested on the main timeline. And I assume that this is why I am getting the error although I do not understand why or how to fix it.
more details and my code:
I have a menu nested in a movieclip on the main timeline that when activated creates a fog over the images in the background. A series of buttons appear that when clicked removed the fog and play individual movieclips nested in the main timeline.
I am trying to create a rollover that will preview the movieclips before you click on them and confirm your choice.
cutlery_btn.addEventListener(MouseEvent.MOUSE_OVER , onRollOverCutlery);
cutlery_btn.addEventListener(MouseEvent.CLICK, onClickCutlery);
function onRollOverCutlery(event:MouseEvent):void
{
MovieClip(root).cutlery_mc.gotoAndStop(10);
}
function onClickCutlery(event:MouseEvent):void
{
MovieClip(root).gotoAndPlay("cutlery");
MovieClip(root).menuTab_mc.visible = false;
MovieClip(root).fog_mc.play();
}
Thanks for your help!
How Do I Get The Value Of A Nested Var?
How do you get the value of a variable nested in a clip?
I had ../:variableName that read one level back and that worked. But I wrapped it in another clip and don't know what to try.
I tried this:
../:allcontent/variablename
this:
../allcontent/:variablename
where
../:variablename
used to work just fine. How do I get the value now that it's one level deeper?
Doug
Nested Mc
hi
here's my problem:
i have an mc on the stage. inside this mc, another mc.
the user is able to rotate and to scale the mc which is on the stage. how can i do, so the nested mc isn't scaled or rotated when the user rotates the big one?
thanx in advance.
Nested MC's
Hi All,
if i want a MC to be inside another MC, i just drag it from my library into relevant frame in another MC.....right???
do i need any code...cause it aint working
cheers!!!
Nested Mc In Another Swf
i have a swf with multiple mc, but when i place that swf in another the mc that it contain, doesn´t play.
Help me
Nested MC
I can't create a nested movie clip and attach a bitmap as nothing is displayed .
This fails with nested
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
var bmp1:BitmapData = BitmapData.loadBitmap("cave1");
this.createEmptyMovieClip("mc1", this.getNextHighestDepth());
mc1.createEmptyMovieClip("mc11", mc1.getNextHighestDepth());
mc11.attachBitmap(bmp1, mc11.getNextHighestDepth());
mc11._x=100;
mc11._y=0;
Is Nested Li Possible
Is it possible to give nested ul, li in flash
e.g.
a.htmlText = "<ul><li>AAAA</li><li><li>BBBB</li></li></ul>";
mine is not working, anybody with clue.
Thanks in advance.
Help With SWF Nested In A SWF
I want to navigate between scenes on the main timeline from nested swf that holds a thumbnail carousel. Here's what I've done so far. For simplicity, the symbol and instance names are the same. I'm using Flash 8 Professional.
I created carousel.swf to hold spinner_mc which is the thumbnail carousel made from three buttons: thumb1_btn, thumb2_btn and thumb3_btn.
At runtime, carousel.swf is loaded into container_mc on the main timeline of index_swf.
I want thumb1_btn, thumb2_btn and thumb3_btn to point out of carousel.swf and to "Gallery 1", "Gallery 2", and "Gallery 3" on the main timeline of index.swf. I put this code on the root timeline of carousel.swf and it hasn't worked. Not sure why.
spinner_mc.thumbs1_btn.onRelease = function() {
trace("Thumb 1 clicked");
_level10.gotoAndPlay("Gallery 1", 1);
};
spinner_mc.thumbs2_btn.onRelease = function() {
trace("Thumb 2 clicked");
_level10.gotoAndPlay("Gallery 2", 1);
};
spinner_mc.thumbs3_btn.onRelease = function() {
trace("Thumb 3 clicked");
_level10.gotoAndPlay("Gallery 3", 1);
};
When I test index.swf, carousel.swf loads into container_mc and the trace text is reflected in the output panel but the scene does not change to the respective gallery. I've tried replacing _level10 with _parent._parent and _root._parent but these do not work either.
Thanks for your interest in my question!
Edited: 05/27/2007 at 04:58:33 PM by jdvega
Nested MC
Very simple question, I am an occasional user of Flash and I am just trying to get up to speed with AS 3.0.
My question is, on the main timeline I have a MC, what I would like is for when that MC is done playing to go back to the main timeline and play on frame 2. In AS 2.0 I could get away using _root, but it seems that it is no longer present in AS 3.0
any help would be appreciated
Jeff
Nested?
I have buttons that I want to load two movies(swf) when the button is clicked - one is the external 'good' movie, one would be to show the active state (will be beside the actual button.
Is it possible to load two (or multiple, for that matter) movies with the same event?
Currently, the movie loaded code is
CODEblackWhite.onPress = function () {
_global.sectionPath = "Section1/";
_root.createEmptyMovieClip("container", 1);
loadMovie(_global.sectionPath + "bw.swf", "container");
container._x = 0 ;
container._y = 60 ;
}
Specifying Changes In Nested MCs
Hi,
Can anyone help me with this problem:
I have an MC called 'one' nested within another MC called 'Nav' on the main timeline.
How do i tell flash to make alterations to the 'one' MC using the tellTarget command?
I've tried something like this: tellTarget (_root.Nav.one); gotoAndStop (1) - but it won't work.
Many thanks for any help,
Anders
Nested Swf's
Hello,
This is the first time I have posted here. hope this works. I have designed my site all in Flash MX. I have a swf file that is the main navigation with rollover drop down menu's and an empty movie clip that is the target for other movieclips to load. The last frame tells the intro.swf to load to the target clip "content" in the main movieclip. Now the "intor.swf" uses a dynamic text that loads from an external text file, but the problem is that when the movie loads the text doesn't load. My guess is that I haven't found the written the right script yet. This is what I have on the last frame in the main movie:
stop();
_root.content.intro.LoadVariable('../docs/intor.txt', 'textbox');
What am I missing here? I have checked Macromedia and Flashkit for any tutorials and I haven't found much on working swf's inside swf's.
Thanks,
Nested With()
Hi there,
I wonder if is it possible to nested with(),
ex:
with(myMc){
for(i=0; i<myArray.length; i++){
attachMovie('mc','mc' + i, vDepth);
with(this['mc' + i]){
_x = vXPos
}
}
}
This is an exemple of want i'm try to do....
it always return :
Error: A 'with' action failed because the specified object did not exist.
I know this object exist, because if I talk to it outside the 'with()', it work.
So, any Clue...
Thanks in advance
Nested MC
I have a movie clip say main_mc
with a another clip inside say sub_mc
When sub_mc reaches frame 10
I want it to go to main_mc.gotoAndStop(1)
Can someone give me a clue?
Thanks
Nested Loop
I am wondering how can nested loop work look to this
the question is can someone explain this language ?
script t = 0;
m = 0;
Team = new Array();
Member = new Array();
while (t<2) {
while (m<10) {
Team[t] = t+1;
Member[m] = m+1;
m+=1;
}
t+=1;
m = 0;
}
t = 0;
m = 0;
then in the button this script
on (release) {
while (t<2) {
while (m<10) {
Team[t] = t+1;
Member[m] = m+1;
collect+="Team "+Team[t]+" member "+Member[m]+newline;
m+=1;
}
t+=1;
m = 0;
}
arrayOut = collect;
t = 0;
m = 0;
}
Nested Movies
When you scale the parent of a MC, the child also scale but in the properties it still shows 100. Does anybody know how I reset the child to be the actual size without being influenced by the parent's scale properties?
Nested Clips
I have a movie clip with a button nested in it. If I want the playhead to go to the main timeline and play a certain frame when the button is clicked, basically, how do I do it? The regular go to label doesn't work because the button is inside a movie clip and therefore on its own timeline. Anyone know what I mean?
-doc
Nested Problem
Hi
I partly found a solution myself to the attraction problem I posted earlier. I'll keep it short without the codes (they work, but if you want
them > reply).
-I created an BlancMC (instance name = leader) an is in the center of my page.
-A button controling x & y scale of targetMC also controls an atractionCoefficient towards "leader" with an update Position (...the works) in
order not to zoom away from the target and keeping it along the zoom in in sight, no matter where the targetMC is, along the zoom it moves
more and more to the center of my page. COOL!
If my movie would have been simple as this, it works fine.
Of course it's not. the targetMC is basicly a small pointer, nested inside an other MC(map). This is a very big map, with about 600
keyframes(all labeled). In each keyframe that pointer is on a different possition. With buttons along the side I control "map" 's timeline to
point out where it is (targetMc(pointer)).
My problem: I now you zoom out on the "map", Only the pointer get's attracted to "leader", In a way, this is normal, but I thought that since
"pointer" being nested, it would drag it's parent along the way > not.
My question: How can I specify, in terms of actionscripting, that no matter what (_scale, _possition, bla bla bla) the parent (map) of
"pointer" should stick together and drag "map", while scaling _x & _y, along?
This is realy sth. crazy, if you set a property on an MC, it's nested MC scales or move along. If you do so for the nested MC, it's parent
should follow as well, No?
Help would be extremly appreciated > No matter how cool it will be, I'm getting sick and tired of this map and want to finish it off.
Thanx big time
Koen
Nested MC's And Variables
Hi,
I admit, it's the first time I try to do some advanced actionscripting, and I so have a small question/problem,
Here's my problem,
I do have a MC1 on my (_level0) scene.
in this MC1 I do have a MC2 that contains a button.
here's the code :
Code:
MC1:
_root.MC1.variable._visibility=0;
MC2 (with button):
on (release) {
variable = MC2_name;
}
I thought that the MC2 action would keep my variable I've set by a "on (release) ... " action.
But it does not work :(
So the question is in fact, if it's possible to keep/transfer same variables within nested MC's.
If not, are there any other tricks to do so ?
thanks for any help.
cya,
kochi
Nested Button
I have a button nested in a movie clip onthe 1st frame of my movie. What script do I use to get it to go to the third frame of the main timeline? For scripting purposes the frame I am trying to get it to go to is labeled glass.
Thanks!
Nested Button
I need help getting a nested button (instance) in a mc (which is on the main scene) to goto and play another mc (named ECATB, frame 10) in the main timeline.
Does it matter if the "button" in question is, at the symbol level, an mc or a button?
Thanks in advance for any help.
Nested Clips- Please Help Me
can someone please help me? I am trying to get the _x and _y position of a nested clip relative to the main stage, not its parent.
I have a clip "box" and clip "box_corner" nested in it, and "box" moves around on the main timeline, but however I seem to reference it, I keep getting "box_corner"s position on "box" instead of on the main stage.
I would REALLY appreciate any help. Thanks.
Tinkertoy
Nested Collisions
OK, after a lot of effort and screaming, I've got mc objects (mc1& mc2) to move around the screen randomly, and to detect collisions between each other.
What I want now is for movies nested within say mc1 to detect collisions with mc 2 and with nested movie within mc2.
So, for example, if mc1 is a square that has a circle orbiting around it (the nested movie), I want collisions between that circle and mc2 detected and acted upon, as well as with a nested movie inside mc2 (another orbiting circle)
So there would be a different result if the orbiting movies touched each other or the square.
Anyone got ideas on how I should think about this?
I've tried putting the same collision detect script in the object actions of the nested movies, but stops everything from working.
Nested Functions
hi, this may be very basic, but it's my first step into actionscipt. how can functions be called from other functions? why does the following script not work?:
myFunction = function(value) {
Result = value;
}
myOtherFunction = function () {
TestVar = myFunction(100);
}
when I call myOtherFunction and trace TestVar it says "undefined".
any help welcome
thanks!
Hilch
Nested Functions
hi, this may be very basic, but it's my first step into actionscipt. how can functions be called from other functions? why does the following script not work?:
myFunction = function(value) {
Result = value;
}
myOtherFunction = function () {
TestVar = myFunction(100);
}
when I call myOtherFunction and trace TestVar it says "undefined".
any help welcome
thanks!
Hilch
Actionscript And Nested MCs
OK, I just used a tutorial that showed how to make a simple movie clip with a simple scripts that allows it to randomly float through the stage. The symbol is on the main timeline.
But, when I try to do the same thing using one or two levels of nested clips, say the above clip nested in another, THEN put on the main timeline, it totally does not work.
If you're bulding a site say in Flash, it would surely be complicated enough that just putting lots of movie clips randomly on the timleline would get messy... Surely you would want to nest...
Anyway, my question is why doesn't the Actionscript (a couple of OnClipEvents, the "random" math thing, and x/y coordinates) work with nested movie clips, and how can I make it work?
Thanks experts,
chris
Controling Nested..
Hi,
is there a way to controll all nested MC's all at once?
for ex:
...
_root.container."all-it's-children".gotoAndStop(1);
_root.container.thisonespecific.gotoAnddosth-else(1);
the second line is no problem of course. It's the first one i'm stugling with.
I thought there was sth. like Child?
For the record, still using 5.
thanx
Koen
Nested Arrays
clip = [middle, bottom, menu, menuarrow, menutext,];
colour = [];
function newcolor(clip, colour) {
MCColor = new Color(clip);
MCColor.setRGB(colour);
}
And this on a button
on (release) {
colour =['0xCCA68C', '0x663300', '0x996633', '0x996633','0xCCA68C'];
for (i=0, j=0; i<9, j<9; i++, j++) {
newcolor(clip[ i ], colour[j]);
}
}
What this does is sets each clip to a colour (this works).
I also have a 'texts' array
texts = [tc1, tc2, audio1, js1, js2];
I would like to add an array element to the 'clips' array that would represent all the elements in 'texts'.
I would like to add one colour to the 'colours' array, so that all the elements of 'texts' would be changed to that one colour.
How can I do this? (although it can't be seen here, I do need i AND j in the loop
Nested Movies
Hi,
I'm having problems nesting some movies into my main movie.
I'm doing a friend's website (main page is 40kb - no pre-loaders as yet):
http://www.adrianskingdom.com/ComDirect3.html
If you click on "Products" it will load another movie (107kb) - no problem with this. However if you move the mouse over "Scanners" there will be a short delay as a 2kb movie is loaded onto the left-hand side (plus animated button).
This is obviously not good, so how do I go about loading the 2kb movie as the 107kb movie is loading? (ie so it's already loaded by the time the buttons are on the screen and therefore no delay).
Once the movies have been loaded then the site works just as I want it.
BTW is there a limit as to how may movies you can nest? Ideally I'd like to nest 21 (each only 1-2kb in length).
Thanks for any help,
Adrian.
Nested MC's And MC Control
I have a movie clip called window, and in window there are several other movie clips. I want to be able to use several copies of window and have a movie clip inside each instance to control only that movie clip without having to make a new movie clip for it. For example, code for a movie clip inside of window where it's instance name is window1.
on(press){
startDrag(_root.window1.bar);
}
and in another instance named window two, the same could would apply, only
startDrag(_root.window2.bar);
is there a way I can get the movie clip to read the instance of the movie clip it is in or something like that?
Nested MC Madness
Can someone please explain why my movie clip does not play completely when I have an MC collision? I have mc1 and mc2. Now when mc1 and mc2 collide mc3 (which is nested in mc1) should play from frame 2 to 15. Instead it only plays frame 2 and stops. I attached the file. Please help!!
Nested Objects
I have a navigation system I'm building, that's 4 levels deep.
It goes:
Course -> modules -> learning objects -> breaking points
There is only 1 course, but there are multiples modules, multiple LO's in each module, and multiple bp's in each lo.
The modules are objects contained in an array variable within the course class, and so on down the line.
I've got for loops in the constructor function for each object that create the proper # of instances of each sub-object, so when you create a new instance of a course, a whole chain reaction takes place. (The different objects get their information from an xml file.)
Given that, when I create a new instance of course, will the AS Interperter not execute the next 2 lines after "theCourse = newCourse()" until all of the sub classes in theCourse have been created? Or will it go ahead to my next 2 lines of code regardless of how long it takes the course object to be created?
Nested Actions
Alright let me see if I can make this make sense.
I have a movie clip w/ 2 frames. In frame 1 is a button with an action to go to frame 2.
In frame 2 I have another movie clip nested which contains a little panel box that opens, and when it is open there is a button to shut it. When it completely shuts I want it to tell the movie clip that launched it to go back to frame 1, so that it does not automatically re-launch until the user pushes the button again. So basically I want a nested movie clip to tell it's parent to go to and stop on frame 1 again.
Any one put that into code for me I would really appreciate it.
Nested Arrays?
Hey.
I have a multitude of coordinate sets. Each set is 4 numbers, i.e. (123, 456, 789, 0). Each coordinate subvalue is assigned to a var, i.e. (x1, y1, x2, y2). How can I create an array of coordinate sets?
Not sure if I am making sense...
I have a matrix of numbers, 5 rows of 5 (the numbers 1 - 25). They are the nav for a series of thumbs. There is a highlight that moves to the number you are viewing. I also have a next and back button to scroll through the pics w/out using the number nav. I need to send the coordinates to the matrix highlight clip when using the next/ back buttons. Trying to avoid using keyframes of course.
Making sense? I'll post the .fla(s) if needed.
Any help would be greatly appreciated.
FK!
1M.
Nested Links
Hello all, I have a menu which I learned how to make from Brett Taylor's Tutorial. Everything went well in the process of making the menu. However, I am trying to link the menu items (inside a movie clip) to anchored frames in the main timeline...outside the movie clip. I've tried placing the actionscript for this in the main timeline and inside the movie clip with the menu items, neither has worked. Both times I have refered to the scene and frame name specifically like linking from frame to frame between scenes. If anyone has any suggestions I would be very appreciative!
Thanks
Nested Rollovers
I've seen similar threads posted but I can't make heads or tails of this and my situation is slightly different.
I have a button (a), when you roll over it, 2 more buttons(b and c) link out.
When you rollover b, a flickers on and off to the over state.
I have tried making A a movieclip and having button properties, and when you rollover you go to a frame within the movie clip that has b and c
I have tried making A a button that has a movie clip holding b & c in the over state.
And, I have tried making A as a button with a stop on the over state.
I even tried having the over state of A on a lower level of B & C so then when you roll over b & c you would still see the over of A.
There's gotta be a way people... There can't be no solution. especially when my boss wants a solution.
Nested Website
I'm making a site and I want to incorporate an area on the same page that has a display window in which all content will be viewed. Next to it, I want another window that maybe works the same. And also an area the access stuff like links, contact info, images, bio, etc. So in total,make 3 areas on the page.
I'd click 'images' on the access panel and in one of the windows a bunch of thumbnails would show up. From there, if I select one thumbnail, the actual larger image would display in the other display window.
What would be a good solution for this?
Thanks
Nested Symbols Help Please?
OK my question is can you nest a movieclip symbol inside a graphic symbol?
What I have is a Graphic symbol of a cartoon head with the different mouth positions so I can animate speech
Im sure you know what I mean
I keeps it clean so I only have to use one head
But I thought could I also drop a movie clip inside as well for example at keyframe 7.
I thought that way back on the stage on the main time line I could nominate to play keyframe 7 of the graphic symbol and it might play the movieclip animation
But it doesnt, not even if the nominated keyframe extends for the same time as the movie clip.
But Im sure there must be a way
Any help would be really appreciated
Thanks in advance
Earhoney
Roll Out's And Nested MC's
I've got a movie clip that has another movie clip nested within it. I've seen the other problems people have had with similar problems and it doesn't seem to have helped my situation.
I need the movie clip to act as a button as well as utilize a roll-out then play backwards feature (which includes the whole movie clip, usually it excludes the nested movie clip)
I have got it so it does what i want for the first 20 frames or so but after that the nested movie clips begins within the movie and plays fine but when i roll out it doesn't work. also with my current code it doesn't exactly act like a button as in doesn't have the little hand cursor.
I'm really frusterated with this whole thing, i'm new to flash but have been trying to find help on this for a week. i'm going to buy a book soon, but i looked through the official advanced guide and it didn't seem like it could specfically help me. please help.
What Is Wrong With My Nested If?
can someone check my syntax please? I'm not having any luck
VAR1 and VAR2 are sent via JS in the embed tag in the HTML. I only want the neste if else to occur if the first if is satisfied. Do I need to do a loadvariable before this? I was told that the variables passed in the embed tag are read automatically.
<script>
document.write('<embed src="movie.swf?&VAR1='1'&VAR2='2'"...
</script>
then in the FLA:
if (_root.VAR1='1') {
} if (_root.VAR2='1') {
loadMovieNum("track1.swf", 1);
} else if (_root.VAR2='2') {
loadMovieNum("track2.swf", 1);
}
}
no matter what I set the variables to in the HTML tag, this if statement always loads track1.swf.
Thanks for any help
Nested MC Navigation HELP PLZ
hello again flash masters. I am submitting to you today a little navigation problem I am having. I hope someone will be able to help me out. ok, here's the situation.
I have a MC with several named frames in it and a picture in each frame. I have a scrollpane in this MC that I want to use to navigate the named frames. The scrollpane's content is a MC in the library. This MC has two layers (button & pics). I need to know the code for the buttons to navigate the named frame in the MC I put it in. How is this done? I have tried the following...
on (release){
_parent.parent.gotoAndStop("fr2");
}
but this didn't work. I think I must also mention that both of these MC's are again put in another MC (same .fla) This might have something to do with the problem. If this seems like it's do-able, please help.
thanks
--DK
|