Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Repeated Movie - Different Variables



I have a PHP script returning a list of variables to flash. The variables are named something like this:-

photo1
photo2
photo3
price1
price2
price3
modelnum1
modelnum2
modelnum3

there is also a variable n returned to flash which is the maximum number of movieclips required i.e

if n = 7 then there needs to be 7 movieclips and in the seventh movie clip there variables would be something like

photo7
price7
modelnum7

What I want to do is replicate the same movie clip with the necessary graphics and layout etc but show a the different variables in each so it would look something like this:

(movieclip 1)
price1
photo1
modelnum1

(movieclip 2)
price2
photo2
modelnum2

upto

(movieclip n)
price (n)
photo (n)
modelnum (n)

How can I create n number of identical movieclips with say three dynamic text boxes in each to show the three variables price, photo and modelnum but will vary with the value of n for each one.

Thanks for you help



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-17-2005, 06:55 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Repeated Movie - Different Variables
I have a PHP script returning a list of variables to flash. The variables are named something like this:-

photo1
photo2
photo3
price1
price2
price3
modelnum1
modelnum2
modelnum3

there is also a variable n returned to flash which is the maximum number of movieclips required i.e

if n = 7 then there needs to be 7 movieclips and in the seventh movie clip there variables would be something like

photo7
price7
modelnum7

What I want to do is replicate the same movie clip with the necessary graphics and layout etc but show a the different variables in each so it would look something like this:

(movieclip 1)
price1
photo1
modelnum1

(movieclip 2)
price2
photo2
modelnum2

upto

(movieclip n)
price (n)
photo (n)
modelnum (n)

How can I create n number of identical movieclips with say three dynamic text boxes in each to show the three variables price, photo and modelnum but will vary with the value of n for each one.

Thanks for you help

Movie Ending To Be Repeated
ok how do make the last sequence of my movie repeat itself until the viewers decides that it aint worth watching no more. i want one basically i have about 8 layers that need to remain on the screen, one of which needs to repeat a simple movement across the screen i tried playing around with the goto function but had trouble with it can someone gimme like an idiots guide or something?

Small Background Image Repeated Over Movie Size?
hi guys, does anyone knows the way to repeat a small image over the whole size of a movie?

I Think Its A Repeated Question
hi there

can each one of u tell me in easy steps the basic structure of any FLASH project.. it mean

What i need to make a good flash site or project?

How can i orgnize my scenes & bottons??

and please visit my homepage and tell me if i walk in the correct way.. and can i continue to be a master in this domain?
Regards

AttachMovie Repeated
I'm building a movie where attachMovie should be repeated but it works once only.

The final result should be that mc slide up continuously every time I press the buttons.

Can you help?

Repeated KeyPress = Bad
hello future saviours,

i've been trawling round the net for far too long now, trying to find a way of making a little movie that basically replicates the old 'track and field' style button-bashing frenzies.

I've made a movie that moves along when you press two keys, and it hapily 'resists' this movement by continuously shifting backwards (to a certain extent), but the game is exceptionally easy to beat - you just need to hold down the two keys.

So, in a nutshell, I'm trying to find a way of stopping the repitition of the normal keyPress() function thing.

Any ideas?

md

OnPress Repeated?
I've made a flash player that relies on the timeline using embedded flvs, and there are fastforward and rewind buttons. As of now, clicking it skips ahead or behind about 75 frames. I would like it so when you hold the button, it skips repeatedly until it is released, is there a simple way to do this, or will I have to use a listener etc?

Thanks

Repeated Classes
Hi,

used to know this but forgotten...

If I import same classes many times within a project because I need them in many of the project's classes eg EventDispatcher, am I adding unnecessarily to the filesize? Or does flash only import them the first time they are used?

Thanks

Repeated Actionscript
Hello. I'm doing a simple flash game. Anyway, I have in different frames the same object, yet the anctionscript changes. However, it does not change completeley. The begining changes in every frame (must me imputed by me) yet, the end is ALWAYS the same. I was wondering weather there was a way to store this peace of script somewhere and then insert it in the ebjects after the changing part, so I can save space and, mostly, so it becomes much easier to edit the changing part.

Actionscript Being Repeated On One Pc And Not Another
Hi Folks,

I've got a strange problem. I've come back to a bit of flash I was doing for my wife's photography site in January ( http://www.lilaclily.co.uk ).

