ActionScript 3.0 :: Using A Conditional To Drop A "0" From Some Pre-load Text?
Apr 14, 2009
I've got a little pre-load action going on and there is a Dynmaic text feild with and instance name of "loaded_txt" and it pretty much is counting up from 0 to 100 and loading. I'm trying to write a conditional statement that will place a "0" pad in front of the dynamic text until it hits 10 and then just counts up normally. Its close to working but I'm getting some push back with on the else statement:
1083: Syntax error: else is unexpected.
I thought that this wPHP a a proper use of the "else" statement but somthing is wrong I'm also a bit fuzzy on the properties I'm comparing does that look right to everyone? Code in question:
[Code]....
View 1 Replies
Similar Posts:
Mar 25, 2010
I am currently working with a hierarchical tree structure in AS3/Flex, and want to enable drag and drop capabilities under certain conditions: Only parent/top level nodes can be moved Parent/top level nodes must remain at this level; they can not be moved to child nodes of other parent nodes Using the dragEnter event of the tree, I am able to handle condition 1 easily.
[Code]....
View 1 Replies
Jul 9, 2009
I'm extremely new to AS3, and programming in general, and so hopefully this will be a simple problem someone can help me solve. I'm trying to have a user input a number in a text box, and then depending on what they input, take them to a different frame. (it's a math quiz, and the users are answering an addition problem). I think I need to define the variable type of the text box somehow before the code will work, but I'm not exactly sure what to do or how to do it.[code]...
View 3 Replies
Apr 27, 2010
Question 1I want to display text based on what is resolved within this part
Code:
feedback.htmlText +="<font color='#fc0c33'>Your score is "+Math.round(score*100)+"%</font>."
[code].....
View 2 Replies
Feb 9, 2010
I have a dynamic text box (called navgxchangeBox below) that is being fed by an xml file.Depending on the output (weather positive or negetive) I'd like the text to display green (for pos) or red (for neg). I know I need to write a if conditional statement but not sure if it is correct. The text is displaying in color, but I don't think the condition loop is executing. Can anyone look at my code below and tell me what I am doing wrong?
ActionScript Code:
//
var myXML = new XML();
[code].....
View 3 Replies
Jan 20, 2009
I have been making a memory game, where words are shown to the user. Once they have memorised the words they go to the next screen where the words that they have memorised are shown. They then have to drag each word into a "correct" place and a "wrong" place. I now want to edit it so that I can use two arrays one for correct words and one for wrong words. I want to generate random words from each of these arrays. I have sort of worked out how this is possible to do but using dynamic text, but am I correct in thinking that the whole dragging the words thing is not possible with dynamic text. (I may be wrong though, I am quite new to flash).
View 2 Replies
May 1, 2009
The desired affect is simple: I have a single button... with each click I want it to load text into a dynamic text field and load a corresponding picture or movieclip.There are only three unique text/image combinations- after its displayed the third, with the next click I want it to just start over. All the text functions perfectly with each click.
The problem is:I use "createEmptyMovieClip" then use the resulting clip as a loader clip.. With the first click I want a movieclip from the library to load, so I use the "attachMovie" method- it displays the first library fine.With the next click I want to load an external swf- so I call the "loadMovie" method of the loaderclip... The external swf loads just fine replacing the first library clip.The third clip is where I have problems... now I want to load another library item into the loaderclip... so I tried using the attachMovie method again but the external swf remains static... then with the next click, I discover the first library item no longer loads and the external swf remains still playing- it's like once it's been loaded into the loaderclip it cant be moved...
So I tried adding the "unloadMovie" method in the code for the third click.. it successfully removed the swf... but the next line of code immediately after the unload statement, doesn't work. The line calls the attachMovie method for the loaderclip... but the library item doesnt load... Oddly enough, with the next click, the first library item now does load as if everything's fine... It seems like you cant use the unloadMovie and attachMovie on the same executing code? if that makes any sense... the basic idea was that if I couldnt get the attachmovie method to replace the loaded external swf, then I would use the unload method to remove it, then have code immediately after, to then execute the attachMovie method... but it still doesnt load the library clip. and I know it's not a type-o, because when I comment out the loadMovie and unloadMovie statements, it loads both the library items perfectly ? The code is below
var increment:Number = 1;
var verbiage1:String = "Hello World1";
var verbiage2:String = "Hello World2";[code].............
View 2 Replies
Dec 12, 2010
I've got this human figure that i want people to drag it to an outline of the human figure and when it snaps to it, it'll automatically load to a new scene. I've got this code thats working but how do i add the snap function and the execution to the next page?
[Code]....
View 0 Replies
Sep 23, 2009
I'm trying to load external swf's with a drop menu, this menu it's a movie clip and I,m trying to controlling it with script out of the movie clip, the main button apparently works fine but the rest of the code fail. And i want to know how can i make a script for the sub menus.
[Code].....
View 2 Replies
Jun 27, 2010
I am implementing drag and drop from a DataGrid onto a List in a Flex 3 AIR application. I would like to have the drag image be a photo (jpg) referenced by a String field in the data grid item, named 'imagePath'. I'm having trouble getting the image to show up during dragging. I have triple checked that it is not because of an invalid path to the image. I have tried Image's source() and load() methods in every way I can think of. I am calling this method 'dragCurrentToList(event)' on a mouseDown event.[code]This works perfectly if I set the image source to the following bindable variable but I don't want to hardcode the image name.[code]
View 1 Replies
Jul 27, 2010
I am trying to figure out how to make a component drop down box load an external swf.
I am also trying to figure out how to get a combo box to load a movieclip.
View 0 Replies
Apr 14, 2011
Everything seems to work correctly locally, until I upload it to the test server. The SWF will connect to the database, but it won't load the images, and the drag and drop functionality messed up.
View 2 Replies
May 10, 2011
When the the 1. , 2. and 3. lines have boxes dropped on them I want the movie clip to load. I haven't been able to achive this. but I found a temporary way around it by making the clip load once the "3." target is full. this works but isn't completly accurate, I need it to also check if the other targets are full before the clip loads. I'm thinking it's something like:
"if (demons_mc.hitTest("targetCircle3+targetCircle2+targetCircle1")){this ._parent.gotoAndPlay("join"); }"
View 5 Replies
Feb 28, 2011
This is what I used to load an external image into a movie clip and drag and drop. The feedback part is pretty much the same from the old code.[code]...
View 1 Replies
Feb 26, 2011
I would like to know how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.I have both Var Load and starDrag codes. I am trying to figure out how to combine them.
View 3 Replies
Apr 1, 2011
Im just wondering is there a way I can load flv's externally into flash and then move them around like a drag and drop function?
View 4 Replies
Feb 26, 2011
how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.
I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.
View 4 Replies
Mar 30, 2011
I am trying to make a drop down menu for my website navigation. Right now my navigation is just text and I want to have drop down on only a few links. I only want to have text no shapes as buttons just text.
View 3 Replies
Oct 19, 2010
I'm trying to add drop shadow to text, however, I don't see the "filters" panel. I'm not sure how to enable it.I've uploaded a screenshot of my current workspace, maybe someone can tell me where I go to enable the filters window/panel: URL...
View 2 Replies
Mar 30, 2011
I am trying to make a drop down menu for my website navigation. Right now my navigation is just text and I want to have drop down on only a few links. I only want to have text no shapes as buttons just text.
View 3 Replies
Jan 20, 2009
Just wondering if anyone knows of anyway i can put images AND text into the drop down section of a combo box. An example of what I'm trying to achieve is in the attached jpeg.
View 2 Replies
Jun 19, 2009
for a project I need to be able drag around input text, and still be able to type in it.
View 3 Replies
Feb 9, 2009
I need to have drag and drop functionality on a dynamic text box. I searched and from my understanding Flash does not allow startDrag() and stopDrag() on a text box. Am I correct in saying that I have to somehow embed the text box onto a movieclip and drag the movieclip? If so, how can I embed a text box on a MC in this manner?
View 1 Replies
Jul 11, 2011
I want to drag and drop an input textfield where the user than can enter their name so to speak but put it anywhere they want.so far i can just drag and drop everything but when you convert the input text the whole of it becomes drag and drop and you cant input .
View 2 Replies
Sep 2, 2010
why the text is not appearing in my drop-down menu. When I click on the menu just the backgrounds appear for each selection, but no text on them.
var menuButtons:Array = ["Skin Tone"];
var subMenu1:Array = ["White", "Brown", "Tan", "Olive"];
var chosenMenu:Array = new Array();
var subMenuOpened:Boolean = false;
[Code].....
View 20 Replies
Oct 16, 2011
So I'm trying to make a game where you have to complete a text with words (or expressions) from a stock. The text would be full of holes and to fill those holes you'd have to drag and then drop words contained in a stock. A bit like this:
[Code]...
Now I know this is possible, I have seen it (in flash) already... but I have absolutely no clue how to go about coding it myself. What I find particularly difficult is having a drop zone in a middle of a text. How do you use the hitTestObject function with just text??
View 3 Replies
Jun 24, 2009
i am working on Flash T-shirt Designing .. in it i need to add custom text on t-shirt and also want to drag and resize that text..
i used
on (press) {
StartDrag (this) ;
}
on (release) {
StopDrag ();
}
for text .. but then i cant change the text again ..
View 2 Replies
Jul 26, 2010
I want to make a jigsaw puzzle wherein a text box tells the user/player if the designated piece is in a correct/incorrect place. If it's incorrect, the piece would return to it's place from where it was dragged from.
View 4 Replies
Sep 13, 2010
How is a menu like the one on the link below produced? (a text dropdown menu, effectively - either in as3, as2 or via movieclips?)[URL]..Any tutorials, flash examples, or code that could help me would be great.
[Code]...
View 1 Replies
Sep 21, 2010
So I'm doing this project and as an animator I'm not familiar with the whole action script side of flash.Okay so far I've managed to create the whole Drag and Drop feature and it works well, the thing is I want to make it so when you drag in object in the correct spot and new text appears, and I need like six different object with six different text. but I have no idea how to integrated it in my code or where I should start!
View 1 Replies