ActionScript 2.0 :: Use The DuplicateMovieClip Statement?

Mar 27, 2006

i've got a script of a newspage with php and mySQL (within flash ofcourse).This script got 1 dynamic text field.Now i like to create it different. Every title and body message must be together in 1 MC.So i think the best is to use the duplicateMovieClip statement.I found this code in a book of mine and changed it a bit for where i know. But I still have two problems.

FIrst of all:

All the movieclips will be placed at _x. 0 and _y. 0. And for every record (ID) i need to automaticly create a new MC.I got this code for static adding Mc's but it must be dynamicly loaded and the second mc must come after the first one.i got this actionscript so far:

[AS]
depth = 0;
for (copy = 0; copy < 10; copy++)[code]....

this code ofcourse creates 10 Movieclips with the instancename "nieuws0" to "nieuws9".do i need to place it in an onClipEvent() ? for now i placed it in the first frame.The original code i found got a random placement. and ofcourse i changed that.

View 4 Replies


Similar Posts:


ActionScript 2.0 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 1/2 :: Execute Code In Previous If Statement If Second If Statement Is Executed?

Aug 31, 2011

if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code

[Code]...
 
I dont want to copy the code from the first into the second and the first and second into the third.
 
My mind isn't working and there is probably an extremelly simple way to get this working.
 
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.

View 7 Replies

ActionScript 2.0 :: Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails?

Oct 10, 2008

The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.The purpose of the application is to load an XML file(works)Populate 2 text fields with information from the XML file(works)Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {

[code]....

The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.CheckBoxes are mandatory.But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

View 1 Replies

ActionScript 2.0 :: If Statement Inside If Statement Won't Work

Mar 30, 2011

why this code won't work

[Code]...

I'm sure you can put if statements inside other if statements, seriously I can't figure it out

View 4 Replies

ActionScript 3.0 :: Another 'if' Statement Inside An 'if' Statement?

Sep 22, 2010

I need to write an if statement inside an if-else statement. But no matter how I write it it keeps giving me a syntax error.The syntax error is "1083: syntax error: else is unexpected".[code]No matter how or where I place the braces, it keeps giving me errors.

View 13 Replies

ActionScript 3.0 :: Use A For Statement To Create An If Statement

Jul 12, 2010

what I'm trying to do is create an else if argument for each object in an array based on a user set number

Code:
for(var i:int=0; i < numberOfElseIfs; i++){
GENERATE AS3 CODE
}

to which I want it to GENERATE THE FOLLOWING CODE:

Code:
}else if(baskets[i].used == false){
baskets[i].used = true;
drawButton(i);
}

the problem is obviously that the compiler reads this code rather than understanding I'm trying to regenerate the code within the for loop...does that make sense :S? So basically I need as3 to read the code between the for statement as if it is going to echo that out later. Is this even possible?

View 4 Replies

ActionScript 2.0 :: DuplicateMovieClip?

Feb 11, 2008

I have created a emptymovieclip which contains 1 shape and then i have a uplicateMoviclip, and it posistion with {_x:Number,_y:Number}my code:

Code:
this.createEmptyMovieClip("shape", this.getNextHighestDepth());
shape.beginFill(0xFF0000);

[code].....

View 2 Replies

ActionScript 2.0 :: CS3 Rotate And DuplicateMovieClip?

Apr 15, 2010

CS3 rotate and duplicateMovieClip?

View 2 Replies

ActionScript 2.0 :: CS3 DuplicateMovieClip And For Loop ?

Jun 29, 2010

I'm creating a flash menu and I have this AS code on the first frame:

[code]...

My problem is, that when these MC's duplicates, there is only one (last) which is working.

View 3 Replies

Flash :: Best Way To Delete A DuplicateMovieClip?

Jan 14, 2011

[code]...

This code just generates a new ham_mc where the user releases the original (drag and drop). The original returns to its starting point. I have the same code for a movieclip called cheese_mc, the user can drag and drop cheese too.

So, if more than one of these ham_mc's and cheese_mc's are created, what is the best way to delete the last one created?

View 1 Replies

ActionScript 2.0 :: Can't Get Duplicatemovieclip To Work

Jun 20, 2011

