No Instances In
Hello All,
I'm doing the tutorials in this book, Sams Teach Yourself Macromedia Flash 5 in 24hrs and am doing the rotating wheels/car animation exercise where I am learning how to put actions in button instances, but, after adding the "stop" action/method and then adding the "with" action and clicking the cross-hairs to bring up the dialogue box I only see an instance called "this". Doesn't seem to be a + to open the tree of instances. What am I missing here..?
FlashKit > Flash Help > Flash Newbies
Posted on: 06-05-2002, 01:14 PM
View Complete Forum Thread with Replies
Sponsored Links:
Can Instances Be Attached To Instances ?
can instances be attached to instances using attach movie??
what i am doing is creating an instance of a movie by dragging and dropping and attaching a movie to a symbol and then i want to attach my new movie instance that i just created to another instance... can i do that...??
thanks
View Replies !
View Related
Instances
I have a music player setup. There is a button that tell something in a instance called song to go to a certain frame. THIS DOES NOT WORK. what is wrong with it..
on (release) {
tellTarget ("song") {
}
gotoAndPlay (1);
}
View Replies !
View Related
Instances
Well i have several windows all with the background as a black graphic from the library.
Everytime i make a txt box on one of the backgrounds it appears on all the backgrounds of the other windows.
I know this is something to do with the instances of the graphic in the library but i dont have a clue how to change the instances so they dont affect all the others by changing the symbol in the library.
Sorry if any of this is confusing but i've been learning flash for 11 days and am finding it hard going unlike SwiSH so any help would be much appreciated.
View Replies !
View Related
Mc Instances
How can I refer to all instances of an mc together in one statement
setProperty(one,two,three,_alpha, 0);
How could I change this illegal statement to something that will work?
View Replies !
View Related
Instances
Supid question....but I'm having trouble assigning actions to one of my buttons. When I click the button and go to actions, it tells me "no instance name assigned", however I have already named the instance "Play" in the property inspector. The button is a play button for a playback control bar and I want to do an "onclick, play frame 1 of current scence.
Haven't used Flash in a while and have never had this problem before. Probably a minor error, but I'd appreciate some help.
View Replies !
View Related
MC's Instances
I'm trying to make a personal site wit just pics. I have about 20 pics. For every picture I have a movieclip/button overlapping the picture, so when the mouse rolls over theres a fade of the picture. Now I have TONS of code controlling these instances of the fade MC, so I want to know if there's a quicker way of tellin all these instances that when thres a mouseover to gotoandplay the movieclip/button.
Thx .. if dat seemed unclear .. take a look at the site ..
http://scorpius.spaceports.com/~agt
View Replies !
View Related
Instances
what I've done is created a panoramic viewer that moves using bt's. What I want to do s creat a "pop up video" effect. So I thought the best way of doing this is to have hot spots in the panoramic shot that run through a target window on the main timeline to active a movieclip from the library. So I did this:
if (mainMovie.singleStrip.drag1 == "target1") {
_root.insert.attachMovie("pop_up1", "california", 10);
}
drag1 is the hot spot in the panoramic shot and target1 is the target that it hits to pop up "pop_up1" from the library.
what am I doing wrong. I think I'm calling on drag1 wrong. am I?
View Replies !
View Related
Instances Within Instances
How do I write script for an MC which is in the over state of a button.
I want the MC to play when the mouse rolls over the button but not before it does. I've tried doing this with:
_root.abcabc.play
where abcabc is the instance name of the movie clip. This method, which has worked when the MC is in the root, but I don't know how to identify the instance of abcabc when it's within the button.
Any help is much appreciated.
View Replies !
View Related
Instances...
hi buddies,
I tried to make a flash animated button for a movie, and I create a MC, and locate the button into it. The movie clip has an animation bla bla bla and the button has code for control the mc (this) and some MC out that MC, on the main movie timeline.
The problem is that, I can use instances of the MC, but the button into the MC is only one, and when I change the code of the button, the whole MC changes the code, so I can't use instances...
is there a good way to create animated buttons for using like instances in a movie (avoioding duplicate the original MC in the library)?
How can I organize that?
thanks a lot in advance pals...
View Replies !
View Related
Instances
I have a main page with 4 buttons that "on release" will "goto and play" an animated subscene then return to the main menu. I have the 1st subscene exactly the way I want it and I want the other 3 subscenes to be exactly the same but with swapped images and links. I duplicated the 1st subscene to become the 2nd subscene but when I swapped the images and links in the 2nd subscene, it changed all the images and links to the 1st scene too. How do I copy a scene and make changes to it without affecting the original scene?????
please help!
thanks
View Replies !
View Related
How To Name Instances
Hi,
I've got 6 instances of a symbol in my anim and I'm trying to name each one individually. However I can't find out how, there is nothing in the properties inspector to type the name into... Am I missing something obvious or is it not possible. I need to be able to address each instance seperately as I intend to turn them on and off using AS independent of each other. If it's not possible to name them what is the best way to reference them in my script?
Also is there any way of finding out the full name (ie _root.submovie.button) of an object? I can get a list of everything using ctrl-l but is there any way to click an object to find out about just that object.
Thanks
Alex
View Replies !
View Related
Instances
This must be one of the most frequently asked questions and you're probably all very bored with it But I tried the board's search option and it timed out again and again... so, sorry, but I really have to ask
-> I know one can create a single instance of a movieclip in a timeline and duplicate that as many times as one likes, but is there really no way to create an instance of an existing movie clip without manually adding at least one to the 'stage' during design time?
I know instancename = new movieclipname() doesn't work... but what does?
Thx
View Replies !
View Related
Instances Within Instances?
Hi,
I am trying to do something that weirdly is not working. I say "weirdly" because there's no reason to not work, once it's logical!!!
I created two mc and one button:
MC1: empty mc called "theEmpty"
MC2: mc containing a image called "theImageA" (exported to AS)
Button: called "theButton"
Then, I instantiated mc "theEmpty" within first frame of "theButton" and call its instance as "TheEmpty1".
Then, I instantiated theButton in the first frame of the timeline and call its instance as "TheButton1".
Then, I coded:
theButton1.theEmpty1.attachMovie("theImageA","theI mageA1",2);
But nothing happens, when I guess that the image should appear!!!
The weird part is that, if I instantiate "theEmpty" in the timeline as "theEmpty1" and code:
theEmpty1.attachMovie("theImageA","theImageA1",2);
it works...
What's going on?
View Replies !
View Related
Using Instances......
when i use an instance of a button or a graphic and try to change the color it changes the color of the original button or graphic as well....if i have circle buttons and want each to have a different color do i have to recreate the circles and make seperate versions for every color i want????? whats the point of instances then????
View Replies !
View Related
How To Name MC Instances?
Wud gr8ly appreciate if some1 can advise me about a better way to refer to newly created instances in the function 'Move' below:
PHP Code:
interval = setInterval(CreateBullet, maxTime*Math.random());
function CreateBullet() {
clearInterval(interval);
bulletName = "car"+bulletCount;
newBullet_mc = _root.attachMovie("car", bulletName, bulletCount);
newBullet_mc._x = startX;
newBullet_mc._y = startY;
newBullet_mc.onEnterFrame = Move;
bulletCount++;
interval = setInterval(CreateBullet, maxTime*Math.random());
}
function Move() {
if (this._y >= 318){this._y -= 1;}
}
My problem arises since all newly created instances of 'car' are referred to as 'this.'. So if I want, for example, instances whose y-position is >= 318 to move in a certain way, every other instance, whether or not >= 318, also starts moving!!: (
So...can I use "car"+bulletCount, for instance, in 'Move' in a 'for' loop to deal with only the instances I want to??
lk forward in anticipation!
View Replies !
View Related
HELP With Instances...
Help! I am starting to use actions scripting, and I am still confused as to what an "instance name" is for? I haven't been able to find any info, on what it's applications are. I tried using it on a button, "gotoAndPlay ("instance name here"); so it would play a movie, and nothing works. However it works fine if I name the frame that the movie in.
Any help would be GREAT!!
Thanks in advanced...
Stephen =]
View Replies !
View Related
Help With Mc Instances In AS3
Does anyone know if it's possible to use AS3 to give created movie clips instance names? And if it is possible, is it then possible to change the instance names of the movie clips within the created movie clip?
The reason I ask is because I have to create dynamic movie clips that have different colored circles based on RGNs. I want to do it this way so that I don't have to create 120+ movie clips for all the possible combinations.
If anyone has any good ideas on other ways to handle my problem that would be great.
View Replies !
View Related
Instances On Nav Bar?
ok i am trying to make a navigatio bar that has pretty much the same setup as the http://f-source.com/ website where when u roll over the actual button a secon bar pops up saying something like "welcome to our site"
i have on the following script on the button its self
Quote:
on (rollOver) {
_root.targetwelcomey = 90;
}
on (rollOut) {
_root.targetwelcomy = 150;
}
then i have the following script on the object that the button makes move
Quote:
onClipEvent (load) {
_root.targety = 150;
// Startposition
}
onClipEvent (enterFrame) {
diff = _root.targety-this._y;
this._y += diff/10;
}
the issue come when i put it on more then one button and object. what would be a script i would use to set up an instance? for each button because even though i have each script on a different layer when i test it and roll over the button the first one works then the rest of them will just bring the first one back up and is realy messed up.
also how do u set up a fla document to where when its ina website u don't have to click it to activate?
View Replies !
View Related
Instances Help
on (release)
{
gumball_1.play();
gumball_2.play();
}
This may be simple to you guys, but I want to separate the plays. So, when I click the first time, gumball_1 plays, but the 2nd time, gumball_2 plays, etc. Help? And thanks in advance.
View Replies !
View Related
How To Name MC Instances?
Wud gr8ly appreciate if some1 can advise me about a better way to refer to newly created instances in the function 'Move' below:
PHP Code:
interval = setInterval(CreateBullet, maxTime*Math.random());
function CreateBullet() {
clearInterval(interval);
bulletName = "car"+bulletCount;
newBullet_mc = _root.attachMovie("car", bulletName, bulletCount);
newBullet_mc._x = startX;
newBullet_mc._y = startY;
newBullet_mc.onEnterFrame = Move;
bulletCount++;
interval = setInterval(CreateBullet, maxTime*Math.random());
}
function Move() {
if (this._y >= 318){this._y -= 1;}
}
My problem arises since all newly created instances of 'car' are referred to as 'this.'. So if I want, for example, instances whose y-position is >= 318 to move in a certain way, every other instance, whether or not >= 318, also starts moving!!: (
So...can I use "car"+bulletCount, for instance, in 'Move' in a 'for' loop to deal with only the instances I want to??
lk forward in anticipation!
View Replies !
View Related
Instances
Hi anyone,
I've become stuck with a problem! I've created a drop down menu as a MC. I would like to use instances of this to create my gallery menu.The problem is that as soon as I drag the MC on stage and try to change the text which is in the button in the MC
it changes all the instances! eg: I have one gallery menu called destinations, on rollover the sub menus(england,India,south america) fly out.The second instance of this MC I would like to have with the text "sport" with sub menus-climbing,skiing ect.
What am I doing wrong :-(.Any advice would be most welcome.
Ivan
View Replies !
View Related
Instances From Swf To The Other?
I have a blank moive clip in my "Play.swf" which I've loaded my "Play_game.swf" into. The game allows the user to drag the differnt text pieces into differnt areas which are allowed by the "instance". However I can not get the target areas to be reconized by the main swf?
Here is the source code for the object to be dragged into the target.
on (press) {
startDrag ("_root.blank.pest");
}
on (release) {
stopDrag ();
if (_root.blank.pest._droptarget == "/save") {
_root.blank.blank.gotoandStop("correct");
_root.blank.score = (_root.blank.score) + 1;
setProperty ("_root.blank.pest", _alpha, "100");
setProperty ("_root.blank.pest", _x, "-200");
}
else _root.blank.blank.gotoandStop("wrong");
}
The name of the instance of the target is save? What do I need to do to get this to work in my main swft file?
View Replies !
View Related
How To Name MC Instances?
Wud gr8ly appreciate if some1 can advise me about a better way to refer to newly created instances in the function 'Move' below:
PHP Code:
interval = setInterval(CreateBullet, maxTime*Math.random());
function CreateBullet() {
clearInterval(interval);
bulletName = "car"+bulletCount;
newBullet_mc = _root.attachMovie("car", bulletName, bulletCount);
newBullet_mc._x = startX;
newBullet_mc._y = startY;
newBullet_mc.onEnterFrame = Move;
bulletCount++;
interval = setInterval(CreateBullet, maxTime*Math.random());
}
function Move() {
if (this._y >= 318){this._y -= 1;}
}
My problem arises since all newly created instances of 'car' are referred to as 'this.'. So if I want, for example, instances whose y-position is >= 318 to move in a certain way, every other instance, whether or not >= 318, also starts moving!!: (
So...can I use "car"+bulletCount, for instance, in 'Move' in a 'for' loop to deal with only the instances I want to??
lk forward in anticipation!
View Replies !
View Related
Help With Instances
Hi,
I am a newbie here and purchased a website template that has nothing but instances in the template itself and I can not understand how to manipulate them because if I manipulate one of them then the site goes all wacky on me and I am so frustrated with the way it is and would appreciate any and all help I could get with it.
I can send the source file if someone is interested in looking at it.
But the website is http://www.stephengibsonphotography.com
Any help would be greatly appreciated.
Thanks,
Steve
View Replies !
View Related
Using Instances
hello.
i have a question.
is it possible to use same same instance in different frame, or use 2 instances with same name within a frame?
when i try to declare vars for my mc instances, they work only when declared in frame in which they appear.
help?
View Replies !
View Related
Instances
Here's Basic Question...
I have a button which is a symbol. When I bring out the same button from the library and make changes to it they also occur to the orginal button. How do I get changes to only happen to the copy of the button I bring out of the library?
thanx for the time...
View Replies !
View Related
Can SmartClips Name MC Instances?
How do you set an MC's instance name using a SmartClip variable?
I've got a SmartClip (a scrollbar of sorts) that includes several levels of movie clips. I'm tracking the location of the level four movie clip (which returns the actual value of the scrollbar) and feeding it to the root level so I can use it in another clip.
I need each of the five or six instances of this SmartClip to return a unique variable (scrollbar value), but since the value is being defined from the _x position of one of the movie clips, I can't fugure out how to do this without creating either 1) several unique MC, thereby nullifying the "Smart" in the SmartClip, or 2) naming the instance I'm tracking through a SmartClip variable, so that each MC instance (that resides on the fourth level of 5-6 unique SmartClip) has a unique name. Does anyone know how to name an instance of a MC as a SmartClip variable?
Thanks to anyone who can help...
-MonkeeLove
View Replies !
View Related
Multiple Instances
I have multiple instances of the same movieclip, within that movieclip I have a button with a dynamic text box controlled by variables. I know it must be possible of controlling the outcome of the button to do different things but I just can’t work out how! Can someone help?
Have a look: http://www.pantechnicon.co.uk/laggy.swf
View Replies !
View Related
Frustration With Instances
hi, I have several movie instances on stage and in each one is a button, Ive coded the button to swap depths with a movie clip when it is pressed. It works fine but when I press it all the others(exept the first on I put on the stage) swap depth simultaneously. I want one and only one 2 swap depths when it is pressed. The instances have no names and I refer to them as this. Help please if u know what i mean
View Replies !
View Related
Variables & Instances
is it possible to set two variables as clip instance?
i have to set two variables by clickin' on two buttons and to start a movie on the second click, the movie i have to start should have the sum of the two variables as instance, how can i do it?
a lil' example to explain better:
i have a clip named: white_dog
i have two buttons:
the first one set the variable var1 as white
the second one set the variable var2 as dog
is it possible, on release of the second button, to give a play action to a clip named var1_var2?
and if i have a third button (that set a variable var3) can i keep the var2 datas and give a play action to a var2_var3 movie?
thank you very much
ciao!
View Replies !
View Related
Missing Instances
I am attempting to get a movie clip to run directly following a movie clip. I use the Insert Target dialogue box to select the next clip but ... even though the clips appear in the Insert Target Path window, when I run the movie it says: Error: A 'with' action failed because the specified object did not exist.
Here is the really weird part. It did work for a short time. I am desperate as this job has to get done.
Thanks for taking time to look at this.
Marty J
View Replies !
View Related
Changing Instances
Okay, this ones got me completely confused.
I have a long list of instances all named in the same way (ie. point1, point2, point3, point4...) Each point needs to have a different X,Y coordinate which I have stored in an array. The number of instances is unknown. What I need is a look that'll set each instance with the corresponding X,Y coordinate, but I'm having problems making the instance names change. Everything I try seems to either change the instance name it's self, or change the contents. All I want is to have it switch instances.
This is what I've got so far, which doesn't work.
i = 10;
c = 1;
while (c<i) {
duplicateMovieClip (_root.point, "point"+c, c);
c++;
}
c = 1;
point._x = point+c;
point._y = pointArray[2];
mousex = point._x;
mousey = point._y;
stop ();
arraylength = pointArray.length;
The last 4 lines just print values to text boxes.
Thanks in advance
Jim
View Replies !
View Related
Masking With Instances
does anyone know of a way to mask with mc that must be an instance...the tell target seems to get lost once u change the mc that is an instance into a mask. is there a way around this? any help whatsoever would be appreciated.. thank jon
View Replies !
View Related
Limitation Of Instances
I've searched the forum for help in modifying instances without affecting the symbol (where the symbol is a complicated MC with buttons, actionscript, text, etc). However, I still cannot find my answer. Here's my scenario:
I'm using Flash to create an online map for a town. For each building in the town, I place a Flash pop-up menu (a MC with buttons, text layer and actionscript) to display the occupant's names. Clicking on the names will lead me to another scene showing the occupant details (this is where the actionscript comes in).
Now, each of this pop-up menu will have different text layer and different actionscripts. So, if I have 100 buildings, must I create 100 symbols? It's not very efficient ain't it? Is ther a workaround?
Thanks.
View Replies !
View Related
MovieClips And Instances
If I have mulitple instances of a movie clip and the movie clip has a stop() command on the first keyframe is their anyway that I can have all the instances gotoAndPlay(2) instead of having to name each instance to do this? Thanks.
View Replies !
View Related
Targeting Instances Of A Mov In A Mov
Im loading in a SWF into a traget clip.
on (release) {
loadMovie("disk1.swf", "_root.disk1");
}
I can manage to change the color of the clip (disk1) but have so far been unsucessful at targeting the body clip within the disk1 clip.
on (release) {
diskColor = new Color(_root.disk1);
diskColor.setRGB(0xFF0000);
}
Any ideas Many thanks
View Replies !
View Related
Button Instances
Hi Again and good morning.
I have a question, I have a button in my movie, I have the onrollover action with play next frame. When I test the movie the output tells me that On events are only permitted with button instances, what the hell is a instance, I have my button named as a button why is it saying that. Also sometime the ON tag is shaded out, when I click on the help menu within the actions panel it says some actions won't work with flash 2, I am using MX. Do I have a setting wrong somewhere.
Any help would be awesome
thanks pcride_
View Replies !
View Related
MovieClip Instances
I am loading a single movie dynamically which works fine, my problem is I'm trying to position the movie using _x and _y with the setProperty function. I have no luck, here's my code:
mainClip.attachMovie("julyCal", "date1", 10);
onClipEvent(load){
setProperty("date1", _x, "30");
}
I get this error when I test it.
Clip events are permitted only for movie clip instances
onClipEvent(load){
I'm not sure what this means...... I take that back I know what it means, but this is a MC instance, is it not?
Assistance is appreciated.
View Replies !
View Related
Referring To Instances Through A Var?
Does anyone know of a way to refer to instances through a variable name?
i.e., if I have created an instance using
(where var_name = "instancename")
duplicateMovieClip(target, var_name, 1);
But now I want to immediately access the movie clip who's instance name is "instancename" (stored in var_name), but I can't just use var_name.text_name, because the AS will look for a movie clip named "var_name".
I want to name a text box "instancename" in the newly constructed movie clip, also called "instancename". So is there a way to do something like this?:
var_name.text_name = var_name;
^
|
|
do something to this so the compiler 'reads' it as "instancename" instead of "var_name"
Thanks.
Greg
View Replies !
View Related
Question About Instances?
I have a movie clip with a button inside of it. I would like to use the same movie clip to do two different actions. Unfortunately, every time I add an action to one of them, it puts it on both. Is it possible to do what I want using instances, or do I have to duplicate the movie clips and the buttons inside of them?
bulldog
View Replies !
View Related
Instances..hate Mx
Alright, i just want a simple rollout effect on my button but the code that im using just wont work. The code on the button that im using is...
on (rollOut) {
ButtonAnimation.gotoAndPlay(2);
}
ButtonAnimation is the MC that on frame 2 has a fade effect which i want to use for my rollout on my button. Am i missing something in there?
Here's the FLA, any help would be greatly appreciated..
http://www.angelfire.com/al2/PhoenixAD/website.fla
View Replies !
View Related
Sound Instances
is it possible to initialize an instance of a sound and give it a reference to a swf movie containing just sound? as in:
mysound = new Sound();
mySound.attachSound("sound.swf");
i know that what is in between the quotes is only a label, and an external file would most likely be loaded into a level other than root. i ultimately want to use volume control on the swf file.. maybe there is another way of doing this; other than how I have envisioned?
thanks for looking,
-phlanagan@hotmail.com
View Replies !
View Related
I Need To Know The Names Of My Instances ...
Hi!
This maybe a small problem, but I really don't know how to do it. I need to put different variables in an array. I have 20 different checkboxes. When I click checkbox number four I want to put a value in the fourth place in the array and when I click checkbox number six I want to put a value in the sixth place in the array and ... well, you get the picture(?)
Each checkbox has its place in the array so I figure I have to get the name of the checkbox to make the change in the right place in the array. There must be a way to write a function that works generically for every checkbox. Do you know how?
Thanx
/
View Replies !
View Related
Movie Instances
hi,
i'm trying to achieve an effect where 5 orbs come from different directions to meet in the center.
So far, the method i used was to create a movie Clip of a ball floating in (along a motion path) which was fine. Then i want to have 4 more copies, but each from a different direction. I just made 4 new movie clips and rotated the path and changed where the ball started.
However this is inefficient so i was just wondering, how do i edit a movie clip instance without the original from the library being changed? if i can't, what's the best way to do it...
thx
Stuart
View Replies !
View Related
Name Of Instances And Arrays
I have a movie clip that I create dynamically with a push of a button. I want to set the properties of each movie clip differently and the only way that I can control these movie clips is if I use the actual instance name of the movie clip inside my code. However, for convenience, I added the instance name into an array as I dynamically create these movie clips, but when I do this, I cannot access the properties using an array that's holding the instance name of the movie clip in it. Any ideas why? Are there any special restrictions when using Arrays in flash that are undocumented?
for example....
duplicateMovieClip(_root.labelLesion, "labelLesion"+l_no, l_no+120);
setProperty ("labelLesion"+l_no, _x, x_position);
setProperty ("labelLesion"+l_no, _y, y_position);
lbl_lesions[l_no].l_num.text = inputLesion +"%";
will not work!!!!!
however, if i do this ....
duplicateMovieClip(_root.labelLesion, "labelLesion"+l_no, l_no+120);
setProperty ("labelLesion"+l_no, _x, x_position);
setProperty ("labelLesion"+l_no, _y, y_position);
labelLesion1.l_num.text = inputLesion +"%";
and this works!!!
I want to be able to use the array though. It's a lot cleaner and is less work.
l_no = a number
labelLesion = a movieclip with a textbox named lnum in it. lnum will display whatever the inputLesion variable contains.
inputLesion = a number
Please help, I've been pulling my hair out all day!!!
View Replies !
View Related
Pictures To Instances...
hai peoples,
i was reading one of the tutorials on this site, and it involves changing images into instances so that you can modify the alpha and things with them..
can someone tell me how to do this? (changing the image to an instance that is)
thx
View Replies !
View Related
Two Instances Of The Same Thing Look Different?
I have 2 MCs on the stage. Each one has an instance of the same button in it. However, the button is shaped a little different in each one.
In the first MC, it looks a little taller than it should. In the second MC, it looks a little wider than it should.
I checked both instances of the button to be sure that one (or both) of them weren't stretched, and they weren't! The dimensions of both instances are exactly the same!
I thought that maybe it was just some pixelation making it look different between the two, so I tried moving them around with NO change.
What in the world could be causing this???
Thanks!
Lee
View Replies !
View Related
|