Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Tweening Properties Of Multiple Movie Clips



My problem is that all of these movieclips are acting as one massive movieclip. when you rollover any one of them, they all change their alpha property. what do i need to change in this code to make each clip work independently with onRollover and onRollout? I want to be able to rollover any one of them and just have that particular movieclip react. thanks for your help! Attach Codeimport mx.transitions.Tween;import mx.transitions.easing.*;onRollOver = function() {new Tween(a_mc "_alpha", easeInOut, 0, 100, 5);new Tween(b_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(c_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(d_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(e_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(f_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(g_mc, "_alpha", easeInOut, 0, 100, 5);new Tween(h_mc, "_alpha", easeInOut, 0, 100, 5);}onRollOut = function() {new Tween(a_mc "_alpha", easeInOut, 100, 0, 5);new Tween(b_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(c_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(d_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(e_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(f_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(g_mc, "_alpha", easeInOut, 100, 0, 5);new Tween(h_mc, "_alpha", easeInOut, 100, 0, 5);}



Adobe > ActionScript 1 and 2
Posted on: 07/24/2008 09:21:20 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Setting Properties For Movie Clips
I have a movie that begins with a movie clip on the stage.

How do I initialize the movie clip instance so that it is initially invisible. (I eventually want to use a button to make it visible)

I have not had problem setting the instance for commands such as play and stop, but can't get the _visible=false to work.

Where should this code be placed and what would be the right syntax?

Watch Properties Of All Movie Clips
Hi,

I need to watch the _visible property of all movie clips created in the movie, wherever they are.

I'm thinking I need to assign the watch on the prototype of the MovieClip class, but I'm not sure how to do this.

Code:
MovieClip.prototype.watch("_visible", somefunc, 0);
does not seem to work.

Maybe I need to overload the constructor of MovieClip and set up the watch there? But I have no idea what's in the constructor already to set it up correctly.

Any pointers?

Thanx

--
mm

[F8] Tweening Movie Clips
I have 5 movie clips on stage, in vertical order, and I want to change their individual y positions when each one is clicked. Right now I can do this with tweens (see below), but I was wondering if there is a shorter way to do this with some sort of loop.

Here is I have that works. I'd have to duplicate this 5 times for each movie clip.


PHP Code:




import mx.transitions.Tween;
import mx.transitions.easing.*;

collections_btn1.onPress = function () {
    new Tween(collections_btn1,"_y",Strong.easeOut,collections_btn1._y,50,1,true);
    new Tween(collections_btn2,"_y",Strong.easeOut,collections_btn2._y,65,1,true);
    new Tween(collections_btn3,"_y",Strong.easeOut,collections_btn3._y,80,1,true);
    new Tween(collections_btn4,"_y",Strong.easeOut,collections_btn4._y,95,1,true);
    new Tween(collections_btn5,"_y",Strong.easeOut,collections_btn5._y,110,1,true);
}







And here's kinda what I'm trying to do with a loop, but no success:


PHP Code:




for (var c:Number = 1; c <= 5; c++) {
    
    this["collections_btn"+c].onPress = function () {
    new Tween(this["collections_btn"+c],"_y",Strong.easeOut,this["collections_btn"+c]._y,50 +(c*15),1,true);
}
}

Tweening Two Movie Clips In AS3?
Hey everybody,

This may sound like a completely noob question, but is it possible to tween two movie clips, i.e. transition fluidly from one to the other, purely in AS3? I am rather puzzled as an exhaustive text book and Google search turned up very little!

Many Thanks

Changing Properties Of Dulplicated Movie Clips
So, I'm sure there is an easy way to do this, but I have no Idea how its done.

I have a movie clip that I want to duplicate say 20 times and I want to change the properties of the clip and change the properties of another clip based on a duplicated movie clip. If that doesn't make sence lets try this.

button 1 -- action script
on(release) {
foo = 0;
while(foo < 20) {
duplicateMovieClip("_root.dot", "dot" + foo, foo);
setProperty("dot" + foo, _x, ((_root.("dot" + foo)._x))+20);
foo++;
}

As you can see I'm just trying to bump the new duplicate over by 20 from the position of the previous duplicate.


Adam

Assigning Properties To Dynamic Movie Clips
Hi

I am trying to put a white 1 pixel border around a dynamically generated image. (movieclip holder)

Can anyone help

"
thmbscroller.onThumbRelease=function(mc)
{ _root.holder.onEnterFrame = function() {
this.borderColor = white ;
}

_root.holder.picHolder.loadMovie("pic_"+mc.no+".jp g");
}

Cheers

Changing Properties On Seperate Movie Clips
I've got four buttons (bt_1, bt_2, bt_3, bt_4) and a movie clip (mc_txt). mc_txt has different text at frames 1, 2, 3, 4. I want to be able to use the 'GotoandStop' command to go to the appropriate frame in 'mx_txt' depending on which button I press, but I can't seem to do it or find any examples of it online. How is it done?
thx

Assigning Properties To Dynamic Movie Clips
I need to load an external swf dynamically at runtime and then duplicate that clip and assign new position and scale properties to it...

Unfortunately if you use duplicateMovieClip to duplicate a dynamically loaded movie clip (using loadMovie), it will duplicate the movie clip but not the content inside - per the Flash help file.

I am therefore attaching a movie clip from the library that has script inside to load the swf. I then loop through attaching the movie clip to the stage to create a grid.


Code:
for(var i:Number = 0; i < numRows; i++)
{
for(var j:Number = 1; j <= numColumns; j++)
{
var newX:Number = (boxWidth+xSpace)*j;
var newY:Number = (boxHeight+ySpace)*i;
var newDepth:Number = (i*numColumns)+(j+1);
var instanceName:String = "graphBG" + i + (j+1);

_level0.graphHolder.graphBG.attachMovie(targetMC,instanceName, newDepth, {_x:newX, _y:newY});

}

}
The code above works and creates a grid.

The problem come when I want to be able to manipulate the height and width of the loaded swf when I am attaching it to the stage.

_level0.graphHolder.graphBG.attachMovie(targetMC,i nstanceName, newDepth, {_x:newX, _y:newY, _width:boxWidth, _height:boxHeight});

The above code (new code in red) seems like it should modify the width and height the same way that it is assigning the position on the stage. But instead it simply doesn't show anything at all. (boxWidth and boxHeight are passed into the funtion this resides in.)

Any ideas how I can solve this?

Linkage Properties > Export Clips... Access In Another Movie?
I have a preloader movie that loads my main movie *.swfs and I need to know how I can reference up my Linakge > Export clips so they are not "lost" once my movies are loaded into the preloader. Thanks for helpin' me out.

Adjusting Properties Of External Movie Clips Once Loaded
I have created a picture gallery by loading the pictures in from the server in place of a movie clip on the stage using the loadMovie() action. Is there anyway I can adjust the properties, specifically size, once they are loaded as many are displayed at the wrongh size.
I am using Flash MX. The gallery as it is now can be seen at
http://members.lycos.co.uk/pointlessonline/pix.htm .
Many thanks in advance,
Dan

Accessing Properties Of Progammatically Generated Movie Clips
Hi everyone, I'm new to Actionscript so this might be a real simple question—Here is a piece of code that dynamical creates a set of movie clips:

ThumbNailPage.attachMovie("mcThumbBackground", "tback" + thumbIndexer, pageDepth+thumbIndexer);


how can I now access "tback" + thumbIndexer without a literal reference such as: "trace(tback5._x);"


Or can I set "tback" as an array?

Any help would be appreciated.

Duplicating Properties Of Drag/drop Movie Clips
Hello,

I've designed an E-card system, so far so good. It works by allowing the user to drag and drop items (movieclips) onto different backgrounds ( the hit target). The problem I have now is accessing where the properties, methods of each movie clip dragged onto the background. As the user can resize, rotate and change the alpha on each clip I need these properties so I can then save them as an .swf so they can be emailed on. When the user clicks on a movie clip to be dragged this function is invoked.



ActionScript Code:
function clone(name) {var:Number d=100;d++;_root.slider_mc.slider._x = 110;_root.slider_mc.slider._visible = true;_root.pHolder.attachMovie(name, "pi"+d, 99999);_root.pHolder["o"+d].depth = d;_root.pHolder["pi"+d].name = name;_root.pHolder["pi"+d]._x = -800;_root.lastSelection = _root.selection;_root.selection = _root.pHolder["pi"+d];addHandles(_root.selection);_root.selection.startDrag(true);_root.pHolder["pi"+d].width = _root.pHolder["pi"+d].mc._width;_root.pHolder["pi"+d].height = _root.pHolder["pi"+d].mc._height;}


Each instance of movie clip is therefore given a name of pi and the name and depth of the clip is incremented.

I just need a method of looping through each movieclip dragged onto the background
so i can access its x,y, height, width, alpha, rotation.


Hope this makes sense and that someone can help me!

Cheers

Assingning Properties To Dynamically Created Movie Clips
Hello, I am trying to use the duplicateMovieClip event to create a row of custom movie clips dynamically and I would like to be able to set the _alpha properties on each object depending on an event i am firing in a different movie.

Here is my code that actually creates the controls and locates them on the screen.
================================================== ==============
for(var i = 1;i < argCount;i++){

duplicateMovieClip(CounterBackMain_mc0,"CounterBac kMain_mc"+argCount-i,argCount-i);
this["CounterBackMain_mc"+argCount-i].textNumber_mc.textNumber.text = argCount - i;
this["CounterBackMain_mc"+argCount-i]._x = iLocation - CounterBackMain_mc0._width + 4;
this["CounterBackMain_mc"+argCount-i]._y = CounterBackMain_mc0._y;
iLocation = eval("CounterBackMain_mc"+argCount-i)._x;

//set("Counter"+(argCount-i),"CounterBackMain_mc"+(argCount-i));

eval("CounterBackMain_mc"+argCount-i).onRollOver = function(){
setAlpha(this.CounterBack_mc,true);
}
eval("CounterBackMain_mc"+argCount-i).onRollOut = function(){
setAlpha(this.CounterBack_mc,false);
}
eval("CounterBackMain_mc"+argCount-i).onPress = function(){
//_level0.loadImages(imageArray,argCount-i)
_level3.MainImage_mc._alpha = 100;
_level3.setImage(Number(this.textNumber_mc.textNum ber.text)-1);
//trace(Number(this.textNumber_mc.textNumber.text));
}
setAlpha(eval("CounterBackMain_mc"+argCount-i).CounterBack_mc,false);
}

================================================== ==============
Here are the functions called from the event to set the property:
function setPictureNum(argCounter){
//Set alpha to 0 on previous control
setAlpha(eval("CounterBackMain_mc"+current_pos).Co unterBack_mc),false);
setAlpha(eval("CounterBackMain_mc"+argCounter).Cou nterBack_mc"),true);
current_pos = argCounter;
}

function setAlpha(argMC,argVisible){
switch(argVisible){
case true:
argMC._alpha = 100;
break;
case false:
argMC._alpha = 0;
break;
}
}
================================================== ==============

It does not seem to recognize the dynamic clip I am sending to the setAlpha function. Any of the initial events I set in the loop work fine. I just cannot access the properties once the loop is completed. Any suggestions would be very appreciated!!

All the Best!
Jim Davis

Transparency/Shape Tweening/Movie Clips
I have an image for the background of something that basically acts like a new frame. I want to make that image transparent so I could see the background underneath that. On the other hand, it's going to be changing shapes so I can't just make it a symbol. How do I achieve this effect?

Tweening Movie Clips Symbols In Videos
When i tween movie clip symbols and export to video in flash 8, the twee don't work, but they work for graphic symbols. How can i solve this problem?

Tweening Movie Clips Created With Actionscript
Hey everyone-
Im just getting started with Actionscript, so please bear with me on this question.
I have created a movieclip on the first frame of my movie of which Ill be using to load a jpg for a background. Ive used this code:

_root.createEmptyMovieClip("imageHolder",1);

In addition to loading the jpg in it:

loadMovie("back1.jpg","imageHolder");

Now, I'd like to, if possible, animate it's alpha property so it can fade in after loading.

Ive created a variable to hold the alpha value:

mcAlpha = 0

Then, changed the movie clips alpha value to reflect that of my variable:

imageHolder._alpha= mcAlpha;

I wanted to use an onClipEvent to apply the value of mcAlpha to my clip, then add 1 to it, until I get to 100. Obviously right?

Well apparently I can only apply events to movieclip instances. Which I understand, and I'd just use this script in a manual created movie clip, but because Im loading a jpg I dont know how to achieve this. hmmm...this is tricky. If anyone has any idea of how i can do this, please lemme know. Thanks alot.

-Derek from NY

External Movie Clips With Multiple Menu Movie Clips
It's pretty late and I don't think i have enough time to search this question in the forums but here I go. Sorry If I upset someone for making a topic that already exists.

I have a main timeline that im importing an external movie clip in. This external movie clip is named "members" it has several buttons that load other external movie clips into a window within "members" . What do I need to do to make this work. Do I need to use "this, _parent, _root, level(s) or "whatever.swf". If you can help me out that will be great. I'll make it up to you down the road. No sexual favor please.

I'm using flash mx 2004 btw.

Thanks in advanced

Programming A Combobox To Call Movie Clips And Change Properties
Hi, I´m a Flash newbie and I need some help for a project I´m making. I have a dialogue box with a ComboBox labeled as "square", "circle", "triangle", and "rectangle", which are supposed to call movie clips (they have the same instance name as the labels). What I want is that the ComboBox selects any of these movie clips and get their size and position properties through input textboxes, and also have the chance to rearrange the properties by changing the values on the input textboxes (sort of like the property inspector in Flash).

I was looking for any tutorial that looks like what I´m looking for, but I didn´t find anything. I´m not even sure if a ComboBox can be used to call a movie clip on stage. I hope anyone can help me out.

Multiple Movie Clips On Multiple Layers (Playing Problem)
Hi dears,

I am also new in flash users. I have created some movie clips and want to play in “mcmovie”. All movie clips are on different layers i.e. movie clips are as follows:

1.mccommercial
2.mccorporate
3.mcenvirnomental…etc

I placed these MCs in on layer1 frame1 mccommercial, on layer2 frame2 mccorporate, on layer3 frame3 mcenvironmental and so on.

I want to play all movies’ clips one by one i.e. mccorporate should be played after completing mccommercial and playing last movie clip, it should be start from beginning.

I will appreciate, if somebody could do me a favor in this regards.

Thank you,


Yasin

Multiple Buttons Multiple Movie Clips - PLEASE HELP ME
Hello -

QUICK BACKGROUND: I am working in Flash MX. I have used Flash for over 3 years, however, I am still struggling with Action Scripting. I plan to take some advanced courses this Autumn.

THE PROJECT AND PROBLEM: I am working on a large Flash site for a cosmetic dentist. I have multiple buttons and when you rollover the button, it will play a movie clip. I got this to work okay.

EXCEPT, I want the movie clip to stay in place and then go away when you click on the next button. Currently, I do not really have any Action Scripting involved except for a few STOP actions. The movie clip is attached to the "OVER" state for each button.

I have attached the .fla file for anyone who can take a few moments to review it. I am really at a stand-still and ready to have a nervous breakdown trying to figure this out. I have been up until 3am every night for the last 4 nights researching this and I have come close but still have not figured it out.

Any help is GREATLY APPRECIATED!!

Denise

Multiple Preloaders For Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1 and is comprised of an introduction, which contains a short video, and 6 movie clip categories that the user selects to view. Since I want the intro to play as soon as possible, I'd like to limit the first preloader to just the video in the intro and not _root.getBytesTotal. Then, as the viewer watches this short video, the rest of Scene 1 movie clips will keep on loading. After the intro, the viewer will choose which of the 6 categories to view. These categories are identified with buttons which play the particular movie clip. Since I don't know the order of the categories they will select, I thought there should be a separate preloader for each category. Hopefully, after they view a category, the rest of the categories will have loaded and the loading time will be nil. The design for the preloader is comprised of a status bar and a percent loaded. Is there a way to limit the _root.GetBytesTotal to specific frames? I know I could break these categories up into separate SWF files but then I loose the advantage of one loading while another is being viewed.

Movie Clip Runs Slow When There Are Multiple Movie Clips Running
Hi, Can someone help me out? I have made a flash where a movie clip containing text runs at the same time that a second movie clip runs (movie clip 2). I used function updateCursor() to replace the standard mouse symbol with the movie clip symbol (movie clip 2). After the scene runs a few times at the correct speed, everything within it slows down markedly, which I don't want. Why is this happening? Any ideas? I have actually seen something similar in Flash 5...but I can't figure out how to keep this from happening!!

Tweening TextField Alpha Properties
I have been searching long and hard for a simple solution to tween the opacity of dynamically created text - so that it fades in. There seems to be no real standard way of doing this...

The only way to do it that I have found is to set the BlendMode Layer - which makes the text disappear if you try to highlight it (not very good).

I am feeding in my text from external sources... txt and xml files... NO matter what I try - it doesn't work...

Anyone conquered this one? Could you share your secret?

Multiple Movie Clips
I am new to ActionScript and I have a problem.

Is there ANY way to target multiple movie clips spanned across 5 levels?

For example a MC within a MC on level 3 controlling an MC within the MC loaded to level 1?

Multiple Movie Clips
i have been reading these forums alot and i have a ques please. is there any limit to hte number of movie clips you may add within another ? i mena i read about people loading a clip into a clip that resides within another clip and am just curious if there is a limit

Multiple Movie Clips
How can I copy and paste movie clips, and set different actions to them? When I make copies, and set actions to just ONE of them, all of the others do the same.

Im still a n00bie, trying to learn : ) Thanks for the help.

Multiple Movie Clips
Hello, I'm new here and was wondering if anyone could help. I have two movie clips that I am trying to animate at different FPS. It is basicly a sky picture that is divided in two. There is an upper sky and a bottom sky. I made them so that they scroll across the screen from right to left, however I would like them to move at different speeds. I would like the top half of the screen to move at 30 FPS and the bottom to move at 15 FPS. I'm trying to create a neat effect here but when I double click the movie clip in the libarary to edit it to change the FPS, it changes the FPS for the other animation in my libarary as well. Whenever I change one it automaicly changes the other. Anyone know how to get around this? Also is there a way to remove the background from a movie clip?

Multiple Movie Clips With Same Name
Hi

I'm writing a quiz question where students are asked to drag either 'principal', 'principles' or 'principle' into the correct spaces in a piece of text.

I've given the spaces which require the same answer the same name and ditto for the words to fit into those spaces. I've done this hoping that any copy of the word 'principal', for example, will fit into any one of the spaces for that word.

However, when I publish the quiz, it recognises only the first instance of each movie clip as dragable, or dragable-onto.

Has anyone got any ideas?
'elp!

Thanks
Trinitybay9

Multiple Movie Clips
I have a file with multiple movie clips. I just want to have clip one play once, then clip two play, then clip then, etc. How do you do this?

Thanks.
Michelle

Multiple Movie Clips
I just can not figure out how to write an action script to load separate swfs into two separate movie clips.
When I build a flash program I only get the first swf to play. It shows up in the correct movie clip. I can not get the other swf to play in the second (different name) movie clip.
That's my main problem.
A secondary concern is if I try to then add audio to the main Flash program that never plays.
Can anybody point me in the right direction?
Thanks
Randy

Help With Multiple Movie Clips
Hey everyone,

Stuck on a little problem here. I have my main MC that loads another on top of it. The movie clip thats loaded on top has some buttons on it. I'm having trouble with the actionscript to make it so that when you click the button on the top MC, it will go inside the bottom MC and play a specific frame.

Any help would be great!

Thanks.

Multiple Movie Clips
I've created a slider that opens by a mouse click. This slider opens multiple movie clips in the form of individual windows with additional buttons on each window. How do I activate the buttons within the slider so that the opened windows can be minimized to the visible edge of the slider without tweening all windows out of sight.

I know it sounds very confusing but I'm hoping that someone can help and guide me through this.

Sabras

Multiple Movie Clips
Hi

I am currently making a grid based game and across the grid there is upto 10 repetitions of 10 different objects over the 100 squares.

Each object is a movieclip which there is a copy of in the project library. At the start they will either all be spread across the grid or the player can place them in the grid to solve the puzzles.

if i have a loop


ActionScript Code:
for(var i=0;i<10;i++){
       for(var j=0;j<10;j++){
       }
}

and within this loop the clips are randomly placed how do i dynamically attach them, say for example a library reference is one,two,three etc

at the minute i have something like below which doesnt appear to work but if i take this out and only attach one specific movie it works fine.

ActionScript Code:
clip = _root.grid.createEmptyMovieClip("num"+i+"_"+j, 1300);
            clip._x = _root.tileClickedX;
            clip._y = _root.tileClickedY;
            switch(_root.puzzle[i,j]){
                case 1 :    clip.attachMovie("one",one,_root.grid.getNextHighestDepth());
                            break;
.
.
.
.
}

Multiple Movie Clips
Hi everyone,

I have 2 movie clips (so far) on my main timeline. Also on my main timeline I have a rewind button. The rewind button rewinds correctly for my first movie clip named main1_mc which is on the frame labeled "screen". But when it reaches my second movie clip and I want to rewind the entire movie, the first movie clip rewinds in front of the second movie clip. So the second movie clip is still there and the first movie clip appears on top and rewinds. My second movie named "mainr_mc" is also on my main timeline on the frame labeled "resources". So I've tried multiple variations of removeMovieClip with _root and all (as commented in the code below) but nothing seems to work. Any suggestions? Here's my AS for my rewind button (which is also on my main timeline) below:

// ========== REWIND BUTTON ==========
prev.onPress = function() {
//removeMovieClip("_root.mainr_mc");
_root.next._visible = true;
_root.createEmptyMovieClip("controller_mc", 1);
controller_mc.onEnterFrame = function() {
_root.screen.gotoAndStop(_root.screen._currentfram e-3);
if (_root.screen._currentframe-3<1) {
_root.gotoAndStop("screen");
}
};
};
prev.onRelease = function() {
controller_mc.removeMovieClip();
_root.next._visible = true;
//removeMovieClip("_root.mainr_mc");

};
prev.onReleaseOutside = function() {
controller_mc.removeMovieClip();
_root.next._visible = true;
//removeMovieClip("_root.mainr_mc");
};

Help With Multiple Movie Clips
I'm fairly new to Flash and am havig trouble getting two movie clips to play sequesntially (one after the other).  I've tried stop() and gotandplay() actions but am not having any luck.  Any help would be greatly appreciated.

There's always a better way...

How To Preload Multiple Movie Clips With The Main Movie
I want to know that how i can preload multiple movies with main movie together. lets supose i have two movies named first.swf and second.swf and i have also Main movie with intro so how i can preload these movies together then these movies can play together.

Please help me in this regard.

Thankyou

Pv3d - Tweening Alpha Properties Of A Plane - Help
Total Newbie here, and I'm probably overlooking the obvious... any help would be appreciated

I'm trying to create a tween from an event listener CLICK that fades a PV3D Object (plane) which contains a VideoStreamMaterial.

In order to do so, would I create a var that is a movieclip, and assign the (plane) to the var? then use tweener to fade the alpha of the movieclip?
- would var be declared in the beginning of the code? public or private?
- would I assign the plane to movie clip after the addchild(plane) ?
- then use the tweener in the object press function.

I'm confused from staring at too much code. any help with the code would be helpful!!!

thanks

Gravityslave





Code:

package
{
   
   import flash.display.*;
   import flash.events.*;
   import flash.media.Video;
   import flash.net.*;
   
   import caurina.transitions.*;
   import org.papervision3d.cameras.*;
   import org.papervision3d.objects.primitives.Plane;
   import org.papervision3d.objects.DisplayObject3D;
   import org.papervision3d.materials.*;
   import org.papervision3d.render.*; 
   import org.papervision3d.scenes.*;
   import org.papervision3d.events.InteractiveScene3DEvent;
   import org.papervision3d.view.*;
   
   public class movie extends Sprite
   {   
     // declare vars
      private var viewport:Viewport3D;
      private var scene:Scene3D;
      private var camera:FreeCamera3D;
      private var renderer:BasicRenderEngine;
      
      private var plane:Plane;
      private var pbtn:Plane;
      private var ffbtn:Plane;
      
      private var connection: NetConnection;
      private var stream: NetStream;
      private var video: Video;
      
      private var vsm:VideoStreamMaterial;
      private var cm:ColorMaterial;
      private var cm1:ColorMaterial;
      
      public function movie ()
      {
         init();
      }
      
      private function init():void
      {
         initPapervision();
         initloadVideo();
         initMaterials();
         initObjects();
         initListeners();
      }
      
      private function initPapervision():void
      {
         viewport = new Viewport3D(550, 400, false, true);
         addChild( viewport );
         
         scene = new Scene3D();
         camera = new FreeCamera3D();
         camera.y = 100;
         camera.z = -200;
         renderer = new BasicRenderEngine();
         
      }
      
      
      private function initloadVideo():void
      {
         connection = new NetConnection();
         connection.connect(null);
         stream = new NetStream(connection);
         stream.client = new Object();
         video = new Video(320,240);
         stream.play("CRUSTYS.FLV");
         video.attachNetStream(stream);
      }
      
      
      private function initMaterials():void
      {
          vsm = new VideoStreamMaterial( video, stream);
          vsm.doubleSided= true;
         
          cm = new ColorMaterial( 0xcc0000, 1, true);
          cm.doubleSided = true;
         
          cm1 = new ColorMaterial( 0x33FF00, 1, true);
          cm1.doubleSided = true;
         
      }
      
      private function initObjects():void
      {
         plane = new Plane( vsm );   // THIS IS THE PLANE I WOULD LIKE TO FADE
         plane.y = 150;
         scene.addChild( plane );
         
         pbtn = new Plane ( cm, 50, 50 );
         scene.addChild( pbtn );
         
         ffbtn = new Plane ( cm, 50, 50 );
         ffbtn.y = -100;
         scene.addChild( ffbtn );
      }
      
      
      private function initListeners():void
      {
         addEventListener ( Event.ENTER_FRAME, onEnterFrame );
         pbtn.addEventListener (InteractiveScene3DEvent.OBJECT_CLICK, onPressP);
      }
      
      private function onPressP(e:InteractiveScene3DEvent):void
      {
         stream.togglePause();
         //Tweener.addTween(plane, {alpha:0, time:1, transition:"easeOutExpo"}); 
      }
      
      
      private function onEnterFrame( e:Event ):void
      {
         renderer.renderScene( scene, camera, viewport );
      }
   }
   
}

Setdrag Using Multiple Movie Clips
I have a movie with a box with the setdrag propertys set to drag the movieclip when u press and hold down the clicp and let go when u release the mouse. i did that no problem but when i duplicate the clip only one of the clips will let me drag it in that scene even though the coding is the same. help me please. a.s.a.p

Multiple Draggable Movie Clips
Help! I have 5 different movie clips that i have being able to be dragged around. I hvae a huge problem tho, and that is when i try dragging any of the other 4 movie clips, the 1st movie clip always gets dragged ....whyy?????

Targeting Multiple Movie Clips
Maybe this is a dumb question, but is there a way to change the properties (specifically _alpha) of multiple instances at once?

Here's my situation. I'm making a map, and there are 188 instances, which all fall into 4 categories. I use a naming convention of category + number. When I click on a category, instead of changing the alpha for 50 or so isntance, I'd like to hit them all at once. Is that possible?

Multiple Button & Movie Clips
I have 3 Buttons that control 3 Movie Clips. 1 Button controls only one Movie Clip. Each Movie Clip runs for 7 seconds. The problems is if I click all 3 buttons inside the 7 seconds all 3 Movie Clip will be playing together.

If someone clicks the button quickly I want the present Movie Clip to stop and the new one start. In other words I only want one Movie Clip to be able to play at once.

I know this can be done, but I need some help please...Thanks

Preloaders For Multiple Movie Clips
I have an animation that stops at a frame in a main movie. Several (randomly generated) .swfs are loaded into container movie clips on the stage.

I wondered how I would go about employing a preloader that accounts for the loading times of all the .swfs simultaneously.

Basically, so nothing is visible until ALL clips have fully loaded.

Any ideas?!


telekin:
__________________________________________________ __________

Help On Collusion Between Multiple Movie Clips
Any one know how to detect collusion between multiple movie clips against one.

I meant say I have a movie clip. Now I want to detect if it has collied with two or more other movie clips whose instant names are generated runtime.

Anyone Please ????

HELP: Controlling Multiple Movie Clips
Can somebody please tell me if there is a way to control multiple or all of the movieclips at once, (not the timelines, just a simple instruction like play() or gotoandstop() ) except the main movie clip ?

I mean, I can just put a tellTarget to each of the movieclips, but what if it's just a simple instruction for 20 or 30 movie clips ?

I tried with:
tellTarget(all){
play();
}

but that screwed the whole movie.

Thanks.

Controlling Multiple Movie Clips
I've got some script that i want to use to control 5(to 500 if need be) but is doesn't work on more than one movie clip. Previously, i would have just duplicated the script and changed the instance name. It doesn't work with this script(because of the .onEnterFrame). Does any one know how to send this script to multiple movie clips?

back_btn.onRollOver = function() {
first_mc.onEnterFrame = function() {
this.prevFrame();
}
}
back_btn.onRollOut = back_btn.onReleaseOutside = function() {
delete sqr_mc.onEnterFrame;
first_mc.stop();
}

the first_mc being the name of my instance.

Loading Multiple Movie Clips (HELP)
Greetings!

I've created a flash promo movie (the ones with the next and back buttons). Anyway, I have serveral movies that I want to use... How can I get them to load one after the other via the "next" and "back" buttons or just playing through... Thanks

Controlling Multiple Movie Clips
Is there anyway I can send a 'Tell Target' command to more than one Movie Clip at the same time?

Creating Multiple Movie Clips
Hi there - here is what I'm trying to achieve:

I have a m/c of a small square rotating from edge on to face on via it's Y axis. I want to now, using duplicateMovieClip, create 25 of these, in a grid 5 x 5, one after the other, playing as they are created.

I know how to create the 25 duplicates, using Linkage in the library and something like this:


Code:
for (i=1; 1<=25; i++) {
square_mc.duplicateMovieClip("square" + i + "_mc", i)
}
But once they are created, how do I reposition them? Also I will need to be able to determine once 5 are created so that a new line is started.

Would it be something like this: Set a first X and Y position before the loop and after each pass, use -

Code:
this._x = n + somenumberofpixels
this._y = g + somenumberofpixels
where n is the preset _x before the loop and g is the preset _y before the loop and somenumberofpixels is the size of the square after full rotation plus a little gap inbetween?

Sorry my text sounds/reads a bit messy; I can see the solution, but I just don't know how to reach it.

cheers

frank

Visibility Of Multiple Movie Clips
part of my website involves an archive of stories. i wanted to menu to select each story to be scrollable, because of this i could not figure out how to use goto frames to get each new story. so instead im using

onClipEvent (load) {
setProperty("/aaaaaaa", _visible, "0");
setProperty("/Panels/Grid State/mark1", _visible, "0");
}

on each story's MC, and the button to activate each story has this:

on (release) {
visible = int (getProperty("/aaaaaaa", _visible));
if (visible == "1") {
setProperty("/aaaaaaa", _visible, "0");
setProperty("/Panels/Background_State/mark1", _visible, "0");
}
if (visible == "0") {
setProperty("/aaaaaaa", _visible, "100");
setProperty("/Panels/Background_State/mark1", _visible, "100");
this.swapDepths(_root.mcNum);
_root.mcNum = "_root.aaaaaaa";
}
}


my problem comes when a person activates a story., but then goes to activate another - the first one remains. I could just have each button make every other story have visible = 0, but i plan on adding more and more stories, so adding each story to each code would become exponentially tedious...

is there a way to code so that "all but this story has visibility = 0"

thank you

Copyright © 2005-08 www.BigResource.com, All rights reserved