Actionscript 3 :: Events - Procedure To Use The Result From A Textbox Inside A Popup?

Jul 28, 2011

I have made a class that Pops-up a window that contains a panel with a textbox and two buttons, one for accepting, other for cancelling. It should work as a prompt in which you enter some text, and then if you like the changes, you accept, else, you cancel and the text you entered is discarded.

The thing I'm not sure how to handle is how to receive the text, once the user presses 'Accept', from the class I want to receive it from.

So, the approach I took is a bit cumbersome: firstly, when launching the popup, I associate with it a function (called onResult() in the code) from the 'class that launches', which will be called after the user presses the 'Accept' or 'Cancel' buttons; secondly, to get the text that the user inserted in the box, I keep a reference to it public from my class.

have a look at the code here: [URL]

I've also programmed in Android before, and the approach there would be much cleanier, just putting the text result from the popup inside a bundle inside an intent, and receiving it from the launched class. Here, I have to pass functions and such, which I don't like at all (although it works!).

View 1 Replies


Similar Posts:


Php :: Print The Result In A TextBox?

May 25, 2009

On ResultEvent through HTTPService, i need to print the result in a textBox.

private function google(evt:ResultEvent):void
{
Alert.show(evt.result.loginsuccess.person);

[Code]...

View 2 Replies

ActionScript 2.0 :: Dynamically Creating Separate TextBox For Each Result?

Jan 12, 2006

I'm loading in some data from an XML into Flash then searching a level and returning a number depending on how many nodes are on that level (at the moment is "2") Then I collect bits of info from each and trace the results which works fine, problem is I can't seem to create a separte textbox for each result?

Code:
_root.total = _root.xmlNode.childNodes[0].childNodes.length;
for (i=0; i<total; i++) {
venue[i] = _root.xmlNode.childNodes[0].childNodes[i].childNodes[0].childNodes[8].firstChild;
team_a[i] = _root.xmlNode.childNodes[0].childNodes[i].childNodes[0].childNodes[0].firstChild;
team_b[i] = _root.xmlNode.childNodes[0].childNodes[i].childNodes[0].childNodes[1].firstChild;
kick_off[i] = _root.xmlNode.childNodes[0].childNodes[i].childNodes[0].childNodes[5].firstChild;
trace((venue[i]) + ": " + (team_a[i]) + " v " + (team_b[i]) + ", Kick off at " + (kick_off[i]));

I thought I would just need to write something like:
fixture[i].text = (venue[i]) + ": " + (team_a[i]) + " v " + (team_b[i]) + ", Kick off at " + (kick_off[i]);
But that doesn't work..it just displays the 2nd result

View 5 Replies

ActionScript 3.0 :: 2D Array - How To Display Result Of Dice Roll On TextBox

Jun 29, 2010

I have a 2D array that creates a table with value that contain sum of 2 dices. But I want the result of the dice roll display on the appropriate text box on the table. I'm stuck at getting position of textbox which shown at bottom code where I have it as that position as now. Select is the instance name of those textbox.

Code:
var row:int=7;
var colum:int=7;
var dicechar:Array=new Array();
var reddice:int
var whitedice:int
var textboxarray:Array=new Array();
[Code] .....

View 12 Replies

ActionScript 2.0 :: Different Popup TextBox For Each Button

Jul 30, 2006

First time poster and a beginner with flash. I don't know if this is where I should post my questions. I have been trying unsuccessfully for nearly a week now to make a text pop-up. Not sure if that is the correct name of it, but it is one of those "pop-up" text boxes that is draggable, scrollable and close-able that I have seen from other flash sites that are usually attached to a "read more" button. I do have a flash template with a pop up text box but all the "read more" buttons pop up the same text box. I wanted to know how to get a different one to pop up for each button or how to construct one from scratch.

View 5 Replies

ActionScript 2.0 :: Adding Properties And Events To MovieClips Inside A Loop Inside A Function

Dec 8, 2009

I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property called "desc" or "description" to each movieclip and have it trace that property's value when clicked. Here is the relevant portion of my code as it stands:

ActionScript Code:
var iXML:XML = new XML();
iXML.ignoreWhite = true;

[Code].....

View 6 Replies

Actionscript 3 :: Changing The Number Of A Var Inside An Array, Does Not Change The Var Result Itself?

Dec 20, 2011

basically I have an array that stores some var(int/numbers). And when I loop through the array changing the numbers of the var, at the end the number seems still unchanged. You would have a better idea of what I'm talking about base on the below code.

private var _numArray:Array = new Array()
private var _no1:int
private var _no2:int

[Code]....

View 2 Replies

ActionScript 3.0 :: Referencing Variable Result Inside Speech Marks?

Jan 1, 2010

How would I go about refferencing a variable and then turning it into a string (if that is the correct terminology). e.g:

[Code]...

I need the result of variable something to end up inside the speech marks without loosing its obvious refference to the variable.

View 2 Replies

Actionscript :: Flex Popup Manager Mouse-down Outside Of Popup Removes The Popup

Mar 4, 2011

If you create a popup via:[code]It will create a popup and bring it on top of any other visual piece. I have one problem though. This 'popup' needs to stay up even when the user interacts with the background.I would use modal, but I need the ability to interact with the back. Any way to tell the popup manager not to remove the popup when the user clicks off of it?

View 1 Replies

ActionScript 3.0 :: Create An Url To A Word Inside A Dynamic Textbox?

Mar 18, 2010

I'm trying to create an url to a word inside a dynamic textbox but I'm not sure how to do that. I'm familiar with TextFormats, etc. but that only apply to the textbox and not to a word or a sentence inside that textbox. Or have I been misguided??

View 3 Replies

ActionScript 1/2 :: X, Y Position Of A Character Inside A Dynamic Textbox?

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

ActionScript 2.0 :: Formatting Text Inside A Scrollable Textbox?

Mar 30, 2005

I'm trying to separate the text in my scrollable textbox into separate paragraphs, with space in between each paragraph, but I don't know how to do this in ActionScript. So far, the frame actions look like this:

textField = " "

(There's text in between the " ", but I'm not going to paste it here because there's a lot."Also, I'm trying to format the text, so that the headings of the paragraphs are bold while the rest of the text is normal.

View 4 Replies

ActionScript 3.0 :: Set Value Of A Textbox Inside A Swf Loaded Dynamically In The Main Swf?

May 15, 2009

I am trying to set value of a textbox inside a swf loaded dinamically in the main swf...i am using

Code:

this.getChildByName("nuvoletta").textbox_value.text = "something";

but i get error 1199

I am forced using getchildbyname

View 1 Replies

ActionScript 2.0 :: Changing Textbox Inputs Inside A Movie Clip

Mar 31, 2011

Okay... I give up. I've tried everything I know on how to do this but with no results. What I'm trying to do is simple: there's a button in the stage and a movie clip. Inside the movie clip is a dynamic textbox. Now, the button is supposed to change what's written in the textbox inside the movie clip. Here's the code I had tried using:

[Code]...

View 1 Replies

ActionScript 2.0 :: Javascript HTML Inside An Iframe To Flash Textbox?

Apr 28, 2003

PHP Code:

<HTML>
<HEAD>
<SCRIPT>
<!--

[code]....

View 1 Replies

ActionScript 3.0 :: Can Spam Read Text Inside A Dynamic Textbox

Oct 9, 2009

i think i read an article before about google or some SE teaming up with the Adobe Flash Developers in an effort to include flash pages into search results by allowing the text inside SWFs to be read by the SEs... not really sure about the details, but its something to that extent..

that's good news but what i would like to know is if spam bots can do the same and read text inside an SWF file?for example, if i have an SWF file with a dynamic textbox that has some text that contains an email address, will spam bots be able to read it?if this is the case, then i will just make the email address an image..but the benefits of having the email address inside a dynamic textbox is that it's selectable; making it easier for visitors to just copy the address as opposed to having to look at the image and type it manually...

View 1 Replies

Flash - Load HTML Page Inside Flex Popup Window?

Feb 10, 2012

I have created a popup window in a flex website and I wanted to load a HTML page inside that popup. I tried many ways to do it but that way unsuccessful. Can someone recommend me a approach to get this done?

View 2 Replies

Actionscript 3 :: Dispatch A Custom Event Inside Httpservice Result Event?

Dec 8, 2011

In my AIR application, I try to dispatch a custom event from a class to main window.This class is use to call httpservice. My goal is to send a custom window when the httpservice result is send.[code]...

View 1 Replies

ActionScript 3.0 :: Call Stored Procedure In Flash?

Jun 24, 2009

I need to create a login in frame 1, after executing a SP to MSSQL and get the return true, then it gotoandplay frame 2.

View 21 Replies

ActionScript 2.0 :: Font Symbol Procedure With Styles?

Jul 31, 2009

I've imported two styles of the Trebuchet MS font into the library. One without selecting the 'bold' checkbox in the Library Panel upon importing and the second with the 'bold' checkbox selected.If I look in the font list of the property panel I now see the two embedded fonts (with asterisks behind their names):

Trebuchet MS Regular*
Trebuchet MS Bold*

The first textfield uses Trebuchet MS Regular* and off course shows the text in plain style.The second uses Trebuchet MS Bold* and I would expect the text to turn immediately bold, but it is still in regular style when I select Trebuchet MS Bold*. In both cases (Trebuchet MS Regular* and Trebuchet MS Bold*) I would have to select 'B' in the properties panel to make the text bold. Which in the second case seems a bit too much to me. Why still have to click 'B' when I already have Trebuchet MS Bold* selected?

Too make it more weird: I could also import Trebuchet MS with Italic selected, choose Trebuchet MS Italic* (which would make the text 'regular' at first) and click 'B' to also make the text bold. why Flash works this way with imported fonts?(I know I should/could use TextFormat, but I'm curious about this other approach and why Flash works this unlogical way with embedded fonts)

View 2 Replies

ActionScript 3.0 :: Get Code/procedure For Opening Pop-up Using JavaScript?

Jan 9, 2009

I am using Adobe flash CS3 and working with it using ActionScript 3.0.I need code (or) procedure for developing an application in such a way that, When I click on a button present on the stage, I should get execute an HTML file(say,Hello.html) which is present in the local hard-disk in the same folder as with the flash file. I had developed HTML file and flash file. I am attaching the JavaScript code which is getting executed in flash:

var js:URLRequest=new URLRequest();
js.url="javascript:window.open('AddForm.html','popper1','width=540,hei ght=360');newWindow.focus();
void(0);";
button.addEventListener(MouseEvent.CLICK,openPopUp);

[code]....

View 3 Replies

ActionScript 1/2 :: Embedded Font Styles Procedure?

Aug 1, 2009

I've imported two styles of the Trebuchet MS font into the library. One without selecting the 'bold' checkbox in the Library Panel upon importing and the second with the 'bold' checkbox selected. If I look in the font list of the property panel I now see the two embedded fonts (with asterisks behind their names): Trebuchet MS Regular* Trebuchet MS Bold* The first textfield uses Trebuchet MS Regular* and off course shows the text in plain style The second uses Trebuchet MS Bold* and I would expect the text to turn immediately bold, but it is still in regular style when I select Trebuchet MS Bold*. In both cases (Trebuchet MS Regular* and Trebuchet MS Bold*) I would have to select 'B' in the properties panel to make the text bold. Which in the second case seems a bit too much to me.

Why still have to click 'B' when I already have Trebuchet MS Bold* selected? Too make it more weird: I could also import Trebuchet MS with Italic selected, choose Trebuchet MS Italic* (which would make the text 'regular' at first) and click 'B' to also make the text bold. Can someone explain why Flash works this way with imported fonts? (I know I should/could use TextFormat, but I'm curious about this other approach and why Flash works this unlogical way with embedded fonts)

View 4 Replies

ActionScript 3.0 :: Any Procedure For Importing Vector Formats AutoCad Dxf

Apr 19, 2010

Is there any procedure yet for importing vector formats AutoCad dxf or Adobe Illustrator ai into Flash using Actionscript 3?You can manually import them from the Flash File menu.Seems like there should be a method to dynamically import dxf or ai drawings with Actionscript.

View 1 Replies

ActionScript 3.0 :: Way To Exclude An Element From Whole Capture / Bubble Event Procedure?

Jan 31, 2007

[code]I added MouseEvent.MOUSE_OVER event listener to the 'back' sprite, but it doesn't get called, because the 'text' element is in front of it.I want to keep the event firing only when mouse is over the 'back', so I can't add eventlistener to the 'btn'.I could put some transparenet duplicate of 'back' in front of the 'text' and add listener there, but I believe there should be a more elegant solution.Maybe there is some way to exclude an element from the whole capture/bubble event procedure?

View 4 Replies

ActionScript 2.0 :: Make Windows Popup On Flash Projector When Click On Buttons While Exploring The Contents Inside?

Apr 24, 2004

I will be making flash projector. How do I make windows pop up on flash projector when you click on buttons while exploring the contents inside?

View 7 Replies

ActionScript 2.0 :: Key Events Inside Class

Feb 19, 2007

I am curious in what strategies people are using (if they are using) the Key events inside of their classes. I am trying to build up a character class and I wanted to encapsulate the movement inside of the class.

View 3 Replies

ActionScript 3.0 :: Way To Listen For Events Sent From Main.swf Inside Preloader.swf?

Sep 16, 2009

I'm trying to listen for events sent from my main movie swf from inside a preloader shell swf.Inside Preloader.swf, I load my Main.swf in the traditional way, with a loader object and I listen for progress events on that. These progress events make my preloader bar scaleX increase, like normal. But, I have an XML file and an image that load inside of my Main.swf as soon as it is loaded. I would like for these unloaded bytes to be shown in my Preloader.swf before the Main.swf gets added to the stage.right now, I am sending the totalBytes from the XML file and the image to my Main.swf document class, which, in turn, dispatches a custom "PreloaderEvent" that holds the total number of bytes.

In Preloader.swf, I add an event listener to the loader ( which holds main.swf ), listening for that PreloaderEvent.Can events be heard in this manner and is this the best way to be preloading this type of file ( one where main.swf loads in the first frame, then starts loading of external images after the swf is running ).I'm just not sure how to get all of those extraneous bytes into one location for my preloader to see at the same time.

View 1 Replies

ActionScript 3.0 :: Dispatching Non-custom Events From Inside A Class??

Apr 3, 2009

Would it be possible for me to also dispatch non-custom events (like Event.CHANGE) from inside a class? I already did this with custom events which worked fine, but when I try to dispatch a the Event.CHANGE it will tell me that I am trying to convert a String into an Event (??). What I do is:[code]

View 2 Replies

ActionScript 3.0 :: Detecting Mouse Events On Classes With Different Content Inside

Sep 2, 2009

I have a Card class. From this class, I have three possible children: Photo, Video and Info. In my main class, I want to create a few instances of these different classes without knowing what kind it is. But, no matter that, I want them all to listen to the mouse, so I may have something like this:

ActionScript Code:
var item:Card = new Photo();
item.addEventListener(MouseEvent.CLICK, mouseHandler);

The thing is: the Card class is kinda like a canvas... it has certain properties common to every type of item, but there's a space where it leaves it as a canvas... a Photo instance will load a photo there, a Video instance will load a video and a Info instance will load text to a TextField. The problem is that the event listener doesn't work the way I want it to... on an Info instance, the target of the click is the TextField; on a Photo instance is the picture... I want them all to be the class itself... in other words, I want to be able to parse the target as a child of the Card class. My code for the mouseHandler method is

ActionScript Code:
private function mouseHandler(e:MouseEvent):void
{
if(e.target is Photo)

[Code].....

That's the main idea... to be able to know what kind of object I'm clicking and access its properties... but on an Info instance, e.target is of type TextField... to be able to access the Info object, I have to do e.target.parent, and that is NOT the idea.

View 1 Replies

ActionScript 3.0 :: Calling Tween Events From Inside A Movie Clip

Feb 2, 2010

I have function on my main timeline, triggered by a tween event. I need to call this function WITH the triggering tween event from inside a movieclip. Is this possible and if yes, how do I do this?

ActionScript Code:
TriggerTween.addEventListener(TweenEvent.MOTION_FINISH, function)

Is my code on the main timeline. TriggerTween is a simple Y-tween that triggers an alpha tween inside my target movieclip. I need to have the option to trigger the alpha tween with the Y tween from inside my target movieclip.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved