List Of Movieclips
Hello Members,
I am using Flash MX 2004 to create a chat application.
I have to display list of user as
[IMAGE] [USERNAME] [IMAGE] [USERNAME] [IMAGE] [USERNAME] [IMAGE] [USERNAME]
I am creating movieclip dynamically for each element of list inserting them in a new movieclip
Now i want to show profile of user on rolling over on user name in list
Can any body suggest how to dynamically add rollover listener on each element(movie clip) of list
Thanks in advance
Manish
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Apr 13, 2006, 01:26
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[CS3] Simple Display List Problem (MovieClips In MovieClips)
I have an object called UI_Total which contains 3 objects called Star, instanced as star1 star2 and star3.
In my code I do the standard:
PHP Code:
mainUI=new UI_total;
addChild(mainUI);
to instance the UI_Total.
Now, I can do something like
PHP Code:
mainUI.star3.x+=500
no problem.
And when I do
PHP Code:
trace(mainUI.star3.parent)
I get [object UI_Total] as expected.
Would someone be so kind as to explain to me then why
PHP Code:
mainUI.removeChild(star3)
doesn't work, and also why I can't do anything like
PHP Code:
mainUI.getChildIndex(star3)
Remove List Of Movieclips
i have an array containing the instance names of various of movieclips
can i use this array to remove them all at once? like a reset button?
List All Movieclips On Stage
I saw a bit of code a few days ago but hand no luck searching for it.
It displayed all movieclips on the current timeline.
might have been a for a in ... kind of deal
anyone know what i'm talking about?
fgf
Trying To Set Up A Menu List W/ Movieclips
Hello everyone,
I have a plan to set up a mouseover menu box and have put the beginnings of it here:
My attempt on a mouseover menu box
in this Flash file, I am trying to setup the menu using a movieclip with embedded buttons. The buttons don't work and I think the buttons are not working because of the link that activates the movieclip in the first place---it seems to override the embedded button.
I figured it out! Thanks anyway!
Edited: 03/14/2007 at 08:21:36 PM by Flashhorse
How To : Use Mutliple MovieClips As A List
hello all,
I'm looking for a way to create a member list for my site.
Each membername will be a copy of my template MovieClip, creating a list of names. The names and info on each member will come from a php page thanks to the LoadVars function.
How can i duplicate a MovieClip n times, n being the number a members (variable) given by the php page ?
How can i make the movieClips go under each another?
I hope it's clear, i'm sorry my english isn't too good.
Thank you alot for your help !
Get A List Of MovieClips On The Stage
Hello All,
I was wondering if there was a way to get a list of all MovieClips on the stage and attach a simple script to them.
Actually I would need a list of MovieClips on the time line of another movieclip(that's on the stage).
Joe
Using A List To Display Movieclips...[MX04]
guys, thanks for the help, and please excuse if this has been covered before...
I have 2 movieclips, both set to not be seen when the movie loads with this:
_root.pressDenise._visible = false;
_root.pressDose._visible = false;
now, I want to have a list component that when I click on the first entry the first mc will show, and when I click on the second, the second will show (and not the first), so only one movie clip shown at a time, based on where I click in the list. I also wish to have more entries in the list later. the _visible = false works fine, but I really have never used a list, so specific instructions in newbie terms and exact locations of actionscript would be much appreciated. I know I can put entries in the data or labels parameters of the list, but not much more. I guess my ultimate eg is that I put 'pressDenise' and 'pressDose' in the labels, then I'm lost...
thanks!!
chris j
[F8] List MovieClips In 'a Table' Of 3 Rows, Can I Do This?
Hi
Can I list XML data in this order.. Start listing in X 3 movieClips of 100px each and the next ones start listing below.. So, basicaly I want to add XML data in rows of 3 insertions each..
Example:
DATA | DATA | DATA
DATA | DATA .. ..
.. .. ..
Clear enough? Don't think so.. I can make a draw if anyone caring to help wants..
Thanks!
1 List Item Control Several Movieclips?
Hi...
Check out www.expocadvr.com/new/default.html
I have an exhibitor list that loads from xml...and I have a booth layout that loads from a separate xml...I have two arrays set up so that the rented booths are stored first, and the exhibitors are stored in a separate array side by side...
if you click on an exhibitor in the list you will see the associated booth highlight in the mainwindow (and minimap too)...however if you notice, there are multiple entries in the list for some exhibitors, this is because they may rent several booths...I want to condense the exhibitor list to have one entry per exhibitor, but have the entry control all their booths, so if you click an exhibitor with 2 booths both of them would light up even though there was only one entry in the list...is this even possible with the list component provided by flash? if so can anyone point me in the right direction?
thanks,
Paul
How To Get A List Of All The Child Movieclips Of A Movieclip
Hi!
I was wondering how I could get a list of all the movieclips inside a given movieclip.
For example, suppose I have two instances of a ball movieclip: ball1 and ball2. These movieclips are inside another one named balls.
Is there any method you could call on the movieclip balls that returns a reference to an array or object that with all the movieclips inside it (in this case ball1 and ball2).
I know I can use balls['ball1'] to reference one of the movieclips, but balls.length or balls[0] does not work.
1 List Item Control Several Movieclips?
Hi...
Check out www.expocadvr.com/new/default.html
I have an exhibitor list that loads from xml...and I have a booth layout that loads from a separate xml...I have two arrays set up so that the rented booths are stored first, and the exhibitors are stored in a separate array side by side...
if you click on an exhibitor in the list you will see the associated booth highlight in the mainwindow (and minimap too)...however if you notice, there are multiple entries in the list for some exhibitors, this is because they may rent several booths...I want to condense the exhibitor list to have one entry per exhibitor, but have the entry control all their booths, so if you click an exhibitor with 2 booths both of them would light up even though there was only one entry in the list...is this even possible with the list component provided by flash? if so can anyone point me in the right direction?
thanks,
Paul
1 List Item Control Several Movieclips?
Hi...
Check out www.expocadvr.com/new/default.html
I have an exhibitor list that loads from xml...and I have a booth layout that loads from a separate xml...I have two arrays set up so that the rented booths are stored first, and the exhibitors are stored in a separate array side by side...
if you click on an exhibitor in the list you will see the associated booth highlight in the mainwindow (and minimap too)...however if you notice, there are multiple entries in the list for some exhibitors, this is because they may rent several booths...I want to condense the exhibitor list to have one entry per exhibitor, but have the entry control all their booths, so if you click an exhibitor with 2 booths both of them would light up even though there was only one entry in the list...is this even possible with the list component provided by flash? if so can anyone point me in the right direction?
thanks,
Paul
Adding/Moving Dynamically Added MovieClips To Display List
I'm stuck in my pursuit of transitioning from AS2 to AS3...
I have a little app that loads in xml and populates a list component on the stage. It is an elearning user interface in which the content is all loaded dynamically via the xml file. All of the content and title/subtitle is working fine. But the problem is with one last feature I want to add...
I have in the library a movieclip that contains just a simple orange box. I set it's linkage to 'ProgressIndicator'. I then, in the code, loop through the number of topics in the list component and for each topic in there I add an orange box (ie, ProgressIndicator) to the stage. This works fine. But the problem is I can't then change any properties of any of the progress indicators. What I want to do is, as the user progresses through the course, as they go through each topic I want to change the alpha property of the corresponding progress indicator on stage. Hopefully this makes sense. Here is a picture of what I'm aiming for:
Here is the code:
Code:
//Store total number of topics (zero-based so deduct 1 to get real num)
var totalTopics:Number = -1;
//Store reference to current progressIndicator
var currentProgress:MovieClip;
//render the number of topics on screen for user to see their progress during module
function renderProgressBar():void {
//Module progress - for each 'topic' in the listbox add an OrangeBox instance to the stage then highlight progress
//ref to right-hand side of status bar
var xStart:Number = 969;
var yStart:Number = 80;
//create and instantiate progressIndicators on stage based on totalTopics
for (var i:uint=0; i <= totalTopics; i++) {
var progressIndicator:MovieClip = new(ProgressIndicator);
//render the progressIndicators on stage
addChild(progressIndicator);
//change its name to correspond to topic number (zero based!)
progressIndicator.name = "progressIndicator"+i;
//position it
progressIndicator.x = xStart;
progressIndicator.y = yStart;
//add space for next indicator
xStart = xStart - 15;
}
//set first progressIndicator's fill to 'in progress' color of orange
currentProgress = this.progressIndicator0;
currentProgress.alpha = 0.5;
}
The progress indicators are rendering on stage fine and in the right place, but they are not referenceable via the 'progressIndicator0' or 'progressIndicator1' etc names that I *think* I've assigned them. Help!
Load Xml Data(list Of Names), Use List As Buttons In Flash Possible?
Hi, basically I have a quiz game that I made, the quiz is done but I want to keep track of how many times a person has failed the quiz. I have an XML file that has a list of names. I want to take those names, put them in a quiz game (at the beginning) as a "list" of some sort and let the user be able to choose their own name (which is of course already in the XML file). This name will be used to keep track of how many times they have tried the quiz.
I have successfully loaded the XML file (names) into an ARRAY in Flash but how can I output them to the screen AND let the user be able to choose those from the list? as a button? This will add the count after they clicked their name to +1 and then save it to somewhere(where is best?). I will attach the zipped files (there are 4, the fla,swf,2 XML files[quiz/names]). If anyone can help me ASAP it would be awesome.
Chnage The Font Of Selected Item Color In A List Mx:List
Hi,am Trying to change the font (bold and color) of a selcted item in List..But it is changing the complete list's font..
Here it is my code..
<mx:List id="businessFunctions" left="10" right="10" bottom="10" top="208"
dataProvider="{processList}"
itemClick="select();"
horizontalScrollPolicy="auto"
labelField="@name"/>
ActionScript COde:
private function select():void
{
businessFunctions.setStyle("textSelectedColor","#D 3E9F5");
businessFunctions.setStyle("fontWeight","bold");
var page:XML = businessFunctions.selectedItem.page[0];
var pageID:String = page.@id;
var processID:String = businessFunctions.selectedItem.@id;
server.submit(pageID, processID, RequestMessage.BEGIN);
}
Here i need toc hange the selected item color only..
Separate The List Items With The Separator And List Is Dynamic
Hi,
I am getting the list items dynamically ,and hv to draw a separator after the every group of list items.For this I have to embed a script function after every group.How can i do this Actionscrip 3.0 Any help?
Ex:
Group 1:
ABC
DEF
GHI
TODO-----Here we need to draw a line
Group 2:
123
456
789
TODO-----Here we need to draw a line
Group 3:
abc
def
ghi
Here I have da code:
for each(var group:XML in event.responseMessage.rawXML.group)
{
var pageSection:PageSection = new PageSection();
pageSection.text = group.@name;
pageContents.addChild(pageSection);
trace("***********Group Name: "+group.@name);
// once the section has been added, iterate through it's children and render each field.
// for each(var field:XML in server.currentPage..field)
for each(var field:XML in group.field)
{
var formElement:FormElement = AppCode.FieldRenderer.renderField(field, pageSection);
/* check for null, if for some reason we encounter an unknown control type
* the formElement will not be instantiated so we should skip over it.
*/
if(formElement != null)
{
/* formElement.field = field;
pageSection.addChild(formElement); */
formElement.setRuleDetails = this;
formElement.communicator = this.communicator;
if(event.responseMessage.pageType == PageType.UPDATE || event.responseMessage.pageType == PageType.ADD )
formElement.readOnly = false;
fieldList.push(formElement);
}
}
//Add Separator b/n groups
TODO...Here we need to call a function which draws a line.....}
Plz help me if u have any idea?
Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!
What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.
Can anyone assist please,
Thanks,
Stephen.
Converting Bulleted List To Numbered List
I'm trying to put out a list of questions for a test. I'm also using a stylesheet to format the way the text is displayed. This is the way the list should look like:
1. question#1 text.............................................. ......
2. question#2 text.............................................. ......
If more than one line of text per question, it continue on the next line indented. The text for each question needs to be looking like a block of text. The same way a bulleted list displays.
This format can be created by using the <ol>, <li> tags in HTML. But Flash doesn't recognize any style formats for the <li> tag. Only a bulleted list is printed out. How can I format that list into a numbered list? or if not how can I create the same output, keeping in mind that I have to use a stylesheet? Thanks.
Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!
What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.
Can anyone assist please,
Thanks,
Stephen.
(Flash MX Or 8) List/List Component Issues
Hello all.
I recently completed Kirupa's "Creating a Listbox" tutorial, (http://www.kirupa.com/developer/mx/listbox.htm) but have been having a difficult time modifying the event attributes of each list item. Basically, I want to click on an item and have an object on the stage move to a unique xy coordinate. I can get the object to move already (object._x = object._x +10, but unfortunately ALL items on the list execute this script command. I've tried fooling around with the code to get each item to do a unique movement but...well, clearly I haven't succeeded yet.
I'm a Flash nooby and help in the form of specifics would be greatly appreciated. If you can provided modified code from the tutorial to move an object to a unique positions that's even better.
Thanks.
David
List Component. Help. Looked Everywhere. Button And List.
Trying to use a list component and a button. When user selects something from list component and clicks button it takes them to new page, if user doesnt select something from list and hits button, (this is where my question lies) I want it to do nothing and setFocus to list component.
Here is how I am going about it now: New if statement (however it still transfers user if nothing is selected from list component) How can I get it to not transfer? I have tried rewritting this many ways, searched all over the nets, and Nada.
Code:
var arUrl:Array=["/browsecategory.aspx?cat=1","/browsecategory.aspx?cat=2","/browsecategory.aspx?cat=3","/browsecategory.aspx?cat=4"];
var provider:Array=[{label:"Option 1",data:0},{label:"Option 2",data:1},{label:"Option 3",data:2},{label:"Option 4",data:3} ];
mcList.dataProvider=provider;
var obj:Object={};
obj.click=function(eo:Object)
{
var count:Number=mcList.selectedItem.data;
getURL(arUrl[count],"_blank");
trace("count="+arUrl[count]);
}
but.mcSubmit.addEventListener("click",obj);/////here is where I am sending off
if(mcList.selectedIndex == undefined) {
setFocus.mcList;
}
So this thing works perfectly, however if user hasnt selected anything how can I get it to not transfer and setFocus?
I have tried setting if to check it for - 1 (since starts at 0) set to 0? Any ideas please help. Thanks in advance MT
'list' Event Of List Component
oops i mean 'change' event of list component
Hi guys/gals. Ive made an xml/list component driven mp3 player as can be viewed at http://www.flashmatics.co.uk/blog/sa...mp3player.html
When someone selects a new song from the list that songs starts to play. Everything is working fine.
I now want to add an extra bit of functionality i.e When one song finishes i want the next song to start playing. But this means I have to tell the list component that a change has occured as well (even though there has been no user interaction to cause this 'change'). How would I go about this. Here is a snippet of relevant code.
Code:
mySound.onSoundComplete = function():Void{
//from here i need to tell the component a change has occured and to move it
//to the next song in the menu
}
//create a listener for the list component
var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);
compListener.change = function(info:Object):Void{
//how do i get this to move to the next track?
}
Thanks for any help in advance. I dont actually need the whole code or anything but rather a point in the right direction..cheers
HELP Symbols List To Text List?
Is there a way to get a list of all the symbols in the library into a text file quickly and easily?
Thanks in advance!
-Ted
Loading XML List Into RMP List Component
I have several XML lists to load into a RMP List Component List Box.
I was told the code should be like:
myButton.onRelease=function(){
myList.load(String(search.text));
}
So I made a button and named the instance "myButton"
Add the list component called "myList"
The XML files are named test1.xml, test2.xml etc.
I tried variations of:
myButton.onRelease=function(){
myList.load(String(test1.xml));
}
Result....
Nota
I think I may need a Listener or I am not sure...
Can anybody please advise me what I am doing incorrectly?
Referencing MovieClips Inside MovieClips From The Main Time Line?
is it possible to have event listeners that listen for a movie clip inside a movieclip and then execute a function from the main time line?
Or is it impossible to relate something this far removed? Sounds like a geek Jerry Springer episode!
Something sort of like this:
Attach Code
movie1_mc.closeBtn1.addEventListener(movie1_mc.MouseEvent.CLICK, closeMenu1);
movie2_mc.closeBtn2.addEventListener(movie2_mc.MouseEvent.CLICK, closeMenu1);
function closeMenu1(e:Event):void {
if (e.currentTarget.name == "closeBtn1"){
movie1.gotoAndPlay(27);
movie1.visible = true;
} else if (e.currentTarget.name == "closeBtn2") {
movie2.gotoAndPlay(27);
movie2.visible = true;
}
}
Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..
I have been working on this project that used part of the kirupa.com tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)
Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.
Here is a chunk of my code:
Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}
"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.
Thanks...
EDIT:
I got it working.. I just had to add "_root.movieclipname." in front of the movieclips I referred.
Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..
I have been working on this project that used part of the kirupa tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)
Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.
Here is a chunk of my code:
Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}
"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.
Thanks...
RollOver Scripts On Movieclips In Movieclips With RollOvers
Hi,
This might get a little confusing so I'll try to explain clearly.
Basically, in Scene1 I have a colored rectangle movieclip with a rollover script that activates its animation e.g. on(rollOver){this.gotoAndPlay(2). That works just fine in activating the rectangle animation,which is just an alpha and tint change.
Within the rectangle movieclip symbol is another movie clip consisting of text graphics that has a similar rollover script placed within its instance within the rectangle symbol.
First of all, this rollover script will not activate when moused over, though the rectangle effect change does.
When I set the text movie clip as a button and place it within Scene 1 rather than within the rectangle symbol, the rollover does work, but it performs a rollOut of the rectangle movieclip. Even though the text button is directly on top of it, the rollOut occurs with the rectangle movieclip when the text button is rolled over.
So maybe you can see what I'm saying here. As part of the first movieclip, an embedded rollover script won't work. As a button placed on that movieclip, the button rollover state interferes with the movieclip rollover script.
I'm sure somebody has encountered this. If I haven't thoroughly confused you, hopefully some charitable soul will help me out.
thanks
List's "CellRenderer_upSkin" Displays In List Items (BUG?)
Hi Everyone,
I'm having a huge issue with with the CellRenderer_upSkin displaying on the a list component's items:
http://www.davestewart.co.uk/temp/combobox.gif
It's supposed to display a border round the entire list, but bizarrely, it's also used for each of the list elements... so effective end result is that the up state has a huge border.
I'm sure this shouldn't be happening. Has anyone else seen this behaviour?
This is my first production job using AS3, and I'm falling at the first hurdle which is very annoying.
Cheers for any help,
Dave
Movieclips Within Empty Movieclips...problems
Okay, I'm doing a band web site for my brother and I'm running into this problem...
I want each of the links to be a separate flash file. I understand how to do that and have basic ones working. I have empty movieclips and use the loadMovie function, i.e.
Code:
on(release) {
loadMovie("shows.swf", "shows");
}
The thing is though, the shows.swf file has a textbox which is inside a movieclip which loads an external text file (this is so that they can update the site easily themselves). When I just double click the shows.swf file myself, it opens in the flash player correctly, but when I try to open it from the main.swf file, the shows.swf file loads, BUT the text doesn't appear in the textbox(which is in the movieclip). The movieclip which holds the textbox has an instance name of textbox. I can give you guys the two files if you want to see more if it will help you give me a solution to this problem. I thank you for your time and hope someone can help me.
Michael
Removing Movieclips, Alot Of Movieclips
through a duplicateMovieClip action, i created about 200 mc's named "circleMovie1", "circleMovie2", and so on.
now, how can i delete all these mc's without typing out 200 "removeMovieClip" actions?
plz help!
Movieclips Inside Movieclips Problems
hi.
i have a mc called question13 which holds a number of other mc's inside it on the 12th frame, called tick1-tick6. each of these acts as a simple radio button with the following code (for tick1)...
on (release) {
if (_root.tick1select == 1) {
_root.question13.tick1.gotoAndStop(1);
_root.tick1select = 0;
}
else {
_root.tick1select = 1;
_root.question13.tick1.gotoAndStop(2);
}
}
These work fine as they are.
but i need to set the tick1 to look as though it is "ticked" (ie at frame 2) from the main timeline, not within question13, how do i do this?
Movieclips Play Sounds Of Other Movieclips...
I made a very simply movie comprising of 6 movieclips with sound that play when you press the corresponding key. The top 3 clips play fine but the bottom three play the sound or sounds from previous clips.
also the huskey clip will play when you press either enter or space but it should only be played when you press space. (I was thinking that enter is reserved for playing movies or something.
Thanks for all help.
im using Flash 5
My .fla in a zip file -can be downloaded here...http://www3.telus.net/seanc007/MC_Test.zip
(Too big to be attached)
Checking Distance Between Movieclips Within Other Movieclips
I'm not sure if there is a really quick & dirty way to do this, but I have some movieclips, which are nested within another movieclip, and I'd like to write some code that will return which one is closest to a movieclip on the main timeline. Since there _x's are entirely different because they're not in the same movieclip - is there any way I can make this work?
Thanks!
Target Movieclips From Nested Movieclips...
All,
I was wondering if you could give me a hand?
I have a file that contains two movieclips. One movieclip contains a container clip and the other movieclip contains two nested movieclips which end up with a button. Please see diagram...
I would like for the button, when clicked, to load an external .swf file into the container movieclip which is nested inside a _root movieclip. See diagram...
I have used the following code on my button to no avail:
Code:
loadMovie("Flash/homeIMGs/image1.swf", _root.mainImageMC.imageMC);
AND
_root.mainImageMC.imageMC.loadMovie("Flash/homeIMGs/image1.swf");
Please help.
Movieclips As Buttons Embedded In Movieclips
Hi,
I have a couple movie clips embedded inside a main movie on the root of my movie.
i have an action onRollover applied to the main movie clip, which triggers actions on the movie clips inside it.
i want to use the child movie clips as buttons, but i am getting no response to the code below:
ActionScript Code:
this.mcPic.onRollOver = function() {
trace("rollover");
_root.mcPic.btnBuy.xSlideTo(135, .5, "easeOutBounce");
_root.mcPic.btnListen.xSlideTo(105, .5, "easeOutBounce");
}
this.mcPic.onRollOut = function() {
trace("rollout");
_root.mcPic.btnBuy.xSlideTo(360, .5, "easeOutBounce");
_root.mcPic.btnListen.xSlideTo(-91, .5, "easeOutBounce");
}
// the following code here gives no response.
this.mcPic.btnBuy.onRelease = function() {
trace("click OK");
}
this.mcPic.btnListen.onRelease = function() {
trace("click OK");
}
any help would be appreciated.
thanks!
eric
Getting My Buttons Active When Movieclips Are Within Movieclips
Ok so I have this site in progress with these neat drop down menus. When you rollover the image, two or more choices appear that link you to other pages. Only when you rollover them, the buttons don't work. The buttons work when you isolate each movie clip. But once I place the movieclip in the main time line, the buttons don't work anymore. The rollovers don't happen. They aren't clickable.
I need to know how to tell flash to make these buttons work. I can do this if a button is in the maintime line but not when it's embedded in a movieclip which is then embedded in the main time line. Get it?
I uploaded the work in progress so you can see what I mean. www.stephanieerdel.com/headermov.swf
rollover "Vibrations" and you'll see the choices pop up. In the movie clip each choice changes color when you rollover it. As mentioned before, when I put the clip in the main timeline, the buttons don't work. but you see them and the movie clip works fine.
If someone can write out what the code is to let flash know to make these buttons work, I would appreciate it soooo much.
Thank you!
-Stephanie
Calling Other MovieClips Inside Other MovieClips
The problem I am having is a little moe signifcant than what the titles suggests.
What I am trying to do is to determine whether a movieClip, which is nested inside another a movieClip hits another moviceClip, which, you guessed it, is inside another movieClip.
Something along the lines of this:
Code:
onClipEvent(enterFrame){
if( _root.character.charNose_mc.hitTest( this )){
_root.character._x -= _root.char_speed;
}
}
Obviously this code is not working. The movieClip the hitTest( this ) is referring to is inside another movieClip. And charNose_mc is nested inside character at the root level. As you can tell, the goal of this code is to move the character movieClip in a negative direction using a predefined variable called char_speed.
Any ideas on what I am doing wrong, or what is the proper way to format this code? Thanks!
Why Do Movieclips Inside Movieclips Have Different _x And _y Than The Timeline?
I'm confused, why does a MC inside another MC have different _x and _y values than the main timeline?
What I am trying to do right now is animate a MC inside another MC then get the main MC holding everything to move where that new MC ended animating at (it's part of a game I'm making.)
I know it's confusing but Flash shows the cursors current X and Y in the info panel, which is the same as the main timeline. Yet inside the movieclip, an x of 76 and a y of 277 on the timeline is -195 and -30.9 (respectively) inside the MC.
How do I fix it so I can get the _x and _y values to match up so I can tell the main MC to reposition itself to the new X and Y (of the inside MC)
MovieClips Inside Other MovieClips - Detecting All
I have a movieclip called mapWindow, inside mapWindow are dynamically created movieclips of various sizes. The movieclips inside the mapWindow don't take up the entire space of the mapWindow and thus I use a startDrag on the mapWindow upon detection of a mouse press. The problem is, I don't want the start drag to start if the mouse is detected over any of the child movieclips inside mapWindow.
I have a few ideas of how to proceed, but I'm not sure how to reference all child movieclips of a particular movieclip - or something along those lines.
It would be easy to use the hittest function if I knew how to reference all the movieclips I need to, but alas...
Thanks in advance.
Calling Other MovieClips Inside Other MovieClips
The problem I am having is a little moe signifcant than what the titles suggests.
What I am trying to do is to determine whether a movieClip, which is nested inside another a movieClip hits another moviceClip, which, you guessed it, is inside another movieClip.
Something along the lines of this:
Code:
onClipEvent(enterFrame){
if( _root.character.charNose_mc.hitTest( this )){
_root.character._x -= _root.char_speed;
}
}
Obviously this code is not working. The movieClip the hitTest( this ) is referring to is inside another movieClip. And charNose_mc is nested inside character at the root level. As you can tell, the goal of this code is to move the character movieClip in a negative direction using a predefined variable called char_speed.
Any ideas on what I am doing wrong, or what is the proper way to format this code? Thanks!
Targeting Movieclips In Attached Movieclips
I have a movieclip that is linked with the name sound1. Inside this movieclip is another movieclip, a loadBar, that when I place on the mainstage, functions fine. I want the loader to be in the attached MovieClip. I'm having issues with targeting though:
ActionScript Code:
rotateMenu.onRelease = function() {
mySoundLoading = 0;
myNewMovie = attachMovie(mybounce, "holder", this.getNextHighestDepth(), {_x:182, _y:125});
this.myNewMovie.loadBar._xscale = mySoundLoading;
trace(this.myNewMovie.loadBar._xscale);
trace(mySoundLoading);}
My first trace comes up undefined...the loadBar doesn't function.
I've tried targeting this.holder.loadBar._xscale.
I've tried targeting without this.
I've tried targeting the name of the linked movie:mybounce....
How do I get to the loadBar within my attached movie??
Thanks.
AS3 - Reading Movieclips Inside Movieclips
hey all. i'm such a noob when it comes to AS3 but i'm determined to learn.
i've had to drop out of strict mode to make this work. can someone tell me why? i've a feeling it has to do with casting maybe. this is in an .as file and not on timeline.
trace(getChildByName("box1").playerStats.x);
in strict it throws up "1119: Access of possibly undefined property playerStats through a reference with static type flash.displayisplayObject."
yet trace(getChildByName("box1").x); works just fine.
also i want to refer to it dynamically with "box"+i. do i use this["box+i].playerStats.x?
edit: trace(getChildByName("box"+playerPos).playerCards.x); seems to work ok!
help!
List Box To Control A List Box
hi guys and gals...here is my doubt...
// Sets the change handler for the Component named 'dropDown'.
listBox.setChangeHandler("SelectItem");
}
// This is the Change handler it tells the the movie what to do when someone clicks on an item.
function SelectItem(){
DataBox= listBox.getSelectedItem().data;
}
the above code is for the listbox change handler to display the code of an item whose clicked in the listbox.....heres what i want to do ....i want this item which is clicked to again query the msaccess database and return results from another table into a second listbox......
for eg...when blue is clikced in a listbox1..it should return types of blue in a second listbox2....pls help me to achieve this ......
thanx in advance
Targeting Movieclips From Movieclips
I just moved up to Flash MX from Flash 4 and the dot notation is killing me.
My goal is to target one movie clip (mc2) and play a certain frame(lable1) from a button on another movie clip. Normally, I would do an "on release, tell target" and everything would be grand, but my dot notation isn't working properly. It works on the first click but intermittently on further clicks. My code on the button is:
on (release) {
_root.mc2.play(lable1)}
The first time it plays the right lable, the next time I click it plays the next lable on the timeline, next click it jumps to another lable-all within mc2 at least. Each label has stops so that isn't the issue (i don't think)
Is there a better way to do this? Why is this so hard!?!
Controlling Movieclips Within Movieclips-help
i need to tell a movieclip to play but it seems like it won't work becos this MC is embedded within another MC.
it goes like this:
MC1 calls MC2, and within MC2 i need to call out *another* MC (let's call it MC3) with buttons that will call out other MCs. On each button on MC3 i've put this code:
on(release) {
this.gotoAndplay("mymovie");
}
when i publish to movie, the link is active but there's no response when i click on it.
what went wrong?
|