ActionScript 3.0 :: Accessing Text Field Input From Document Class
Feb 23, 2012
So I am making a small course in Flash CS5 that will take the users input from the course using Text Input boxes on the stage and create a PDF document with the information using PurePDF. I have the PDF documents all working the course all set and I can access the Text Input field text from the main timeline and store it in a variable but I can't access that variable from my document class in order to plug it into the PDF document. I did some searching and I found people saying to use MovieClip(root).myVar but it just comes up null when I trace it.
View 3 Replies
Similar Posts:
Feb 27, 2012
Everything with my PurePDF project is in place I just need to be able to take user input and put it into the PDF document that is created.
If I have a text input field on the stage called inp_Name, how would I access the text the user puts into that from my document class which creates the PDF file and put that information into a variable in my document class?
View 1 Replies
Sep 2, 2010
I'm trying to access a text input that I've already placed on the stage (inside a movie clip) but with no luck.I've defined an instance name for this dynamic text field which is currentUserCount.I've got something like this set up in the document class actionscript file:
package {
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;[code].......
What am I missing? When I run this I get:
1120: Access of undefined property currentUserCount.
1120: Access of undefined property movieClipName.
1119: Access of possibly undefined property movieClipName through a reference with static type flash.display:DisplayObject.
1120: Access of undefined property currentUserCount.
View 3 Replies
Jul 19, 2010
is there any event dispatched in HTMLLoader class when any of the input text field is being selected inside the HTML? If yes how to track not onlyt the Event but the input field also?
View 3 Replies
Jul 17, 2003
Is it possible to login through flash using one Dynamic Text Field and one Input Text Field and no buttons? If so how? I have seen many tutorials dealing with logging in to PHP using flash but it requires you to make your own php scripts which i am not familiar with. Can some one tell me how to do this with PHPBBs existing php scripts... I want to be able to login thorugh a Input Text Field box and have it verify it in PHP and also be able to register and view other PHP info such as users online and FAQ..
View 2 Replies
Mar 30, 2006
I'm making a calculator using Flash MX that works the same way as the basic calculator found on windows (not the scientific one). But having the user input a number, store it as a variable, store which function the user wants to perform and clear the text field then store the new input in the same text field as a different variable and multiply or add or divide or subtract the 2 numbers and getting the equals sign to display the answer when clicked is harder than I thought it would be.
View 3 Replies
Jul 3, 2009
I'm being really dumb today and I know this should be simple.....How do i access the stage from a class which isn't the Document Class? For instance, I want to create a tween which takes in the parameters of the stage's width? So I've written.....
ActionScript Code:
var myTweenX:Tween = new Tween(this, "x", Regular.easeOut, this.x, stage.stageWidth, 60, true);
[code].....
View 4 Replies
Mar 11, 2009
I have an array in my doc class that I'd like to access from an external class. Can you do this and if so what's the syntax?
View 6 Replies
Sep 3, 2009
I have a document class that looks like this:
Code:
package
{
import Map;
[Code]....
Is it possible to access a property of the Map class (though map defined in the Document class) from within the hero class?
View 4 Replies
Feb 28, 2010
The Main.as file will have all of the game logic, such as the mysteryNumber.
The other actionScript files represent rooms that the user may click and depending on the 'mysteryNumber', it will execute the 1 of 6 scenarios.
So for example, if a user clicks the Library page, the LibPage.as will call the 'mysteryNumber' and execute some code to display on the library page.
It will be the same for the other 4 rooms.
The problem I have is that the LibPage.as won't call the 'theNumber' property from Main.as
Here's the Main.as
Code:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
[Code]....
View 3 Replies
Jul 3, 2009
How do i access the stage from a class which isn't the Document Class? For instance, I want to create a tween which takes in the parameters of the stage's width?[code]
View 8 Replies
May 25, 2010
I have created a movieclip in the library and added a class to it. I want to access a function and set an Array in that class from the document class...Heres what im doing now which is not working... it says startnow function is undefined.
PHP Code:
package comimport flash.display.*; import flash.events.*; import com.NavMC public class Capability extends MovieClip Constants: //
[code].....
View 5 Replies
Jun 5, 2009
I have a really peculiar problem that relates to the old question of how to best access the instance of the document class from a different class. I usually add a 'this' as parameter when I create an instance of another class inside the document class. Then I save this 'this' in a class property of the type 'Object'. It usually works just fine but lately I have encountered a really bizzarr error.
When my movie first starts I have to load 2 xml-Files. I do that in another class - that calls upon the document class instance when it is finished. I use 4 methods for that, each calling the other, when it is finished.
(like one doing loader.load(urlRequest),
then loader.addEventListener
(Event.Complete, nexthandler) and so on
Now, when I call back to my document class from the last of these 4 methods it works just fine. But when I try skipping the first two methods (since I now need only one xml-File) - my try/catch-statement suddenly complains: TypeError: Error #1010! Like it needed more time to establish the instance of the document class or something similar strange.
View 4 Replies
Nov 14, 2009
when I try to access a property of the document class from another class, I get an error:
Quote:
1119: Access of possibly undefined property _left through a reference with static type flash.displayisplayObject.
Maybe I'm not doing it correctly? This is how I've been accessing document class properties so far. Does the fact that they're private make a difference?
Quote:
root.property
View 1 Replies
Dec 19, 2010
I have a main document class with another class instanciated (mouse follower.as) within it. I want the mouse follower class to access a stage instance. How is this done?
View 1 Replies
May 25, 2009
I'm currently working on an interactive app, (site) which requires me to modify a few textfields, and change images dependant on the user choice (using mouseevent). This is a separate module, thus I'm posting the question in here instead:there are three images, that are lined up, with a textbox next to them. When a image is chosen, and enlarges, the text changes with the chosen image, according to XML.The textFields, 'text_title', 'text_description' are contained in a movieclip, called 'textbox'.This has been built in the Flash IDE (CS3) named info.fla/swf, which refers to a Document class 'com.info', made in Flex Builder 3...I attempted to modify the textfields using this:textbox.txt_title.text = "Loading";textbox.txt_desc.text = "test";But, I was unable to at first to change the text using the document class, as it gives "1120: Access of undefined property <variable>".
View 3 Replies
Nov 24, 2009
I have an instructions.as file which is trying to call a function in the document class through a mouse click event listener and am getting a 1009 error.
Here are my to actionscript files:
** this the the instructions.as**
package Elements{
import flash.display.MovieClip;
import flash.events.*;
[Code].....
View 3 Replies
Mar 29, 2011
My project is structured as following :
- a fla file with movieClips on the timeline , this fla is linked to the Main class
- a Main class who does some randomization of the animations
- a MenuItem class which function is to give each button menu the same functionnality
the problem is that I'm trying to access to the randomNumber function inside the Main class from the MenuItem class to prevent the rewriting of the function inside this class. I've made some research on Google and apparently I have to create a Singleton class so I can access the Main class from everywhere, I've followed those instructions but it still doesn't work, when I trace the Main class from the MenuItem class it gives me a Null result!Main Class code :
Code:
package
{
import flash.events.Event;[code].....
View 4 Replies
Apr 15, 2011
Using AS3 to create a basic number guessing game but for some reason the input text field won't accept text input. I can't figure out which piece of code is causing the problem and it's driving me nuts considering it's from a tutorial.
Code:
package
{
import flash.display.MovieClip;
[code]....
View 2 Replies
May 9, 2009
Instead of posting my entire files and such, I'll make a brief example of my situation and my desired outcome. My files consist of my document class entitled Engine.as and another class Abilities.as all within the same folder. On my stage I have a MovieClip with the instance name of item1_mc. On its personal timeline I have 2 frames, one entitled "inactive" and the other "active". Here's a sample of very similar code....
[Code]...
View 4 Replies
Aug 5, 2010
I have loaded one swf externally in my main class. and there is one button in loaded swf suppose its name submit_btn. i have to do that when i click on submit_btn, this loaded swf should be removed. what is the code for that
View 1 Replies
Oct 10, 2010
have a very simple question, (Bear with me I'm still quite new to as3 and some of my terminology may not be solid) I want to access a function that is within my document class when a movie clip on the timeline has played to a specific point (being the end). I have already been able to call another function from the document class at the top/root level (it is called to initialize all clips and buttons when you click on the "enter" button on the splash screen. Problem is that I cannot call another function (in the document class) from a movie clip within a movie clip on the timeline. Is there an easy way to do this? I have considered writing a separate class for the movie clip and then adding it onto the movie clip (using the property panel). I don't really want to do it this way because I am already using a base class on that movie clip and 3 others that use a set of generic functions.
View 1 Replies
May 24, 2011
On the stage I have a movieclip by the name of rect_mc. Inside it have have a MovieClip square_mc.In the time line that I get when I double click on rect_mc (timeline of rect_mc) I have written the following code
var width1:Number;
width1 = sqaure_mc.width;
How can I access width1 from the document class?The thing that I want to is access the variable declared (width1) in the timeline of rect_mc. Just for the sake of a example only I choose the width of MovieClip.My doubt is how can access a variable declared inside the timeline of rect_mc from the document class. It could be any variable.My document class is:
package
{
import flash.display.MovieClip[code]....
View 1 Replies
May 31, 2011
I want to find out whether my swf was loaded locally or from another swf. For this purpose I have declared a variable 'parentType' in my fla. var parentType:String = String(parent); There is a function in the document class that determines whether swf was loaded locally or from another swf. The name of the function in the document class is 'externalOrInternal'. The varaible parentType is passed as a parameter to the function externalOrInternal externalOrInternal(parentType); The name of the document class is Main. In the constructor of Main I have the function pollResize() (the use of this function is to listen for the resizing event. That part of the code is not shown in the snippet given below).
[Code]...
I see that swfParentType is has value insde the function externalOrInternal. My doubt is why null is traced inside the function pollResize. Why is it not [object Stage] as inside externalOrInternal. Due to this I am not able proceed further with the stage resizing event.What needs to be done so that proper value is traced in the function pollResize.
View 1 Replies
Aug 11, 2011
I have programmed a game using the Flash authoring tool and a document class. I'm trying to graphically add instances and add functionality in the document class. Suppose I have a main timeline with 3 frames, each frame reperesents a different level of the game. In frame 1 I have an instance of the MovieClip class named tree1 on the stage and in frame 3 I have an instance of the MovieClip class named tree3 on the stage. In my document class, after an initial stop() command, I want some logic like:
tree3.scaleX = tree1.scaleX;
But tree3 is unknown to the runtime since we are not of frame 3 yet. Any way to access all the instances on all frames declared in the authoring tool from the document class?
View 1 Replies
Apr 11, 2010
I have built a button in the fla timeline and need to have it fire a method in a document called gigyaSocial. the Timeline code works fine but I cant get it to recognise the method that I commented out at the bottom if this code snipit.
ActionScript Code:
import fl.controls.Button;
import com.player;
import com.gigyaSocial;
[Code]......
View 9 Replies
Apr 26, 2010
I'm trying to access a MovieClip object in a SuperClass from a SubClass. The only way I can tell this is possible is through an event dispatch, but I'm dealing with a preloader and a loaded external SWF. So I can't make an instance of the "not yet loaded" classes because I'll get errors. Furthermore, the objects in both SWF need to be controlled in sync.
View 9 Replies
Jun 15, 2010
I've made a custom sound class:
ActionScript Code:
package {
import flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
[Code] .....
What I would like that class do is to trace a variable that is on Main.as which is Document Class, after a sound completed playing.
View 4 Replies
Dec 10, 2010
How do you access the stage from a function in a document class file? I tried a fairly simple:
ActionScript Code:
var main:MovieClip = new MovieClip();
addChild(main)
var _stage:Stage = main.stage;
trace(_stage);
The result was null.
View 5 Replies
Feb 9, 2009
I'm trying to access an init method I've set in one of my document level classes.
Container Movie loads Main Movie, which has Main.as as its document class, but I want to do a few things before I show the actual content. Here are some functions in Container.as:
Code:
public function moveLogo(e:TimerEvent):void{
loadTxt.visible = false;
var logoMoveUp:Tween = new Tween(logoCont, "y", Back.easeIn, 221, -250, 1, true);
[Code].....
If I trace e.currentTarget.content.init on my EVENT.COMPLETE callback function, I get "function Function()" like I should.
View 2 Replies