I'm sort of stumped why duplicatemovieclip won't work. Or maybe it is just not working the way I'd expect. I have a group of movie clips in a container called blockGroup. Those get positioned on the stage randomly just fine. In addition, I want to duplicate that container and position it 10 pixels greater to the right. That's not working.

This is what I have:

Code:
maxBlocks=20;
createEmptyMovieClip("blockGroup",-1);
for(i=0; i<maxBlocks; ++i){

[Code].....

View 2 Replies

ActionScript 2.0 :: DuplicateMovieClip Not Working

Feb 29, 2012

This is not working, dont know what's going on as I've been about 4 hours on the web searching for a solution...

[Code]...

View 9 Replies

ActionScript 2.0 :: Performance Of DuplicateMovieClip?

Feb 13, 2004

I was wondering about the performance of duplicateMovieClip. If for example Ive made a small square using the rectangle tool, made it into a movie clip, and then duplicate it like 100 times, placing them different places on the scene.

How much will this affect the performance? Is there a better way to do it? (how?)

View 1 Replies

ActionScript 2.0 :: [FMX-04] HitTest & DuplicateMovieClip?

Mar 26, 2004

k, i got a hitTest & duplicateMovieClip combined question. got this object that i want to noticed hitTest with this MC called daligObjekt. My problem is that daligObjekt is duplicated very often and it gets a +k in its new instance name, so when i do the hitTest it obviously doesnt rcognize it. I do know u can write +k in the hitTest line aswell but as k number raises faster then the hitTest is done it tion. I know that u can "lure" the system by puting an invisible MC that will always attach to the new duplicated movies but i belive there should be an easier answer.which i bet many do, pls dont hesitate to post itPS. below some AS code if u didnt understand the problem, u might get a hint with the code...!

[AS]
onClipEvent(enterFrame){
_root.dalig = _root.kroko.krokoHuvud.hitTest(_root.daligObjekt);

[code].....

View 4 Replies

ActionScript 2.0 :: DuplicateMovieClip On MC's Containing Dyn. Generated MC's?

May 15, 2005

I have a movie clip that contains many many dynamically generated mc's that have also some dynamically generated mc's in them Now i wanna duplicate that large MC .... and of course that does not work cause it will not copy all those small MC's that are contained. If I duplicate all the MC's contained this also will not work. cause they contain generated MC's and so on Okay enough blabla: Is there a possibility to duplicate the big MC containing all the small MC's ???I know Flash can't do it but is there a way around it?I had one idea of keeping an array of all the generated mc's in my MC class. This works fine but when i duplicate one contained MC i wont get it into the duplication target, it will always be inside his _parent movieclip

View 6 Replies

ActionScript 2.0 :: DuplicateMovieClip Not Playing?

Jan 28, 2006

I've been working with flash for a few years now, and have a few major projects under my belt, but this is an issue that randomly crops up every now and then: duplicateMovieClip simply not playing.Check out the code and see if you can determine the bug:

on (rollOver) {
duplicateMovieClip(_root.puma, "puma"+pumaC, _root.getNextHighestDepth());
pMC = _root["puma"+pumaC];

[code].....

View 6 Replies

ActionScript 2.0 :: DuplicateMovieClip Under OnClipEvent?

Mar 17, 2006

I need to have an mc duplicate itself under its own onClipEvent(load) handler. To put it perhaps more clear, something like:

onClipEvent(load) {
//clips duplicate itself
}

I have tried all sorts of combinations of _root.clip.dMC, this.dMC,

View 4 Replies

ActionScript 2.0 :: Unloading DuplicateMovieClip?

Dec 7, 2006

I have a 'start page' on frame one and the main code on frame 2 incl. a button to return to Frame 1 and this is the problem as when the timeline moves to Frame 1, the duplicated MCs (ie pronounClip + promptClip) are still there.I have tried to unload the clips :

Code:
this.promptClip.removeMovieClip();
but that doesn't work either...

[code].....

View 2 Replies

ActionScript 2.0 :: MovieClipLoader And DuplicateMovieClip()?

Jan 23, 2007

I'm trying something that should be fairly simple. I want to:- load a jpg into a container clip- when that image is loaded, then duplicate it and move it to a different position- then do a whole bunch of other stuffI'm doing all that using MovieClipLoader.onLoadInit(), and when tracing the duplicated movieClip, without fail, it returns undefined.

Code:
var detailImg:MovieClip;
// create a loader to handle loading the full image

[code].....

View 2 Replies

ActionScript 2.0 :: DuplicateMovieClip Populating From XML

Feb 6, 2007

Why is this not populationg the fiedls with images? The XML is well formatted (I tested)myThumb has a Loader called myPicMC, where the pics are supposed to load. I supposed the proble is with the code in bold blue. [code]

View 2 Replies

ActionScript 2.0 :: Delete DuplicateMovieClip?

May 17, 2007

I found this tutorial but for some reasion I am unable to delete the duplicated movie clips created would anyone know how?

View 3 Replies

ActionScript 2.0 :: Duplicatemovieclip And Moviecliploader?

May 5, 2008

Code:
myListener.onLoadInit = function(target_mc:MovieClip) {
var ref:MovieClip = target_mc.duplicateMovieClip("ref", target_mc.getNextHighestDepth());

[code].....

View 3 Replies

ActionScript 3.0 :: No More DuplicateMovieClip For NewsReader?

Mar 10, 2009

I am making a flash website with a page that is a "newsreader" style, for posting articles. The article info is loaded dynamically from an XML document.

I made a page like this before using AS2, and used the duplicateMovieClip method in a for-each loop to list each news article. I am using AS3 in my new flash document, but am finding that there is no longer the duplicateMovieClip method.

replace the duplicateMoveClip, or another way to accomplish what I am trying to do.

View 3 Replies

IDE :: Duplicatemovieclip Unlimited Times?

Jun 23, 2009

I am trying to duplicate a movieclip unlimited times. Right now it will play when it is rolled over one time and then it will duplicate for the second rollover, but that is it. I need it to keep duplicating every time it is rolled over.

The code:

[code]...

View 2 Replies

ActionScript 2.0 :: [FMX] DuplicateMovieClip Within A Loaded SWF

Sep 15, 2003

I have an SWF that works fine standalone. However, when I load it into the main movie, it appears that my duplicateMovieClip within the loaded SWF isn't functioning because I only see the first movieclip and not the duplicates. Am I being specific enough?

View 4 Replies

ActionScript 2.0 :: DuplicateMovieClip Event?

Jan 18, 2004

If you have a movie clip and assign to it via the onClipEvent (Load) OR simply the movieclip.onLoad a whole bunch of data (properties of that movieclip):

When you duplicate that movieclip, does it duplicate all the actionscript contained within?

View 1 Replies

ActionScript 2.0 :: Performance Of The DuplicateMovieClip?

Feb 13, 2004

I was wondering about the performance of duplicateMovieClip. If for example I�ve made a small square using the rectangle tool, made it into a movie clip, and then duplicate it like 100 times, placing them different places on the scene.How much will this affect the performance?

View 1 Replies

ActionScript 2.0 :: DuplicateMovieClip Into Another Instance?

Feb 24, 2005

Is there a way to duplicate a movie clip into another movie clip?So far I have only been able to get the movie clip to duplicate itself within the movie clip it is already in though I am calling the duplication from another movie clip (which is where I want it duplicated into).Basically I have pictures (as movie clips) in a scroller. When you click on a picture I want it to duplicate that picture into another Movie Clip outside of scroller on the _root level. This outside movie clip is actually calling the duplication using onClipEvent(enterFrame). So far, though, it only duplicates itself into the same movie clip and so this duplicated picture also scrolls with the scroller (which isn't what I'm wanting).Here is the outside movie clip's actionscript:

Code:
onClipEvent (enterFrame) {
//tried the below line as well:

[code].....

View 6 Replies

ActionScript 3.0 :: Write Another "if Statement" Inside Another If-else Statement?

Sep 22, 2010

I have a script which is giving me a lot of trouble since I have no idea how to write another "if statement" inside another if-else statement. I keep getting errors, I guess I don't know where to put the braces exactly...

example:
if(bla == bla) {
<------------how would I write another if statement here?
}else if (bla == bla){
}

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved