ActionScript 3.0 :: Why Won't Container Empty
May 21, 2011
i open a box which has selecable text init and when that is clicked it closes the first box and opens the next. but the container will not empty when the close button is clicked. i use the same method on about 6 other items and all work fin. the 1st box closes fine but the 2nd wont any 1 no y. here code
[Code]....
View 9 Replies
Similar Posts:
Jun 17, 2009
I'm working with a window scroller component, where the dynamically loaded scrolling content has buttons that load attach mc's to a clip holder in front of the window scroller. To do this I use this bit of code, which works fine:
Code:
calendarPagesBtn_mc.onRelease = function(){
_level0.slideHolder_mc.attachMovie("calendarPages", "calendarPages", _level0.slideHolder_mc.getNextHighestDepth());
this.enabled = false;
};
The "this.enabled=false" is to deactivate the button in the scroll content, otherwise it will still be active in the background. So far so good.
What I need to do, once the "close" button on the attached mc is clicked, is re-enable the button. I'm thinking the way is to check if the attached mc has been unloaded, which I'm trying to do with this:
Code:
if (!_level0.slideHolder_mc.content)
this.calendarPagesBtn_mc.enabled = true;
View 0 Replies
Oct 1, 2010
I'm trying to somehow target a MC being loaded into an empty container MC. I've tried everything I could think of.
Basically, I'm making a movie editor. Right now clips are added to the stage on initial load, then when they are clicked on they are added to the "reel" and they can be previewed in the order that they are added. Now, I'm trying to get it so that when they are on the "reel" they can be click and dragged and rearranged.
Here's how the clips are added to the stage in a function called loadClips():
ActionScript Code:
addChild(clip1);
clip1.name = "1";
Here's how they are being added to the "reel" in addClips():
ActionScript Code:
if (currentTarget.name == "1")
{
clipCopy = new Clip1();
[Code]....
Now, I just want the clips that are on the reel to be click and drag-able (along the X axis but I'll worry about that later). I realize now they're all being added as clipCopy. That's going to be an issue huh? Is there a way that I can target the container and make that mobile?
View 2 Replies
Jun 19, 2009
Rather than typing out each child to add to a container mc, I wish to use a for loop to do so. However, in AS2, when adding an instance of an object, I could specify a unique name based on the current number of the loop. In AS3, I dont know how to even give the same object a unique name if multiple versions a re being pulled from the library to the Stage!
See this step of basic code:: and perhaps someone may have an obvious point to make about the differences of standard procedures, moving from AS2 to AS3::�
Code:
var container:MovieClip = new MovieClip();
var wing:MovieClip = new MovieClip();
addChild(container);
[Code]....
View 1 Replies
Oct 21, 2009
Is there a simple way to completely empty a display object container regardless of what it contains, including if it's already empty? In other words, without determining its children and using removeChild on each?
View 2 Replies
Jan 6, 2009
I have a main SWF with an empty MC holder and all of the main navigation button on actions. When the buttons are clicked it then loads an external SWF into the empty MC. I am having trouble telling the button to load the movie once and then stop loading if someone clicks on the link again. I want to prevent someone from double clicking to cause the animation to blink. *rapidly click on "home" to see what I mean.
[URL]
All of my button actions look like:
home_btn.onRelease = function(){
loadMovie("images/6661_home.swf", _root.dropzone);
}
I have read numerous threads but for some reason can't find a fix for this.
View 5 Replies
Apr 7, 2011
I have a button on stage which has a child menu movieclip and that movieclip has three submenu button children.On each of these 3rd level buttons an event listener draws a new container on the stage and adds a new movieClip holding various info.This all works nicely, but I cannot work out a way to get an eventListener on the menu buttons to check if the container already exists so I can then stop the button repeating the add container function. So, at the moment you can repeatedly hit any of these menu buttons and they will just continue to add info movieClip children.I've tried some nice Boolean commands that should work, but I think it's the nesting of the children/relationships that are not allowing me to get this to work.So, basically for arguments sake, let's say I only have one of each item... here's the nesting of children:[code]
View 14 Replies
Feb 26, 2005
i have a little problem with the unloadMovie command. i have a button which is mc2_about here is the code
[Code]...
where i want to unload level1 which is a scrollbar with a text and load the portfolio section in an empty container... my structure i want to load in an empty container the swf's of the main navigation (home- portfolio,etc) and the sub-menus of it's categories[about me-print-web design) into levels. is there a simpliest way of doing that?
View 3 Replies
Jan 11, 2004
I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following
[Code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
[Code]....
View 4 Replies
Mar 3, 2009
I have a list of 99 item (something like a phone book) and I will like to sort them in different method. Part of the 99 item might be empty, so the requirement is to move the empty field behind the sorted data in every sorting behavior, here the code we have so far:
[Code]...
View 1 Replies
Jul 2, 2011
In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.
If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.
Anyway so, at the top of my itemRenderer I tried specifying:
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">
And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.
<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">
[Code]....
View 1 Replies
Jun 17, 2010
I am facing a issue in Flash container. I am having a project which has main container which call different SWFs into it. Now I call this main container file into another container, and their problem starts. Many option doesn't work properly which generally have _root, _parent etc...
If I want to run project (main container SWF and child SWFs) into another container file which place on a website. I want to show whole project from this container file so what I need to do?
View 1 Replies
Sep 21, 2011
I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way is to create a new panel (panel creates fine) and then add collapsable panels(nested) to that panel. Here is the code from the else loop.
else if (newPanel == false){
// simpleData is just for the title bar of the new panel
// otherwise the panel has no content
[Code]....
The error I get is: ReferenceError: Error #1069: Property panel4.4 not found on components.readTest and there is no default value.
I have tried setting the "name" property instead of the "id" property.
View 1 Replies
Dec 23, 2010
I have a viewstack container w/ 3 views: red, black, and blue. How can I completely hide the black & not include it?
[Code]...
View 2 Replies
Jan 13, 2012
I am creating an flex Air project,so mxml file will run. I have circles in one Big circle at one side and will be same on other side.
Now how to drag any circle from any Big circle to other side. Or it could be like any two container having circles, then how to drag and drop circle?
For one circle i am able to do drag and drop.But I want one Big circle on left hand side and one big circle on right hand side .And small circles with class names will be in these big circles.Now i want to drag and drop those small circles in big circles.Big cicles should not move. Even i have tried this code in actionscript
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
[Code].....
But in this i want big circles should not move and small circles should only be dragged.
View 1 Replies
May 6, 2010
I need to place an image into a container. The problem is that I will not know the size of the image or the container beforehand, so it all has to be dynamic.this is how I started (have not gotten to stage(or container) changing size yet. No matter what I try, either all the images are the same width, or they are all the same height. If some images are portrait and other landscape, I don't want all the images to be X pixels high. In this variation of the code, all the images turn out the same height, regardless of portrait or landscape.
ActionScript Code:
var ratio:Number = container.width/container.height;//get the ratio, if width is bigger than height then ratio is greater than 1, else ratio is smaller than 1
[code]........
View 0 Replies
Feb 18, 2012
Is there a static property in Action similar to that in the String object in .net to check if a string is empty, that is String.Empty.
View 2 Replies
Jan 27, 2010
I'm currently working on a custom component which extends Canvas (let's call it SuperCanvas) ; it's basically a container that let you zoom & pan its contents. It would be too long to explain why, but I can't use scrollRect, so I was forced to declare a Canvas object (called innerCanvas)... inside my SuperCanvas (I know, not very nice =/) I would like to know if there's a proper way to "redirect" the creation of my component's children in this canvas.
[Code]...
View 1 Replies
May 19, 2009
i have a flash document with buttons along the top which when clicked display different flash documents below in a container.. now one of these which gets displayed has 2 buttons on the side next to them another container and within that container you get 2 different documents displayed depending on which button you click on the side.
so i have managed to get it so you have the first document displayed within the second container with the buttons to the side, however when you click one of those side buttons to view the second document it appears to display it in the first container as the buttons that were next to it have now gone.. i've tried changing the names of each container so they wouldn't get confused with each other but that seemed to cause it not to work at all.
View 3 Replies
Feb 13, 2012
What I am trying to do is basicly a button, where I can exchange the color of the button and the displayed icon (square, question mark, arrow etc.) via script separately.
Currently I have two containers. One is a MovieClip container for the icons, where I have a different icon in each frame and another MovieClip container for the button backgrounds, containing the same button with different colors in each frame. The icon container is the same for all frames of the button container.
Its instance has a name. In the script layer there is just a stop(); in every frame. Now the problem is that due to background and icon both being a button symbol (they need to be in order for them to have the 'down' and 'over' states), that the build-in click events are handled separately, meaning, that when the icon is clicked, only the icon's state is changed to 'down' and if the button is clicked, only the button's state is changed to 'down'.
[Code]...
View 1 Replies
Dec 12, 2003
[AS]
on (release) {
_root.createEmptyMovieClip("container2", 1);
loadMovieNum("calendar2.swf", 1);
[code].....
It puts it at (0,0) of the _root! I tried "this", I tried "_parent", I tried nothing at all in front of container2. I even changed the x and y to something ridiculous. The trace returns the correct value but the clip ain't budging. Why?!
View 4 Replies
Mar 14, 2009
I have small question about loading movieClip. I have index.swf file and inside some mc with instance name "empty_box" and I wanna load other *.swf file from outside to mc empty box. How do that?
View 10 Replies
Aug 17, 2009
I am trying to get a grasp on Actionscript 3 and feel like I am learning all over again.
Lets keep it simple.
I have movie "A"
I have an empty movie clip on the stage with an instance name of "B"
I want to load a swf called "C" into "B"
View 5 Replies
Dec 2, 2011
Is there a way to add an empty value to a combo box. For instance, when a user clicks the combo box but then decides to not select anything?
View 5 Replies
Jul 31, 2010
I have a Flex 3.2 application for which I am developing a custom style. Basically the first stylesheet gets applied first, and then my custom stylesheet. I am wondering how I can completely empty a value set in the first stylesheet with a value set in the second. The value has to be blank because if the horizontal-center value is set then any other positioning values are ignored.
Example
CSS1.css
.myButton {
[code].....
View 1 Replies
Jan 29, 2003
duplicate an empty MC ?
View 12 Replies
Nov 21, 2005
I create an empty movie clip which will be my mask. Then I create a drawing API which is in this emty movie clip. And I want that the lines which are drawn would be the mask of the specific movie clip. However, the mc which must be masked dissapears....It happens because flash still thinks that the mask mc is empty....The script on the stage(fromurl...):
_root.createEmptyMovieClip("line", 1);
// 2. EVENTS IN _ROOT:
_root.onMouseDown = function() {[code].....
View 3 Replies
Jun 23, 2006
creating an empty mc, drawing something in it, and then making it a class i have defined?
View 14 Replies
Dec 9, 2007
I have made a menu system with 6 buttons, and on the layer above, I've made 6 'not active looking button' movieclips:
WEB / MYSPACE / BUY DK / BUY EU / DOWNLOAD / iTUNES
And I have made an XML file that contains the links for each button.
Code:
<?xml version="1.0" encoding="utf-8"?>
<infoXML>[code].....
View 2 Replies
Oct 7, 2008
I've a XML file that flash reads and then uses the values to populate text fields and load a few jpgs. The probelm is that the XML file often has NULL or empty nodes.
for example:
<item>
<name>peter</name>
[code]....
View 5 Replies