Professional :: Visibility, Order And Position Of Dynamic Textfields Inside Movieclip?
Dec 16, 2010
this concerns flash cs5 and the timeline.Everybody knows the effect you get when you use appendText() to add text to a multiline dynamic textfield, right ? Well, I have a movieClip as a container, and I would like dynamic textfields to populate this movieclip in the same manner as textStrings would populate the dynamic Textfield.
How would this work?I have buttons that trigger addChild() function so as to populate the movieclip with textfields, but how do I make sure that the textfields make up an arbitrary list as a menu user chooses which buttons to click?
Let's say this is the visible text when the swf runs.(I cut away some of the code to make this more to the point):
var buttonTrace:TextField=new TextField;
addChild(TextClip.buttonTrace); buttonTrace.x=0;
buttonTrace.y=0;
buttonTrace.text="Breadcrumbs";
Now for each time I click a button in the menu I've made, a new textfield appears with the name of the button. This is how I want it. BUT......... How do I control the display properties and positioning of dynamic textfields within a movieclip ? How do I control persistent visibility, and how do I make these textfields appear one after the other in the order they were clicked.
View 7 Replies
Similar Posts:
Jun 16, 2009
I am working with visibility of handCursor on text-field instances(textfield instances are created using "TextField" class) using Flash and ActionScript 3.0. But, here, I am getting a small problem in my code, which is as follows:
[Code]...
View 3 Replies
Jun 17, 2009
I am working with displaying/visibility of handCursor on text-field instances using Flash and ActionScript 3.0. But, here, I am getting a problem to the following code:
HTML Code:
import fl.containers.ScrollPane;
var myClip:MovieClip=new MovieClip();
var sp:ScrollPane = new ScrollPane();[code]..........
Create a new Flash file and add the above AS3 code into the ActionsPanel of Layer-1 and execute it.The output consists of 3 hyperlinks one upon other(in line). When, we place the mouse-cursor on the hyperlinks, then the (arrow)cursor disappears and the "handCursor" appears.It works fine when we place our mouse cursor on the 3 hyperlinks.But the issue is: still it displays the HandCursor even if we place the mouse-cursor down these three hyper-links(i.e., in white space below these 3 hyperlinks)it displays handCursor to some extent down these text fields).
View 1 Replies
Jun 16, 2009
I am working with handCursor on text-field instances using Flash and ActionScript 3.0.But, here, I am getting a problem to the following
code:
import fl.containers.ScrollPane;
HTML Code:
var myClip:MovieClip=new MovieClip();
var sp:ScrollPane = new ScrollPane();[code].......
View 1 Replies
Feb 9, 2012
This issue is my constant pain, and has set my project back some time. I'm creating a message system for my game, it's supposed to record events that happened during travel, 3 vars per message (topic, in game date, content)All the vars are in an external as file and a public class. The problem is they return blank in the mc's textfields while displaying correctly on the main timeline textfields at the same time. This is the code sitting inside the mc that doesn't work.
Code:
import Variables;
var variables:Variables = new Variables();
function setMsgSlot (e:Event) {[code]....
on the main timeline, even in the same frame, works perfectly, and i can't figure out why.
View 4 Replies
Nov 29, 2010
This is about a self assessment quiz.There will be four options and each one has a scale from1-5 i.e., "option a" has 1mark, "option b" has 2marks,"option c" has 3 marks, "option d" has 4marks and "option e" has 5 marks and we count the answered and we display the score for example if there are 20 question in it if they answered "option e" 5 times the score will be 25 and option d 5 times the score will be 20, and if "option c" for 5 times the score will be 15,and "option b" for 3 times the score will be 6 and "option a" two times the score will be 2, and we add up all the score and display in a dynamic text field called "score" and the total score is 68.
And I have another dynamic text field called "tsc" where I have to display the tags like excellent , good, better ......etc. Till now every thing is fine but I am unable to compare them it is displaying excellent even if i get 10 marks. If the score is greater than 55 "tsc" should display Excellent, if the score is greater than 41 or less than 55 "tsc" should display Best, if the score is greater than 26 or less than 40 "tsc" should display Better,if the score is none of the above "tsc" should display Poor.
This is my code on the submit button:
on (release) {
gotoAndStop("sQ");
if (scor>=55) {
tsc = "Excellent";
} else if (scor == 41 && scor<=55) {
[Code] .....
Where:"sQ" is the frame name where i am displaying the score details"scor" is the var name for the dynamic text field for displaying total score"tsc" is the var name for the dynamic text field for displaying the tags llike good, Excellent, better, poor.....etc.
View 4 Replies
Feb 10, 2010
I have a movie clip called "myMC". I set its x value as such:
[AS]
var myMC:MovieClip = new MovieClip();
addChild(myMC);
myMC.x = 100;
[Code]....
I know I could proboly acheive this with a math equation but is there a function that can get the exact global position of "myShape"? So that I can position another movieclip or sprite around that movieclip?
View 3 Replies
Jun 16, 2011
I'm trying to implement some dynamic classic TextFields, but I am seeing errors when the text tries to render. What I am doing is trying to implement a system that shows tolkens and a cash eguivent, I'm using the code
[Code]....
I'm thinking there is something in the TextField that is not set correctly, I tryed to set the autoSize to CENTER but that didn't fix much...
View 7 Replies
Feb 17, 2011
I'm working on an AS2 chat and I'd like to be able to place an emoticon at a specific location within a textbox. Is there a way of calculating a specific character's x & y position? I've even tried using textWidth and textHeight to calculate a specific location within the textbox, but the coordinates never really match. Keep in mind I have a multiline, wordwrap textbox with dynamic text in it. I've tried using monospace fonts and true type fonts, embedded and not, but the result is always very approximate, if not completely off.
View 6 Replies
Sep 29, 2009
I have 11 images i need to _x slide (left and right ) using 2 buttons. ( next and back ) my goal is to show two images at a time ( contained inside img_MC..consisting of all 11) inside a 748 x 419 mask. I have accomplished this but the next button and the back button need to disapear when img_mc is at a certain _x position...so that if you are at the last frame you can only go back...and if you are at the first frame you can only go next.
so far going forward I can get next to show...and going back I can get back to show...but in the middle when I need them both to be there I only have one or the other.
[Code]...
View 1 Replies
Feb 11, 2008
I've made a mailform and having probs with te textfields.Somehow when I use the tab it selects the left textfields from top till bottom, then the textfields that are layed out to the right. How can I amke sure the tab makes the logical order when someone whants to fill the form.
I already used setfocus to the first textfields so the cursor starts with the first to fill in textfield.
How tab form let's say tekstfield name to adres to email(variables).
View 1 Replies
Jan 24, 2010
I have a mc on stage. I want to add a new mc inside it and position it at the bottom of the mc.
The code works fine when the container mc is 100% scaled, but when I scale it, the mc inside positions wrongly.
Heres my code:
PHP Code:
// Lage scroller:var o0LbScroll:Object = getChildByName("o0LbScroll");o0LbScroll.oppKnapp = new scrollKnapp;o0LbScroll.nedKnapp = new
[Code].....
View 1 Replies
Feb 6, 2012
what i need is to position a Movieclip with coordinates inside a xml file.
View 1 Replies
May 20, 2009
how can i test the position of the mouse inside the area of a specific movieclip WITHOUT using rollover and rollout events?
the movieclip is the irregular shape (star)
i need to do some action according to the position of mouse (inside/outside of the movieclip area) but i can not use rollover event because i have a button placed over the movieclip.
View 1 Replies
Dec 1, 2009
This seems like it should be simple, but... I've been trying to figure out how to do the following, and I can't seem to make it work. It all works except for the hit test part. I have a working drag and drop application. I need something different to happen when the user drops an object while the mouse x,y is, or is not over a certain (very irregularly shaped) bitmap inside a movieClip. how to do this? I have found some complicated ways to hit test between 2 bitmaps, but not 1 bitmap and mouse x,y.
View 3 Replies
Dec 16, 2009
I am having difficulty with getting the playhead to move inside a movieclip based on the horizontal or vertical position of the mouse on the screen. I can get the horizontal motion to move the playhead, but I can't get the vertical movement to do the same. I have attached the document class .as file for it.
View 2 Replies
Feb 16, 2010
i have a pie chart with clickable sectors. when you click a sector it jumps to the next frame on a movieclip and changes colour. I want to use Local Shared Object to save the frame position so when i come back to the swf later on the sectors of the pie chart are saved.
View 16 Replies
Oct 21, 2011
I have some little listener.
stage.addEventListener(Event.RESIZE,rozmiar1);
function rozmiar1(e:Event):void
{
ofertaBTN.oCenter.width=(14.59*stage.stageWidth)/100;
ofertaBTN.oRight.x = ofertaBTN.x+ofertaBTN.oLeft.width +ofertaBTN.Ocenter.width;
}
But only ofertaBTN.oCenter.width is changing. oRight is not responding and I get error #1010.
View 1 Replies
Jan 2, 2010
If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?
This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;
View 9 Replies
Mar 4, 2009
am trying to have a moviclip on the top right corner of the flash movie no matter the size of the window like here.It works in the swf file but not in the html.The top right movieclip's position is set to
Code:
toggleFullScreenButton._y = 0;
toggleFullScreenButton._x = Stage.width-toggleFullScreenButton._width;
[code].....
View 1 Replies
Jul 12, 2010
I have created a timeline with visibility button against each column. The timeline.swf is loaded into two empty movieclips to create a two-screen operation. Everything works fine except, I cannot for the life of me get the visibility button on the first swf to affect the visibility for the column on the second swf.
[Code]...
View 5 Replies
May 2, 2011
I've got a few questions for the technical side of a project we're working on and I'd really just like to know if it would be possible before I present it to the rest of my group. The idea is to create a wall on which the user can write down several words on their chosen locations (like a brainstorm), then click one of them to continue with it..
Is it possible to create an editable textfield at the cursor's position on a mouseclick and (if even needed) make it active so the user doesn't have to click twice? And then repeatable on multiple locations on the workarea..
I'm assuming the text autoresize function would still work and that I could add a random small rotation to it (It has to look like you're writing on a wall).
Then, on the next step, I'd like the user to be able to pick one and click on that to continue.
I'm guessing it involves creating a movieclip with a textfield in it and then load that from the library on the canvas on mouseclick.. What I'm most worried about is the user having to click twice to actually start typing..
View 1 Replies
Jan 1, 2012
I am trying to develop a e-Learning kind of stuff where in All the planets of solar system are jumbled and then the Kid has to drag and drop the each planets in order. But what I need is After the kid drags and drops the image/MovieClip in order, I need to verify all the Planets whether they are in particular order or not. How to Verify the Objects?
View 1 Replies
Jul 29, 2009
I have a custom ActionScript component that I'm using in a Flex application (Flex 3.3, ActionScript 3). This component contains an Image control whose visibility is set dynamically based on a property of the data element provided to the component. The problem is that even when I set the image to be visible, it will not render onscreen. Is there something specific I need to do in order for the image to render? Snippets of relevant code below:
override public function set data( value:Object ):void {
_data = value;
if( _data ) {
if( _myImg ) {
_myImg.source = someImageClass;
[Code] .....
View 2 Replies
Apr 21, 2009
how work with resizing the width of of a movie clip according to the size of dynamic text inside it. I did it by creating a text field 'myText' and then converted it to a MovieClip symbol and named the MovieClip as myClip. The text in myText is assigned at run-time and its width changes according to the text.
I did it as follows:-
myClip.myText.selectable = false;
myClip.mouseChildren = false;
myClip.useHandCursor = true;
myClip.buttonMode = true;
myClip.myText.width = myClip.myText.textWidth + 5;
On doing this I found the clickable area change according to the size of the text field but the text field doesn't appear at all in the swf.
View 5 Replies
Nov 5, 2009
I am working on flash & AS file, in flash file (main.fla) dynamic text is inside that movieClip (myButton) .I will like to send some text to that particular dynamic text field inside the movieClip (myButton) from AS file as file code is var myButton:Button; var myText:text; myButton.myText.text="Custom Msg";
View 18 Replies
May 4, 2011
I have a dynamic text field on stage wich storages a movieclip instance name dynamically. I have a movieClip on stage with an action at the last frame with the code below:
import flash.*;
var CartaSelecionadaA = root.mca.text; //trying to get the text field value
var CartaSelecionadaB = root.mcb.text; //trying to get the text field value
[code].....
View 4 Replies
Oct 9, 2007
I have a dynamic text box inside a movieclip that is generating load percentage eg: 40% etc. I have two Scenes, the first scene preloads the entire movie (this works fine, has the numbers plus percentage).
The second scene runs a movieclip preloader (while reusing the same dynamic text box in the same movieclip) - For some reason the % is not showing up after the numbers, I know its working because when I trace what the text is in the dynamic textbox during the script it shows the % sign after the numbers in the output window.This also occurs with all the other punctuation glyphs I try, not just the % sign...
View 3 Replies
Sep 8, 2009
take the children of an object, the children are groups nested within a parent group, and sort them based on their x coordinate. so the one furthest left (lowest x) is in position 0 and so on.
View 3 Replies
Mar 1, 2011
I'm developing my first flash app. I'm trying to use classes because they'll be very important in my future app. I created a simple movieclip with a star. However, instead of putting it directly on the stage, I'm calling it from library, using the addChild method to place the star in the stage. To do that, I simple right click over the movieclip icon->properties->check export to action script->and I give a name to the class (for example: myMC)
Then, inside the class I wrote:
package {
import flash.display.*;
import flash.events.*;
public class myMC extends MovieClip {
var star:myMC=new myMC();
public function myMC() {
[Code] .....
As I am placing the two variables origin_x and origin_y inside the constructor, I'm expecting to get 250 and 200 respectively. After drop the star, I want to send it to it's original place, and that's why I need to keep this values. And here's the problem, origin_x and origin_y are both ZERO, instead of 250 and 200... The value is not relative to stage. I managed a little bit and I found this post : [URL]. Unfortunately I tried to replace by the suggested code, but both values remain zero. An interesting thing, is that if I put the star directly in the stage instead of calling it from the library as I am doing, I get correct values in origin_x and origin_y.
View 1 Replies