ActionScript :: Flash - Check The Value Of The Loop Parameter?
Nov 24, 2010
There are a number of parameters that can be added to object and embed tags to embed flash videos. Most are listed here. Some of them can be accessed/changed programmatically via ActionScript (e.g. <param name="scale"> can be accessed via stage.scaleMode).
Can the value for the loop parameter be accessed/changed?
Edit to add: I know about flashvars, that's not what I'm asking.
View 2 Replies
Similar Posts:
Dec 8, 2009
I am trying to read a XML file and check a parameter for duplicates of that parameter in the file. There could be up to 200 entries with this parameter which is a number. How can I check to see if there are any duplicates?
View 2 Replies
Mar 15, 2004
This is wath my collision function looks like
[Code]...
I have two targets, my question is, how do I use that collision function to check both targets? Should I use an inparameter like ballClass.prototype.collisionDetection = function(target)] and how do I call that funtion from the other movieclips?
View 2 Replies
Jun 25, 2010
this function is use to generate characters, is there anyway to generate character by passing in a parameter instead of check with if statements?
function charcheck() {
for (i=2; i<9; i++) {
com = new c1();
[Code]....
View 1 Replies
Oct 3, 2011
I have the following embedded flash code:
<object width="647" height="483" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">
<param name="salign" value="lt" />
<param name="quality" value="high" />
[code]....
I've been trying to get it to loop after it finishes playing, but it doesn't seem to work even with the "loop" parameter set to "true." I read online that there may be something with the flash file (exporting from the original .fla), but this is actually a .flv file that I imported into Flash, and exported as an .swf file.
View 2 Replies
Mar 19, 2011
for(var i=1;i<=2;i++)
{
var mc=attachMovie("mc_name","obj"+i,i)
mc._x=200*i;
[code]....
this code places two objects obj1 and obj2 and two buttons button1 and button2
button1 is expected to return _level0.obj1
button2 is expected to return _level0.obj2
Instead they both return _level0.obj2. Obviously, each button is passed the object corresponding to the last "i" in the loop. How shall I sort this out? One of the obvious solution sis to attach each button to its object
mc.mc=mc.attachMovie("button","button"+i,i+10);
but this is not acceptable for some other reason I also have to use this for(var i=1;i<=2;i++) block because in the final application the number of objects will be variable and set by the user at the run time.
View 4 Replies
Mar 7, 2004
i've been struggling with the following:
i am creating a list of buttons with an attachMovie. the AS is :
//as
var i = -1;
while(++i<userlist.length){
var user = userlist[i];
[Code].....
okay the problem is this: then i assign an on click function to every button right in the while loop that uses the data parameter of the "ob" object and when i play the movie the data parameter is always the parameter of the last object created for all the buttons. I know why this is happening- it overWrites the old "ob" with the new with every itteration of the loop.
But how would i go differently about creating an individual "ob" for each button created and still be able to have a function with a data parameter like this.onRelease.userClicked(data)?
View 9 Replies
Sep 3, 2004
I am trying to make a quiz work online. At the moment pupils can start playing before all the questions are loaded and it mucks it up. I tried putting a 'loading question' frame in. In this I put a movie clip with only made a continue button appear after 30 seconds. But this is not practical as all servers take a different time to load. I know I need to put in a loop but am having problems and would be grateful for help.
I have the questions saved as 15 notepad files in a folder. The folder is named Women. When they choose this topic they press a button with this code.
[Code]...
View 3 Replies
Sep 5, 2010
I'm having a bit of trouble with a script to check a 'dynamic number'...
Basically, I've got a movie which plays in a loop and each time it goes around, it clicks up a number, which I have on the stage as 'dynamic text' called "ImageNumber" - this bit is working fine it uses the following code to add[code]...
View 8 Replies
May 5, 2009
is this a "valid" method to check if the current image is loaded before going to the next loop/image?
[Code].....
View 7 Replies
Apr 6, 2012
What am trying to do is match an Array of possible passwords to the correct password and trace if the password is correct or not. This is what I have so far.
var passWords:Array = ["catdog", "fatcow", "yoda", "petergriffin"];
var userPassword:String = "petergriffin";
var wrongPassword:Boolean = false;
[Code].....
View 1 Replies
Jan 16, 2009
I was trying to set up a loop which checks to see if all files are available from an array before loading them in. I have got it working to a point where it traces out file is loaded or not but I cant seem to trace out which actual file name is missing eg. myfile1.swf is missing.
[Code]...
View 0 Replies
Sep 18, 2007
I have a frame that plays and checks and prints the width of a movieclip, but the movieclip is constantly changing size, so I would like the textfield to show the movieclip width as is scales. I would assume I need to create a method of looping the code that checks the width, maybe a setinterval?
Code:
ypos.text = (this.rulerslave.picture_mc._width);
xpos.text = ("1");
[code].....
View 4 Replies
Nov 2, 2003
i'm trying to check the passwords and names and i want it to goto the next frame if they match, security isn't really an issue so i'm not going to go through php and mySQL and stuffhere's the code:
Code:
on (release) {
i = 0;
[code].....
View 3 Replies
Aug 19, 2011
In my game there appear scores when you shoot down enemies. That kinda works so far but they overlap when the enemies were too close to each other when shot down.Now what I'd like to do is to prevent the overlapping of the scores. The basic idea I had was to loop through the array of scores and to check the distance to each other.
Code:
private function checkScoreDistance():void
{
scoreManager.scoreCount = scoreManager.scores.length;[code]........
View 2 Replies
Oct 9, 2010
i have several check boxes and input texts on stage and would like to null out their values with a reset button but seem to be having issues, can anyone take a look
[Code]....
TypeError: Error #1010: A term is undefined and has no properties.
at Main/resetHandler()
View 9 Replies
Dec 20, 2010
I'm making a plugin that used for posting a http url to the server every 3mins when we open a stream. and the server system will return
- 200 OK
- 400 FAIL.
In case of OK do nothing In case of FAIL stop the stream and open an pop-up window. User can press OK and a new page will be open.
View 0 Replies
Dec 14, 2010
Can we skip an optional parameter and assign value to the parameter after the skipped one?
For example I have a function:
public function Dialog(message:String,title:String="Note",dialogsize:int=99):void
{
}
I can easily call the function with a message and a title:
Dialog("HELLO","Intro");
Is there a way to skip the title and just pass in the dialogsize? I've tried it but can't make it work:
Dialog("HELLO",,dialogsize);
Is it possible to skip some optional parameters without using (rest) parameter?
View 3 Replies
Apr 10, 2008
I'm using Kirupa's "search array" to check wether something is loaded. It "works" however it doesn't stop if daft = 1, so it keeps checking and gives its final answer as 0 if I can't escape from the for loop I don't know
[Code]...
View 3 Replies
Apr 5, 2005
I have 'Sound On' and 'Sound Off' buttons on mutiple scenes and I am playing the music loop in my flash movie by loading an external swf. When I move to the next scene the sound reloads which I do not want. How do I use an if-statement that checks whether or not the music.swf, that needs to be loaded is found and when it is found, go to a frame?
View 1 Replies
Aug 25, 2011
ActionScript Code:
var answerArray:Array = ["3", "2", "5", "3", "2"]; //these are the correct answers
var answeredArray:Array = ["3", "1", "1", "3", "2"]; //this is an example of what the user
[code]....
View 3 Replies
Aug 14, 2009
Forgive me for this stupid noob question but I want to call a function (loadList) that originally gets triggered after a mouseevent from another function (addToXML) that does not have an event.
The loadList function takes info from a XML var, sticks it into an array which then gets loaded into a tile list and that is working fine.
The addToXML function when called adds elements to the XML var after which I want to call the first function with the event parameter so it refreshes the items in the tile list.
I know it can do this by creating a new array and loading that into the tile list in the addToXML function, but it be much simpler to just recall the function.
I have tried things like
Code:
addToXML.addEventListener(Event.COMPLETE, loadList);
but all the event constants I have tried give me error messges like "1061: Call to a possibly undefined method addEventListener through a reference with static type Function."
View 3 Replies
Oct 2, 2009
See [URL] Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified. Check exists in the libary (but does not have an instance name) and no where else on the stage. when I run this code I get: 1180: Call to a possibly undefined method Check. -> var rightCheck = new Check(); How is it undefinded if it exists in the libary?
View 7 Replies
Jan 27, 2011
The following is my codes. This is still work in progress; so, you will see some functions with empty contents. Plus, this is my first Flex application; please bear with me. This is a quiz application that gets the questions and answers to each questions from a ColdFusion web service. There are three types of questions, True or False, Multiple Choice with single selection, and Multiple Choice with multiple selections. So, based upon the question type, the application would dynamically generate the appropriate amount of radio buttons or check boxes for the users to select. I got these working. The problem that I am having is, I am not sure how to check what the users have actually selected. In some other forums and posts on other web site, it said that I can use event.currentTarget.selectedValue to get the user selection. But when I actually do it, I got a run-time error saying, "Property selectedValue not found on mx.controls.FormItem and there is no default value." My question is, what do I need to do to capture the user selections?
[Code]...
View 1 Replies
Aug 12, 2009
CS4 was working fine for a few weeks, then yesterday I opened an FLA and got an error pop-up that said "Parameter is Incorrect". The error happened for all FLA files. I could save changes but could not preveiw or publish (same Parameter is Incorrect error as on starting CS4). I even made a blank FLA and it wouldn't work either.
Relized today during more testing that this error only happens any time I open a file that is on my desktop (running XP). Same file moved into another folder (Even desktop ewfolder) works fine.
View 5 Replies
May 6, 2010
im having problems with the following code:
for (var i:Number=0; i<numFaces;i++){
var faceLoader:Loader = new Loader();
faceLoader.contentLoaderInfo.addEventListener( Event.INIT,
function(fle:Event){
[code]....
The problem is that im sending the variable i to the function LoadCara on every iteration, and its always called with the last value of i. I would like this function to be called with the appropiate index.
View 2 Replies
Nov 2, 2010
i am getting the Parameter url must be non-null error while trying to pass the path of an XML file to an Shockwave flash object.The javascript code is as follows
<script type="text/javascript">
var so = new SWFObject("preview.swf", "", "100%", "100%", "9", "#ffffff");
so.addParam("allowFullScreen", "true");
[code]......
View 1 Replies
Nov 23, 2009
basically, the ecard will start with 3 questions.each question has 3 answers.so user choses the answer e.g. B, B, C and clicks preview.it will play the movie clip assigned to B B C in sequence.then user can click send to sent to friend.so the URL needs to be able to identify the sequence maybe in parameters.so that when his friend receives the ecard and clicks on the flash it will play B B C sequence.then his frind can create his own ecard and maybe A C A etc...So how i created like that?
View 3 Replies
Nov 8, 2011
I have a flash file that has a movie clip in it. In this movie clip there are two movie clips. What I need to do is show a one movie clip and hide another. I basically only need help with setting up the reading of the flash parameter code in flash...
Code:
var imageToShow:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
This is basically what I have.I'm not sure what to go on to next or if this is even correct. I basically need to get to the point where I can say...
Code:
if (parameter == "image1") {
image.image1.alpha = 1;
image.image2.alpha = 0;
}[code].......
View 3 Replies
Feb 2, 2008
i have 1 PHP page in which i have a Flash animation. this flash swf file, display 2 fields and 1 button.
this php page is called "test.php".
i'm able to send data from Flash to a PHP page, but i would like to send the content of those 2 fields to the "test.php" and display them. however, i do not know how to do it.
i see that it works but i'm not able to display or refresh the PHp page to display the result.
as walkaround i was thinking to collect the webpage address where is executed the flash and to send it to another PHP page. and this 2nd PHP page, will reload the test.php with parameters...
how to get under flash, the address of the actual executed php page ?
View 10 Replies