ActionScript 2.0 :: Duplicate An Empty MC ?
Jan 29, 2003duplicate an empty MC ?
View 12 Repliesduplicate an empty MC ?
View 12 RepliesI tried searching for an answer to this on the forums and it seems you can't duplicate a movieclip that has a dynamically loaded jpg in it, I mean you just get a duplicate empty movieclip?
What I want to do is have 3 copies of a pic, each tinted a little differently, and have them converge and reveal the "composite" of this pic. Do I then have to use loadMovie 3 times?
I have created an empty movieclip to which I've attached two mc's. Now I want to duplicate this movieclip. But all it seems to be doing is copying the empty mc without its attached mc's.
ActionScript Code:
var samen = _root.createEmptyMovieClip("samen"+samenNum, ++samenNum);
samen.attachMovie("vierkantbiblio","erin", depth, {_xscale: xscale, _yscale: yscale, _x: 0, _y: 0, _rotation: rot} );
samen.attachMovie("cirkelbiblio","erin2", depth2, {_xscale: xscale2, _yscale: yscale2, _x: xpos2-xpos, _y: ypos2-ypos} );
copy = samen.duplicateMovieClip("samen"+copyNum, ++copyNum);
//DOESN'T WORK
creating an empty movie clip 'container' and within this clip is a movie clip 'box1' and a duplicate 'box2' offset on the x axis by 650.
Here is what I have so far
this.createEmptyMovieClip("container", this.getNextHighestDepth());
this.container.attachMovie("box","box1",this.getNe xtHighestDepth(),{_x:0, _y:250});
[Code]....
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]...
My problem is that when I click the letter movieclip it does create the duplicate as it should and it starts to drag the duplicate mc. However, when I release the clip it doesn't stop dragging? I realized that if I put onMouseUP event instead of onRelease it actually does stop dragging when I release the mouse. I would, however not like to use the onMouseUP event if possible.
[Code]...
If I have an object that calls
addEventListener(Event.ENTER_FRAME, update);
addEventListener(Event.ENTER_FRAME, update);
will that add 2 listeners?
I am having problems dupliating a movie clip. I can make a duplicate from an original but when I edit the duplicate it also modifies what is in the original. (I am just changing the text, thats the only difference between the 2) How come it effects both clips when I only change one?
View 6 RepliesIs 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[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?!
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 RepliesI 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"
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 RepliesI 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].....
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]....
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].....
creating an empty mc, drawing something in it, and then making it a class i have defined?
View 14 RepliesI 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].....
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]....
I tried searching for this, but couldn't find exactly what I am looking for.
I want to create a new instance of a blank movieclip using actionscript and name each instance differently.
I have a button that each time it's being press, it will load a mc that's located in the library.
The movie clip is text that's located in a mc, that i can fade in the text when the parent mc is called (meaning, text in a mc in a mc).
How can I do this actrion, where each time the button is pressed the mc will load? tried a few things such as loadmovie, attachmovie, but some how it doesn't work for me.
I gave my parent mc an instant and tried with the butoon calling it. didn't work.
I would like to perform a hit test on a movie clip which contains a closed outline, but no fill colour.
Unfortunately it doesn't seem to work in my code. Is it possible or do I have to work around this?
how to load an swf into an empty clip labeled 'holder' on my main timeline on mouseclick of a button?so far im trying
Code:
button1.addEventListener( MouseEvent.CLICK, onClicked );
function onClicked( e : MouseEvent ):void {
MovieClip(parent.parent.parent).holder.loadMovie("thing.swf");
}
but loadMovie isn't supported..
I have a problem with XML filtering. [code]If there is only one result, trace is empty. If there are 2 results or more, they will be traced fine. Is it because one result is not an XML 'list'? If so, how do I get the results if there is only one match?
View 2 RepliesI'm using flash cs4 on a mac and I need to embed some characters to support greek, and probably a lot of other languages. The problem is, my Character embedding dialogue box is empty! There's nothing in it at all... I'm using Tekton Pro as the font for that dynamic text box, I tried using something more basic, Arial and Helvitica didnt work, still nothing to embed. I know the phrase that will be in it, at least the first one, when I put it in the "Include these characters" box and reran, all the dt box would show is an apostrophe. I put the phrase into the dt filed itself and "autofilled" it did the same thing. I also tried doing the same with the % character version ie %B6, it picked up that they were characters but still wasnt displaying right. I'm diverging.
View 3 RepliesI am having the most frustrating time with htmlText in TextField.apparently, if you set the htmlText of a TextField, you always get an extra line at the end.Here is what I have found out:Below, a multiline TextField is created and the text property is set. I then grab the htmlText property, set the htmlText to "" and then reapply the htmlText I had just grabbed. This causes a new line to be added to the Textfield:
Actionscript Code:
var tf:TextField = new TextField();tf.width = tf.height = 200;tf.border = true;tf.multiline = true;tf.wordWrap = true;addChild(tf);tf.text = "this is not htmlText";
[code].....
I am using Flash 8.Say I have 3 datas in the ComboBox - "one, two and three". We find that in SWF "one" is seen in the ComboBox even though the user hasn't selected the data from the ComboBox. "one" has become the default selection in the CoomboBox.I want the ComboBox component to be empty when swf is run.But I don't want the empty thing also to be shown when the dropdown is clicked.
View 5 RepliesI have a multiple choice quiz designed for a client. I have an array that works thruout the questions, that if the user answers incorrectly, it stores the question number in the array. When the user reaches the end of the quiz, I dont want this array to always display at the end, since the user could have all the asnwers correct (which means the array should be empty). I am trying to make an if else statement that will display a different message if the array is empty.[code]...
View 3 Repliestrying to make an empty movieclip, but after compile the file i press ctrl+L to see the objects instances on stage, it shows only Level #0: Frame=1. how can I make myMC movieclip???
package {import flash.display.Sprite;import flash.display.MovieClip; public class drawCurve extends Sprite { public function drawCurve() { var myMC:MovieClip= new MovieClip(); addChild(myMC); myMC.name="MC"; }}
[code].....
Before the mp4 plays I have a preloader set up in Frame 1to preload the movie and play in Frame 3.
myLoaded = Math.round(getBytesLoaded()); myTotal = Math.round(getBytesTotal()); myPercent = myLoaded/myTotal;if (myLoaded == myTotal)
{ gotoAndStop(3);} else { gotoAndPlay(1);}
[code].....