ActionScript 2.0 :: Create Random Text For Movie Clips / Drag And Drop Dynamic Text?
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
Similar Posts:
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 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 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
Oct 20, 2009
I have 20 squares, each one has a different number(1, 2, 3, etc.) The number is in a dynamic text box which is centered above the square( the square is a Sprite object called "MySquare".) I would like to make the squares drag and droppable. When I test the movie, the arrow cursor becomes a vertical line when over the number. I can click on the edge of the square but then the cursor automatically goes to the center and the compiler returns the error: property StopDrag not found on flash.text.textField.
Here is ActionScript Code:
var startX:Number;
var startY:Number;
var m1:MySquare = new MySquare();
m1.theText.text="1";
addChild(m1);
[Code] .....
View 7 Replies
Aug 24, 2010
So Im working on a very simple drag and drop flash game using AS3. Everything is complete but I'm having an issue with the dynamic text. For some reason when you drop the item onto its target and accompanying dynamic text is all effed up.. for example when it should say "Try Again!" it says "r ain!".. I've been banging my head for the last few hours with no luck..And here is my code:
Code:
var startX:Number;
var startY:Number;
[code].....
View 2 Replies
Aug 12, 2009
I'm really new to AS3 and could use some help. I have a movieClip with a drag and drop functionality that's working fine but then inside this movieClip is a dynamic text field and it won't let me click over the text field to start dragging and if I click off to the side I can drag but the movieClip is automatically centered and then I can't drop because now the text field is under the mouse and it keeps saying:
ReferenceError: Error #1069: Property stopDrag not found on flash.text.TextField and there is no default value. at MethodInfo-10()
Why is AS3 so finicky? I'm clicking on the MC for the love of $(*%@ not the text field. Errr..
View 1 Replies
Nov 16, 2009
I have a button that has an onPress function that attaches a movieclip with startDrag(true) so the attached movie snaps to the mouse and can be dragged around. The problem is that I don't know how to set up the onRelease function so that when the mouse button is lifted the attached movieclip is removed. Also, the attached movie appears in the upper left corner for just an instant before snapping to the mouse.
View 9 Replies
Dec 3, 2009
I programmatically added 20 instances of a movie clip named "Token" to the stage. Token consists of a small rectangle and a dynamic text field. Each instance of Token was named "tkn." I'm attempting implement drag & drop for these movie clips. In the drag function which is called by the Mouse_Down event I've traced e.target.name. Instead of getting the name of the movie clip, tkn, I get name of the text field contained within tkn. After a lot of searching I found the mouseChildren property and within the code for the movie clip I now have the statement "this.mouseChildren = false;" This change corrected the name problem. I no longer get the name of the text field, but the movie clip name has been changed to "instancexxx," where xxx is a 3 digit number. Since I only want to drag the tkn movie clips I am testing e.target.name. How do I get Flash to keep the name of the movie clip as tkn?
View 2 Replies
Dec 8, 2005
I need to set up a Flash swf that enables me to drag and drop a series of shapes from point A to their individual point Bs. However, I need to ensure that this can only be done in a particular sequence. i.e. shape 1 must be moved first, then shape 2, etc. If the wrong shape is moved out of sequence, it snaps back to the starting position until the user moves the correct one.I have the following actionscript on a button within the movie clip which drags :
on(press) {
startDrag(this);
}
on(release) {
stopDrag();
[code]....
I need some way for the dragging and placing of each shape to only occur if the shape before it in the sequence has already been placed correctly.
View 11 Replies
Oct 29, 2010
My project is to allow web visitors drag furniture onto a floor plan. I need the items to all be independent of each other with the drag and drop and then be able to rotate each item with a keyboard arrow.
The code I have allows all to drag and drop but I can only get the code to rotate one item. My Action Script 3 code follows:
[Code].....
View 5 Replies
Jun 9, 2011
I'm having trouble managing the depths of my movie clips. I've got a startDrag() function and a stopDrag() function. Whenever I rollover another MC, I want the depth of that object to change to 1+ the object it rolled over.(I apologize if my English is poor) Can anyone give me a nudge in the right direction? EDIT: This is as far as I got, but cIndex returns the depth of the object that is currently being dragged; not the object it's hovering over... Is there a way to get that depth?
[Code]...
View 2 Replies
Jun 25, 2010
'i am doing a game for children where users can drag and drop resize and scale movie clips on stage!The drag and drop is not an issue...
View 2 Replies
Feb 27, 2012
I can drag a movieclip with static text inside it, but when I change the text to dynamic, I get a Property Startdrag not found on Flash.text.textfield and there is no default value.
View 3 Replies
Aug 10, 2007
I have a Flash site I am developing that feeds in XML into various arrays and populates dynamic movie clips and text fields. I am having trouble making a for loop that works with my movieclips and text fields. I am probably only missing one step and if I can figure it out I will cut my lines of code about 10X. I have attached the fla and image files in a zip file.
View 1 Replies
Dec 21, 2011
I need to make a swf that could help him to rearrange things. Basically it means: there will be one picture with the plan of the warehouse and lots of little objects that he could drag onto the plan to see how it would work. (Damn. I am not so good in explaining.) I would like it to work like this: He goes to the page, clicks on button that creates one predrawn object to page and then he could drag it to plan. There are maybe 20 different objects.
View 6 Replies
Jan 18, 2005
When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.
I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.
View 2 Replies
Jan 18, 2005
When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.
View 5 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
Apr 13, 2011
I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.
View 3 Replies
Jan 14, 2003
how to create a random continuous flow of movie clips, The movie clips are actually pieces of text flowing from left to right across the stage at a very slow frame rate, with the text randomly changing position and size.
View 4 Replies
Mar 24, 2004
I am trying to create a program using random motion of two movie clips and uses hitTest to determine whether the two objects collide with each other.
I've gotten hitTest to work with the original movie clips, but when the user loads more movie clips (via a button and duplicateMovieClip):
[Code]...
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
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
May 13, 2009
I'm working on a schoolproject and I have a flashapplication that I want on my site. In this image you see a horizontal scrollbar and a vertical scrollbar. In the middle are the photographs, those you'll click in the horizontal scrollbar and they will enlarge (with some text). That's the red arrow. The yellow arrow is the thing I wanted too. When you click a photograph in the horizontal bar en you hold em, you can drag that photograph in the vertical bar and drop it there.
View 4 Replies
Oct 18, 2011
I've developed an drag/drop interaction which works well, the issue is with the behavior of the submit reset buttons.If the "correct" drag objects are on the "correct" target - no issuesThe problem is if an "incorrect" drag/drop combination is selected, the "incorrect" feedback text displays and the reset button moves all drag object to the start position, but once the "correct" drag drop combination is submitted, the "incorrect" feedback textdisplays.id=bb539b6eff0afbf5&sc=documents&uc=1&id=BB539B6 EFF0AFBF5%21114#
ActionScript Code:
function dragSetup(clip, targ) { clip.onPress = function() { startDrag(this); this.beingDragged=true; }; clip.onRelease = clip.onReleaseOutside=function () { stopDrag();
[code].....
View 9 Replies
Oct 18, 2011
I've developed an drag/drop interaction which works well, the issue is with the behavior of the submit reset buttons. If the "correct" drag objects are on the "correct" target - no issues
The problem is if an "incorrect" drag/drop combination is selected, the "incorrect" feedback text displays and the reset button moves all drag object to the start position, but once the "correct" drag drop combination is submitted, the "incorrect" feedback text displays.The fla can be viewed here: [url].....The relevant code is:
On Frame 1:
ActionScript Code:
function dragSetup(clip, targ) {
clip.onPress = function() {[code].....
View 0 Replies
May 13, 2010
I'm cruising through the Classroom in a Book series for ActionScript 3.0 and I'm having problems with the uiscrollbar attaching to a text field. I've used them before, but this time when I drag it over to the text field it keeps jumpimg to the outside of the box instead of attaching and I can't seem to get in inside the box unless I manually change the X and Y settings and force it where I want it to be. Even then it doesn't work correctly.
View 2 Replies
Mar 13, 2010
Currently I have an input text field in the middle of my stage "newtext01_txt". The user can obviously type whatever they wish inside of the textbox - however I also want them to be able to drag and drop the textbox wherever they want... incorporating e.target.StartDrag and e.target.StopDrag with the textbox.
View 9 Replies