ActionScript 3.0 :: Evt.target.data Freezes - Line Doesn't Get Executed
Jun 29, 2009
So I have a bit of an odd error.
[Code]...
The line that says xmlData = XML(evt.target.data) freezes my program. Nothing gets past that line. I have no idea what's causing this problem... What I mean by nothing gets past it is that anything anfter that line doesn't get executed. I put the userArea.addChild(userList) before all over the function to determine where the problem was and it's only after that line that my userList was no long showing up.
View 2 Replies
Similar Posts:
Jun 29, 2011
I am trying to dispatch an event but not sure when I should do it to get the right results. The first event "submitClicked" is in the right spot and works great. However, the second event "dataReady" seems like it might be a problem. I need it to be dispatched after this.compiledFormData is set.Does AS3 wait for each line of code in a function to be executed before moving on to the next line?
// --------------------------------------------------------------------
public function submitForm()
{
[code].....
View 2 Replies
Jan 12, 2012
QUESTION NUMBER ONE
I have e.target.data value like below
1.
2.
3.
and i have a textarea component.i used this below script to insert my e.target.data to the textarea component
ActionScript Code:
my_textarea.htmlText = e.target.data
then, my_textarea look like plain text, it still 1.
2.
3.
but when i do like below
ActionScript Code:
my_textarea.htmlText = "1.[code]......
View 5 Replies
Dec 16, 2009
I know the flash engine is single threaded so when it receives an event, does it essentially break off, execute any registered event listeners (in no guaranteed order) then return to the current scope?[code]can I guarantee that the current function will complete before any of the event listeners execute? ie trace("Done"); will ALWAYS execute first.
View 3 Replies
Mar 9, 2011
I have no experience with Object Oriented Programming, so I wonder about the following:
1) Will the code past the .LOAD line (in red) be executed only after the image completes loading?
2) Can I nest several listeners as seeing in my code below?
[Code]...
View 7 Replies
May 26, 2009
i have a datagrid which grows in size depending on the result of a call to my db. The call to the database returns an object with 30+ values for each row. When the number of rows returned exceeds about 80-90 the datagrid renders odd. It displays the first 50-60 rows fine but then it displays blank rows and they even continue to display outside the border of the datagrid.what is happening? Im using mxml webservice to retrieve the data.
<mx:DataGrid dataProvider="{resultsData}" rowCount="{resultsData.length}" allowDragSelection="false"
id = "confRoomLookupResults" width="948"
[code].....
View 3 Replies
Sep 15, 2004
I'm attaching an MC to the timeline and within that attached MC is a LoadVars.sendAndLoad command. This works flawlessly when I have a few variables but becomes horribly bogged down when I have to send (and receive) lots of data. It actually freezes my swf until all the data is loaded, then switches windows <minimizes itself in Win XP> after it's all done loading. I need a way for the original attach movie to finish loading, before I send the PHP commands...
View 1 Replies
Dec 20, 2011
I'm trying to send about 1 MB of binary data to server via URLLoader. But when I call method load of this class, my application hangs for about 1-1.5 seconds, then uploading runs normally. How can I prevent it?
View 2 Replies
Apr 14, 2009
how to return to the main time line from within my movie clip. I thought it was something like _root.gotoAndPlay(4); but all I'm getting is errors.
View 1 Replies
Dec 10, 2009
So here's the run down. I'm trying to target a timer that is declared on the main time line (frame1) from within a movieclip. So here is the code for the timer on the main timeline:
ActionScript Code:
var timer1:Timer = new Timer(1000);
timer1.addEventListener(TimerEvent.TIMER, timedFunc1);
timer1.start();
The name of the movieclip is ssRightMask_mc. I'm trying to get the currentCount from timer1, but I'm having some targeting issues. I've tried:
[Code]...
View 7 Replies
Jan 1, 2012
[Code]...
doesnt clear the line when mc1 moved ? How solve tihs problem?
View 1 Replies
Oct 15, 2011
I have a button that was added to stage using addChild when the page load, the button is suppose to be removed using removeChild and redirect into its specific page using event.target.name...somehow i got this error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I have try replace this line, var newswf:URLRequest= new URLRequest("./swfs/"+ event.target.name +".swf"); with this, var newswf:URLRequest= new URLRequest("./swfs/about.swf"); and everything works fine, but i dont want that since I want it to load dynamically and uses less code..
my code as below:
var about:About = new About();
about.x = 300;
about.y = 200;
[Code]....
View 5 Replies
Oct 9, 2006
Kirupa's tutorial on how to use Flash to target a certain frame in HTML doesn't work any more. The page opens up in a new window instead of in the targetted frame. This is the code that is used: on (release)
[Code]...
View 1 Replies
Jan 10, 2012
I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......
without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;
<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........
_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.
View 1 Replies
Feb 19, 2009
Why doesn't the text in my TextField go automatically to a new line?
ActionScript Code:
descr = new TextField();
with (descr) {
descr.x=40;
[code]....
View 9 Replies
Apr 13, 2010
Update: Once and for all, how can I draw a line that goes from (0,0) to the opposite corner of the stage?Here is what I have:
package
{
import flash.display.Sprite;
[code].....
View 1 Replies
May 21, 2007
I'm trying to deploy flash e-learning with dynamic content on a content management server. The xml will not display, no matter how many different approaches I take. So I need a method of encapsulating lots of text within Flash and referencing it from say, an actionscript window.
I seems that referecing any outside content, be it an external actionscript file or text file is out, so I'm left with the option of encapsulation.
View 1 Replies
Nov 13, 2010
I'm trying to add a line to a movie clip. When I trace the width of the lineadded it traces correctly, but the line doesn't appear. If I do everything the same but add the line to the stage instead of the movie clip it does appear. I know this is one of those cases where I can't see the forest fro the trees but
Here's the relevant code:
var xAxis = new Shape(); graph_mc.addChild(xAxis); xAxis.graphics.lineStyle(2, 0x000000, 1) xAxis.graphics.moveTo(startX, startY); xAxis.graphics.lineTo(maxX, startY) xAxis.name =
[code].....
View 3 Replies
Jun 28, 2009
I want to know why I can't use this code PHP Code:
[Code]...
I know the problem is Code: xml=e.target.data as XML; but I want to know why I can't use the as XML instead of XML(e.target.data)?
View 2 Replies
Mar 6, 2012
Consider the following scaled down example of a much larger application:I have text areas with id attributes and click events:
<mx:TextArea click="launchMyPopUp(event);" id="box1" text="blahblahblah"/>
<mx:TextArea click="launchMyPopUp(event);" id="box2" text="blahblahblah"/>
<mx:TextArea click="launchMyPopUp(event);" id="box3" text="blahblahblah"/>
[code].....
View 1 Replies
Jul 28, 2011
I have a little snippet of code that allows the user to create a line with the mouse, and clears the line if they end up touching the hitbox with the mouse, while they're drawing the line. It works fine when it's just thrown onto the main timeline. However, when I try to encapsulate it within a movie clip, it suddenly doesn't work. At all. Are there any suggestions as to why this is happening? Here's the code.
[Code]....
View 13 Replies
Jun 20, 2011
So I have a simple game I'm making where you are a box shaped character and you have basic movement around the screen. I know how to make walls and the coding but I would like to make a wall that the character can't go through on either of the 4 sides or even a squiggly line that doesn't have a definite shape. I used this coding:
[Code]...
And that does kind of work, but it's not stable (works better with one side only). Sometimes one side of the wall, the character will still be able to go through. The tool I'm using to make the wall is a rectangle tool if that makes any difference. And I'm on actionscipt 2.0 on adobe flash cs4.
View 1 Replies
Feb 23, 2010
I have a data-grid which is pulling information from a database through php (zend-amf)[code]...
View 2 Replies
May 13, 2008
I want Montana data to appear when I click the state of Montana (and so on throughout the 50 states). Montana is the instance name of my simple button on the state of Montana.
Something's not quite right about this line of code:
if (pEvent.target == myXML.statename ) { ...then do something ...}
The code works fine if I say if (pEvent.target == Montana)
Do I have to convert the myXML node value to text orsomething?
View 1 Replies
Apr 25, 2009
I can't trace(english[1]); ie: an index of the array BUT I can trace(english);
function Article(imagen, sonido) { this.imagen = imagen; this.sonido = sonido;}function makeArray1(success) { var i, j, mainTag; if (success) { for (i=0; i<=moXML1.childNodes.length; i++) { if (this.childNodes[i].nodeValue == null && this.childNodes[i].nodeName == "appear") { mainTag = this.childNodes[i]; } } num_reg = mainTag.childNodes.length; // numero de ejercicios for (i=0;
[code]....
View 1 Replies
Nov 17, 2010
i wrote an as3 and a simple php page.
whenever i use : URLLoaderDataFormat.TEXT i get all the content of the php file.
when i use the VARIABLES , i get this:
[Code]...
View 3 Replies
Mar 28, 2011
I have firefox 3.6.15 with flash debug version 10.3. whenever an error occurs a popups comes up with the error and a stack trace but it does not line numbers of each leaf in the stack trace which makes it more difficult to debug. how to configure it to actually show line numbers ?
I think it may relate to how I compile my flash application. (i think!) i use eclipse FDT 4.2 to compile and i added the following compiler flags: -debug=true -compiler.verbose-stacktraces i think these parameters should be enough but I may be wrong.
View 1 Replies
Oct 16, 2009
k, so i have a function that checks to see if a user name and email that's being registered already exists in my DB. if the user name previously exists, a 1 is returned. 2 for email and 3 in neither previously exist. if i hard code my user name an existing user name, "joe", who already exists, into my php file and run it in my browser, i get an echoed answer of "1" as i should- nothing less, nothing more. if i don't hard code it and run "joe" over from flash and trace(event.target.data);, i get 1 with a bunch of carriage returns after it in my output window.
[Code]..
View 17 Replies
Jul 21, 2009
I have about 9 buttons on my stage and I want to write code for the rollover and rollout effects, I only want to write the code once so I am trying to pass the button info into a string via evt.target.data and it pass the info properly into my string variable but when I try to set my filter to that variable, setting my movieclip instance name to that variable, I get 2 errors:
1119: Access of possibly undefined property filters through a reference with static type String.Warning: 1072: Migration issue: String is not a dynamic class. Instances cannot have members added to them dynamically.
My code is:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var thumbArray:Array=new Array();
var movieClipLoader:Loader;
[Code].....
View 3 Replies
Apr 30, 2007
Basically, I am having trouble pulling in more than one line of XML data. Here is the line of code I am trying to manipulate to give me more than one line. I have tried duplicating it and changing the values... but it just updates which line it is displaying instead of the first and second one...
_root.setlist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
Inside of my XML document it is layed out like this....
<shows>
<show>
<setlist>
<song>Song 1</song>
</song>Song 2</song>
[Code]...
View 12 Replies