I have bought a new PC since then and installed flash today. I tried the fla file on the old PC and it works normally (as it does on the website), but on the new PC when I preview it it seems to repeat the actionscript again and again - confirmed by some trace I added in.

I do most things in actionscript, I have a small amount in the fla to start everything off and assign visual instances to variables in the actionscript + assign a couple of callbacks. It seems to be the initialisation stuff in the fla that gets called again and again.

Any ideas what i've done wrong?

Thanks for your help
All the best,
Ash

Help With Repeated Keydown
I have 2 swfs - in these, on any keypress, it advances to the next frame. I have a setInterval delay on each frame so it doesn't go too fast. Both files work fine on their own.

I then load each swf into 2 different frames of a container swf. If I press keys fast on one frame and then switch to the other and press keys fast again and so on and so forth, it gets into a weird loop where it just keeps going faster and faster without any keyboard interaction. Any ideas?

Simplify Repeated AS
Is there away to make a function or something so I don't have to repeat all those button _alpha settings every time?
Notice each selected button will NOT be set to 0 (commented out for now).
Sorry about the wacky dot paths...


btn01.bbtn01.onRelease = function() {
loadMovie("content/part01intro.swf", "_root.viewer.content");
//_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn02.bbtn02.onRelease = function() {
loadMovie("content/part02company.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
//_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn03.bbtn03.onRelease = function() {
loadMovie("content/part03security.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
//_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn04.bbtn04.onRelease = function() {
loadMovie("content/part04shopLogs.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
//_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn05.bbtn05.onRelease = function() {
loadMovie("content/part05reports.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
//_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};

Random But No Repeated
I have 10 images I want to load randomly into 3 separate movieclips just once (as to perpetually rotating). I want to be sure that during the random shuffling and placement, that an image is not repeated.

For exampe, I would like the following sampling set of numbers to come up:
1,2,3
1,5,9

I don't want the following to happen:
2,2,5
7,7,7

How do I avoid having numbers repeated when using 'random'? Any tips or pointers for tutorials? Thanks.

Simplify Repeated AS
Is there away to make a function or something so I don't have to repeat all those button _alpha settings every time?
Notice each selected button will NOT be set to 0 (commented out for now).
Sorry about the wacky dot paths...


btn01.bbtn01.onRelease = function() {
loadMovie("content/part01intro.swf", "_root.viewer.content");
//_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn02.bbtn02.onRelease = function() {
loadMovie("content/part02company.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
//_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn03.bbtn03.onRelease = function() {
loadMovie("content/part03security.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
//_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn04.bbtn04.onRelease = function() {
loadMovie("content/part04shopLogs.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
//_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};
btn05.bbtn05.onRelease = function() {
loadMovie("content/part05reports.swf", "_root.viewer.content");
_root.sidePanel.nav.btn01.bbtn01.btn01Current._alp ha = 0;
_root.sidePanel.nav.btn02.bbtn02.btn02Current._alp ha = 0;
_root.sidePanel.nav.btn03.bbtn03.btn03Current._alp ha = 0;
_root.sidePanel.nav.btn04.bbtn04.btn04Current._alp ha = 0;
//_root.sidePanel.nav.btn05.bbtn05.btn05Current._alp ha = 0;
};

Repeated Questions
SEARCH BUTTON:

on (release) {
_root.gotoAndPlay("search");
_root.searched = true;
}

POST BUTTON:

on (release) {
if (_root.searched) {
_root.gotoAndPlay("post");
_root.searched = false;
} else {
_root.gotoAndPlay("search");
}
}

I'm not a mod so I don't know if it's my place to say this, but many questions get asked nearly every other day, and they have already been answered - although everyone - esp the mods - is very helpful, sometimes the answer to a question can be found by using the search button

Random But No Repeated
I have 10 images I want to load randomly into 3 separate movieclips just once (as to perpetually rotating). I want to be sure that during the random shuffling and placement, that an image is not repeated.

For exampe, I would like the following sampling set of numbers to come up:
1,2,3
1,5,9

I don't want the following to happen:
2,2,5
7,7,7

How do I avoid having numbers repeated when using 'random'? Any tips or pointers for tutorials? Thanks.

URL Is Repeated In Browser Address Bar
Link works to target nicely when I click on the link in the .swf file. When I embed the same .swf in Dreamweaver, however I get the URL repeated in the address bar ...something like http://www.science-ed.com/ch1/activi...y1b/index.html

I'd sure feel blessed if someone get shed some light on this behavior. The .swf file is found at http://www.science-ed.com/ch1/ch1.swf

Repeated Text In Scrollbars
I had a friend customize a scrollbar for me so i may use it on a site (www.trio-of-leos.com). IT worked great for the first page, but when i tried to use it anywhere else in the website (on different layers for different pages) whatever text i inputed into the second scrollbox would be copied into the origional, thus stopping me from using more than one of these scrollbars. Please, if anyone can help me i would be appriciated, and, because my friend was doing it, i know next to nothing about flash. If you can, please keep it simple for me. If you wish, i can email the file to you, as it is just a bit to big to attatch here.
Thanks

Repeated Style And Feel....
I cant help noticing how alot of higher end website designs have a very similiar look such as font... and beveled windows etc... Even down to a new dotted pattern that runs through tabs and graphics. I was wondering if designers are using a certain component set or skin filters or what... Is there a certain web design package which has tool to create these nice and smooth looking graphics?.. Thanks...

Button/Repeated Animation
Hi,I have 5 buttons in my timeline. Each time you press a button it takes you to frames 2-10 followed by a different animation specific to each button. How can I have every button lead me to frames 2-10 and then to their different animations? thanks for any help.

[F8] Repeated MovieClip Animation
It seems so simple- and yet I can't figure out what to do...

I have a few animations that slowly move across the top of the screen. They are the first things I ever did in Flash, so I thought I'd go back to them and optimize them a bit.

There is a single graphic used in 2 different movieClips. The 2 movieClips do the exact same thing- move across the screen in the exact same place. The only reason there are multiple movie clips is I want them to start at seperate times. The second one starts when the first one is about 75% of the way across. Surely there is a better way to do this to reduce file size- by having instances of the same clip, but I don't know how to have one start as the other is 75% across continually.

I'm certain this is going to be cake but I can't figure it out!

Navigation Menus - Should They Be Repeated?
hello,

i've been wondering about this one for a while. I have a main navigation menu where one of the items is "training & conferences." when you click it you are taken to the training & conferences section where there is a sub menu on the side:
- member academy (this is one of our member things)
- earning credits
- degree of certification
- programs available
- program registration
- program cancellation
- directions to programs
- ... etc..

the person requesting this section to the website wants me to put that sub-navigation as a dropdown from the main nav menu. so it would actually be on all pages 2x's when in the "training & conferences" section.

how do you guys treat navigation? i mean do you try and not have redundant menus or is it ok? i feel like i should cut down on the main nav menu to generalize it all or something like combining all the "programs" options into one link..

any suggestions?
monkeybrainz

Repeated Message Please Ignore
repeated message please ignore





























Edited: 01/14/2007 at 04:28:19 AM by lajettee

Components - PropertyInspectorSettingUpdate [repeated]
Hi, all!
I passing hard times trying to build a simple test component with live preview...
I followed the three first parts of a very big tutorial (http://www.adobe.com/devnet/flash/articles/creating_as3_components.html) and I keep getting this runtime error:
propertyInspectorSettingUpdate error Error #1056: Cannot create property propertyInspectorSetting on test.CellRepresentation.

Firs of all, what could I do to make it works and what in the h* is that propertyInspectorSettingUpdate error?? I google it and didn't find anything!
Second point, is there a easier way to make components with live preview in AS3?? All I need is a test component, just to put in the stage and test the layout...





Thank you all in advance.
CaioToOn!







Attach Code

package test
{
import fl.core.UIComponent;

import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;

public class CellRepresentation extends UIComponent
{


private var _text:TextField;
private var _bg:MovieClip;



public function CellRepresentation()
{


}




/**
* As in the tutorial
*/
override protected function configUI():void
{
super.configUI();

_bg = new Bg();
addChild(_bg);

var textFormat:TextFormat = new TextFormat();
textFormat.align = TextFormatAlign.CENTER;

_text = new TextField();
_text.height = 21;
_text.x = 2;
_text.defaultTextFormat = textFormat;
addChild(_text);
}


/**
* As in the tutorial
*/
override protected function draw():void
{

super.draw();

}



/**
* Draw a "<" or ">" character according to this option.
*/
[Inspectable(name="NEXT",defaultValue=false)]
public function set direction(value:Boolean):void
{
this._text.text = value ? ">" : "<";
}

public function get direction():Boolean
{
return this._text.text == ">";
}



/**
* Width handler.
*/
override public function set width(value:Number):void
{

this._bg.width = value;
this._text.width = value - 4;

}

override public function get width():Number
{

return this._bg.width;

}



/**
* Height handler.
*/
override public function set height(value:Number):void
{

this._bg.height = height;
this._text.y = Math.ceil((value - this._text.height) / 2);

}

override public function get height():Number
{

return this._bg.height;

}
}


}

























Edited: 10/02/2008 at 05:30:42 AM by CaioToOn!

Problem With Repeated Sounds
i currently have a sound playing repeatedly and pretty rapidly, it's a sound effect for a machine gun, but when i start shooting my gun it there will be a slight pause between the first shot sound and the subsequent shot sounds. it's almost as if flash waits for the first sound effect to finish before playing the next ones (which will repeat and play on top of each other just fine). i'm using the following code:

Code:
testshot = new Sound(this);
testshot.attachSound("gunshot");

// and on the gunshot event:
testshot.start(0,1);
anyone know what i could do so that my sound effects will play, evenly spaced apart?

Random Images Not Repeated In Other Mc's
hi,

I'm not really a coder so i'd love any help you could give. Basically I have 9 empty movie clips and I want them to be randomly filled with a jpg from external swfs which is fine but I don't want any of the 9 movie clips to show the same image as any of the other 8.I think I should set up arrays but am not sure how they would work. here is the code for loading theempty movie clips

choice = Math.round(Math.random()*24);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
case 2 :
location.loadMovie("image2.swf");
break;
case 3 :
location.loadMovie("image3.swf");
break;
case 4 :
location.loadMovie("image4.swf");
break;
case 5 :
location.loadMovie("image5.swf");
break;
case 6 :
location.loadMovie("image6.swf");
break;
case 7 :
location.loadMovie("image7.swf");
break;
case 8 :
location.loadMovie("image8.swf");
break;
case 9 :
location.loadMovie("image9.swf");
break;
case 10 :
location.loadMovie("image10.swf");
break;
case 11 :
location.loadMovie("image11.swf");
break;
case 12 :
location.loadMovie("image12.swf");
break;
case 13 :
location.loadMovie("image13.swf");
break;
case 14 :
location.loadMovie("image14.swf");
break;
case 15 :
location.loadMovie("image15.swf");
break;
case 16 :
location.loadMovie("image16.swf");
break;
case 17 :
location.loadMovie("image1.swf");
break;
case 18 :
location.loadMovie("image18.swf");
break;
case 19 :
location.loadMovie("image18.swf");
break;
case 20 :
location.loadMovie("image18.swf");
break;
case 21:
location.loadMovie("image18.swf");
break;
case 22 :
location.loadMovie("image18.swf");
break;
case 23 :
location.loadMovie("image18.swf");
break;
case 24 :
location.loadMovie("image18.swf");
break
thank you for your time and help

LoadMovie Loads Slow? (repeated)
I've just started working with the loadMovie action - I did get it to work which is great, but what I've noticed is the .SWF that I'm loading into the main movie runs SLOWER as a loaded movie than it does on it's own. I've made sure that both movies are set to the same frame rate, and I even added a preloader to the movie being loaded into the main movie.

The main movie is called: diggers.swf
The moview being loaded is: background.swf

I've uploaded everything so you can see the problem for youself in case I didn't explain myself very well - any help would be much appreciated:

http://www.diggers.com.bh/testing/diggers.htm
http://www.diggers.com.bh/testing/bg.htm

to get an idea of where I'm headed with this project, you can look at:

http://www.diggers.com.bh/testing/

thanks in advance for your help!!

--Sid.

Repeated Text Field Alpha It Happens
I m repeating this quetion.Is noone is able to define how some one can set alpha of a text filed. You can see this example at http://www.macromedia.com/support/flash , on the left top corner of the page. Or you can explore your MX Help. Press F1 and then go to Contents>>ActionScript Dictionary >>T>>TextField._alpha where you can find the same statement as follow:

--------------------------------------------------------------
TextField._alpha

Availability


Flash Player 6.

Usage


TextField._alpha
Description


Property; sets or retrieves the alpha transparency (value) of the text field specified by TextField. Valid values are 0 (fully transparent) to 100 (fully opaque).

Example


The following statements set the _alpha property of a text field named text1 to 30%.

on(release) {
text1._alpha = 30;
}
-----------------------------------------------------------

Now the same i am repeating but no result.

-------
I have a text field named text1 and a button.
now I write a script on button


According to Flash Help this will set the alpha 30 of text field text 1.
But It is not happening. What's wrong with me. Please help.
regards

I Looked But.. Random LoadMovie Not Repeated
I am sorry i know that the random issue have been covered for many times but I did not find any answer to this
what i want is to load random moive clip (movie0,movie1,movie2,movie3,movie4)
without repeatation
thank you very much

Horizontal Image Scroll - Repeated
Hello

Disclaimer: New to AS and would love any help you could provide ... thanks.

Description: I have 8 images which need to scroll horizontally in a project. As they scroll off the page I need them to reset and begin to scroll again when it is their turn.

I am using the following AS to move them across the canvas:

this.onEnterFrame = function() {
if (this.circle_mc._x < 550) {
this.circle_mc._x += 3;
}
if (this.square_mc._x < 550) {
this.square_mc._x += 3;
}

}

I obviously have no problem having them end off screen ... but how can I have them reset to the other side of the page and resume the above script?

Thanks again for any help ... if you need more information, please let me know.

-Scott

Repeated Randomly Selected Swf Files
Hi there,

Can anyone help me with this one.

I’m creating a flash movie which loads in randomly selected swf files. These are images and video clips. They follow each other so when one swf file finishes it then tells the next movie to play.

I need several of these movies to be loaded in at the beginning to make sure it runs smoothly.

Does anyone know how to make sure the swf files don’t repeat themselves. As you’ll see from the script I’m using there is nothing to stop clipb loading up the same swf file as clipa.

a = random(3);

if ((a)=1) {

loadMovie("clip01.swf", _root.clipa);

} else if ((a)=2) {

loadMovie("clip02.swf", _root.clipa);

} else if ((a)=3) {

loadMovie("clip03.swf", _root.clipa);

}

b = random(3);

if ((b)=1) {

loadMovie("clip01.swf", _root.clipb);

} else if ((b)=2) {

loadMovie("clip02.swf", _root.clipb);

} else if ((b)=3) {

loadMovie("clip03.swf", _root.clipb);

}

Any help would be much appreciated

Daniel

Avoiding Repeated Variable Numbers
Hello all. The following is some code to have movie clips randomly loaded into the main movie. How would I go about making it so that once a certain number out of the range was selected, it would not be repeated. That is to say, if the movie clip mcExercise2 has been loaded, it will never happen again, it will select a different number because "2" has already been used.
Any input is most appreciated..







Attach Code

var nExerciseCount:Number = 0;


function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
for (var i = 0; i<100; i++) {

}

function displayExercise():Void {
mcExercise.removeMovieClip();
this.attachMovie("mcC1Exercise"+randRange(1, 3), "mcExercise", this.getNextHighestDepth());
mcExercise._x = 410;
mcExercise._y = 270;

for(i=0; i<5; i++) { }
if(nExerciseCount <= 3) {
nExerciseCount++;
trace(nExerciseCount);
}

else {
mcExercise.removeMovieClip();
gotoAndPlay("C1A_End");
}
};

Making Repeated Function Calls
Hello,

I'm having a problem with the function call.
here is the situation - on mouse move I'm calling a function, which will be called repeatedly when ever mouse is moved.i want to execute the function calls one after the other. for example when first time mouse moved the function is called and during that time again if mouse is move the function will be called again. I want the second call has to be executed after the first one is done with the execution.

Any suggestions??

Array Returning Non-repeated Numbers. How?
Hello there,

Simple. Take the array [4,6,6,7,8,8] for example.
we have the number 6 and 8 twice.

Isn't there a method to return this array like: [4,6,7,8] ?
or, how can I push this number into the array only if they are not pushed yet?
I tryed to make a loop with condition to check if the numbers was already there, but I had no bliss.

this is my code now:


HTML Code:
meses = [];
arquivos = xmlData.firstChild.childNodes[0];
//populando array meses
for (i=0; i<arquivos.childNodes.length; i++) {
mes = mesNome(arquivos.childNodes[i].attributes.mes);
meses.push(mes); //<<<< here I think its the problem
}
I think the code can't help, but, there it is. This array "meses" (months, if you prefer), returns that example I told you about: [4,6,6,7,8,8], but I needed it with unique numbers.

Some advices please
thanks a lot,
Deh

Not To Display Repeated Mcs And Loaded Text
hi this is the code for random movieclips and loaded text

i wanted that once the random movieclips appear once
it should not be repeated again

it is displaying like this 3,2,3,4,1,3,1,5

i wanted like this 3,2,4,1,5

pls help somebody
file is attached pls check

var myInterval:Number;
var count:Number = 0;
var maxCount:Number = 4;
var examples:Array = new Array("text1.txt", "text2.txt", "text3.txt", "text4.txt", "text5.txt");
var mcs:Array = new Array("mc1","mc2","mc3","mc4","mc5");
thisText = new LoadVars();
thisText.onLoad = function(success)
{
if (success) {
TextHolder.text = thisText.counts;
}
};

function mytimer() {
eval("mc"+ran).gotoAndStop(1);
ran = random(maxCount)+1;
thisText.load("text"+ran+".txt");
eval("mc"+ran).gotoAndStop(2);
}
if(myInterval != null) {
clearInterval(myInterval);
}

myInterval = setInterval(this, "mytimer", 2000, examples[count], mcs[count]);

Horizontal Image Scrolling - Repeated
Hello

Disclaimer: New to AS and would love any help you could provide ... thanks.

Description: I have 8 images which need to scroll horizontally in a project. As they scroll off the page I need them to reset and begin to scroll again when it is their turn.

I am using the following AS to move them across the canvas:

this.onEnterFrame = function() {
if (this.circle_mc._x < 550) {
this.circle_mc._x += 3;
}
if (this.square_mc._x < 550) {
this.square_mc._x += 3;
}

}

I obviously have no problem having them end off screen ... but how can I have them reset to the other side of the page and resume the above script?

Thanks again for any help ... if you need more information, please let me know.

-Scott

Repeated Sound Effect When Mouse Over
Hi, there

I have a few buttons with the click sound effect. The problem is that when the mouse is rolled over, the "click" sound repeated twice. Would you please take a look at the fla file that was uploaded in the briefcase?? Thank you so much.

http://briefcase.yahoo.com
User: ids4681
Password: group3
File: Sound button

Again, thanks a lot!

Cheers

Varible Only Passes On Repeated Click?
I have an issue. I have a bunch of mc.buttons that have a code on them to set a variable to a new value. They are assigning the varible in question a new value, but ONLY on the second click of that mc.button. Any reason why?

This is a sampling of the actions / code:


ActionScript Code:
// create the variable
var currentPhoto;
 
//action for "tell a friend" button
mc_tellafriend.button.onRelease = function() {
    tellafriend_JS();
};
 
//action to launch a particular document
function tellafriend_JS () {
    if (currentPhoto == "SP0511001"){
        getURL("javascript:tafcat('http://www.bcbgirls.com/spring2005/tellafriend/taf_catalogNew.php?id=SP0511001')");
    }
    if (currentPhoto == "SP0511002"){
        getURL("javascript:tafcat('http://www.bcbgirls.com/spring2005/tellafriend/taf_catalogNew.php?id=SP0511002')");
    }
};
 
//image buttons that set the new variable
imagebutton.onRelease = function() {
    trace(currentPhoto);  //monitor what the value of currentPhoto is
    currentPhoto = "SP0511001";  //set value of current photo to be the first catalog selection
};
 
imagebutton2.onRelease = function() {
    trace(currentPhoto);  //monitor what the value of currentPhoto is
    currentPhoto = "SP0511002";  //set value of current photo to be the first catalog selection
};


Thanks for listening

I Just Broke My Head From Repeated Wall Banging... Please Help
I'm trying to set up a dynamic News area for the upcoming version of my site and am testing it out using a dummy Flash movie with just the news display area. However, it's just not working right.

I wanted to set up a series of arrays inside Flash, one for each field: Title, Date, URL, and Content. The way I outputted was:

"fieldname=row1,row2,row3" etc.

You can see the actual output here:
http://www.wickedpenguin.com/codetest/Loadnews.cfm

When I run it LOCALLY using a text file copied directly from the URL above, the display works fine and displays both of the current news items.

HOWEVER, when I upload and run it live on my site, I get this result:
http://www.wickedpenguin.com/codetest/site.cfm

The original strings (prior to splitting) show up in the upper left corner. As you can see, there are TWO titles ( "BandCode..." and "Tribute..." ) but only ONE shows up in the main body of the page.

Any ideas why the movie would be producing two different outputs from identical data? I've been at this for eight hours and I'd really appreciate any help!

Many thanks!

Creating A Repeated Pre Loader To Multiple Movies
Hi there everyone, I have created a site at:

xelent.netfirms.com

And as you will see I have created a movie for the interface of many other movies which are unloaded to a registration point within that interface. These other movies are accessed via the button pad at the bottom of the interface. As you can see I have included a load indicator on this interface, this is to enable me to show the user the progress of each movie that is being unloaded.

I am afraid I am at a loss as to how to implement this progress bar when each movie is unloaded. I am requiring a formulaic principle that can be easily applied to multiple movies, not necessarily just the 10 times but maybe a 100. So an easy to apply method of which I can repeat would be excellent.

I have a progress bar already constructed, but this one merely applies to one movie. Any help in deciphering my problem would be gratefully appreciated.

Repeated Button Click Toggles Scenes
Hello there. I've been trying to fix a quirk that I recently discovered in my web site. Whenever I click a button more than once, it toggles between the targeted scene and the scene directly following. The code I have on the buttons is:


Code:
on (release) {
_root.gotoAndPlay("Summarah's Bio", "summarahs-bio");
}
or


Code:
on (release) {
_level0.gotoAndPlay("Summarah's Bio", "summarahs-bio");
}
Can anyone tell me what's going on here, and how to fix it? I would be most grateful for any assistance, because right now, I'm stumped.

Thanks,
Summarah

Repeated Timed Downloads With Loader Class
I would like to measure how long it takes to download a file with the Loader class, and do it several times in succession.

The problem is that the file gets cached locally, so after the first timed download, I'm accessing the file locally in cache.

I've seen some techniques using URLLoader to fool the browser into thinking it's downloading a new file. Basically, you append a url variable to the file name, and in the variable is a function that makes the value unique each time, for instance:

filename?u=GetTimer().

This does not seem to work with Loader.

Any ideas for preventing Loader from loading a file from cache?

I have a sample app running at:

http://www.greendept.com/cs4/time_download.html

Here's my code:

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.utils.getTimer;
import flash.text.*;

var open_txt:TextField = new TextField();
var elapsed_txt:TextField = new TextField();

open_txt.width=100;
elapsed_txt.width=100;
open_txt.height=50;
elapsed_txt.height=50;

open_txt.y=300;
elapsed_txt.y=300;
open_txt.x=50;
elapsed_txt.x=250;
open_txt.border = true;
elapsed_txt.border = true;

open_txt.htmlText= "--- ";
elapsed_txt.htmlText = "--- ";
addChild(open_txt);
addChild(elapsed_txt);

var preview:Loader = new Loader();

preview.contentLoaderInfo.addEventListener(Event.O PEN,onOpen);
preview.contentLoaderInfo.addEventListener(Event.C OMPLETE,onComplete);
var openTime:Number;
function onOpen(evt:Event):void {
openTime=getTimer();
open_txt.htmlText= "open : "+String(openTime);
trace("open");
}
function onComplete(evt:Event):void {
var elapsedseconds:Number = (getTimer() - openTime)/1000;
elapsed_txt.htmlText = "elapsed : "+String(elapsedseconds);
trace("elapsed");
}
loadPreview(preview, "pouring_juice.png");

function loadPreview(loader:Loader, previewFile:String):void {
var u:URLRequest=new URLRequest(previewFile);
loader.load(u);
addChild(loader);
}

Syncing Repeated Sound With Spinning Wheel..
Hey guys,

I have a wheel of fortune style game with a wheel spinning and an arrow which should make a sound everytime is passes a slice of the wheel. Im using the Fuse & ZigoEngine to do the tweening. I currently have the sound being made and it works well reguardless of how fast the wheel is spinning (the sound speeds up and slows down with the wheel).

The problem with the approach that I am using is that the actual rebert penner easing equation function is doing the checking for when a condition is true to make the sound. I have tired capturing an onTweenUpdate event from the ZigoEngine but it seems as though its never accurate when the wheel starts spinning fast because the code in the event listener cant keep up with the wheel speed. Also when I use the event listener all i can access is the _rotation property and then I run into having to deal with the rotation going into negative space as opposed to the easing function which just puts out the current total rotation at that current point in the tween.

Basically what I am looking for isnt a specific answer of how to do something but maybe some thoughts and oppinions on how I could do this without having to invade the actual easing equations, It just isnt very OOP or organized in my oppinion to have to do that.

So with that... what experiences if any has anyone had with spinning a wheel and sending out events when the wheel is at certain points in its rotation? Has anyone done this before or does anyone know of any examples of something similar. Any suggestions of how I could do this differently?

Thanks for the help in advance!

Repeated Download Newest Version Of Flash Message
i keep getting the download the newest version of the flash player message on sites such as adultswim.com toonamijetstream.com ect but im shure i have the newest version is there anything i can do i have tryed uninstalling and reinstalling over and over even system restoreing to a few weeks ago when im shure it did work would going back to flash 8 or anything eles work plz help me :(

Repeated Calling Of Javascript Function: Is Flash 5 Causing Me Problems?
On a project, I have assigned a Javascript function to many of the buttons on my interface so that they could share the function, call it and spawn equal-sized popup windows for each case.

The Javascript went like this, the function being named "call":

<script>
function call(ind)
{
call=window.open(ind,'call','toolbar=no,status=no, width=550,height=400');
}
</script>

The Actionscript for one of these buttons would go like this:

on (release) {
getURL ("javascript:call('URL');");
}

So most of the buttons in the interface used this function.

Spawning a window, then closing it and then trying to open it again with the button caused a script error in IE6 like this:

"The callee is not available and disappeared; all connections are invalid."

Which obviously meant that the failure took out all the rest of the buttons that were depending upon the function too! Have you any idea how this happens? Have I made a stoopid mistake? Is it a Flash thing that requires separate functions or variables for every button?

I'd appreciate some help on this. Deadlines etc. Thanks, guyz!

[MX04] Repeated Tasks- Anything Similar To Photoshop's "Actions"?
Hey there- I am going to be repeating the same tasks many times in Flash and was wondering if there is anything in the program similar to "Actions" in Photoshop, wherein steps are recorded and can be applied to another object with the click of a button?

For example:
I create a shape on the stage and then want to...

1. Copy shape.
2. Paste to new layer.
3. Convert copied shape to graphic.
4. Change alpha to 40%
5. etc. etc.

What if I want to do this to MANY shapes- is there a way to automate the steps?

Thanks in advance...

Problem: Repeated "getBytesTotal"-check (on An XML-file) Sticks?
Greetings.

I have a Problem:

a "setInterval"-triggered function reloads an external XML-file (about 1300 - 1900 Bytes) every 30 seconds.
the "onLoad" of the XML-handler of that file then checks the filesize with "this.getBytesTotal()".
the Bytesize is compared to another value stored in a variable. At startup this is set to 0, then upon every onLoad (after the check), it's overwritten with the new value.
when I try this online, it gives me the same filesize every time, no matter what I put in that XML or how long I make it.
This whole thing works easily with a different project that I used this on- and that project uses several onLoad-handlers for 6 or 7 XML files.

It works well when I try it locally. Both files are located in different folders on the server and I mapped that exact structure locally.

SWF>> one wo hreefourfiveFILE.SWF
XML>> onesixsevenFILE.XML

The SWF opens the XML with "../../../../six/seven/FILE.XML" and it works locally, as well as upon the first load (the data is displayed, no error message)... it just doesn't do the refreshing.


Or rather- it does the refreshing (it loads the file / executes the "onLoad") but the file that it retrieves seems to have the old filesize.

The other project where this example works uses the same folder-structure.

Does anyone know what might be the cause of the problem?

Thanks in advance

Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:

loadMovieNum(path, 0);

This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.

I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:

c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

this successfully loads banner.swf in place of c.swf, with the following correct querystring appended

banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

If I try:

c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable

this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):

banner.swf?clicktag=http://www.myurl.com&another=variable

what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...

Even URL-encoding the URL doesn't change this

For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----

<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>








Attach Code

----c.swf----

var queryString:String = "";

for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}

if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}

























Edited: 10/01/2008 at 10:40:48 AM by Inzoum

Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]

All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.

Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.

a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.

b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.

The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.

Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!

Here's a link to view navigation-1.html, the file that calls gallery4.swf

Here's a link to just view gallery4.swf

Here's the .zip of the files involved.

Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA

Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!

Thanks,
upp'ed to motrin5xaday for tonight...

Copyright © 2005-08 www.BigResource.com, All rights reserved