I've read the flex language reference: [URL]. This property is true if execute() has been called and not all of the results have been returned from the database. However, I'm having trouble understanding what that means exactly. I keep receiving an error: Error #3106: Property cannot be changed while SQLStatement.executing is true.
I've tried creating an event handler for SQLEvent.RESULT, my thinking was that's how the results would get returned from the database and therefore executing() would return false - didn't work. Does this mean i'm trying to change my SQLStatement variable too quickly? how long does the execute() function take?
The code in question: private function fileProgress(p_evt:ProgressEvent):void { var char:String; var line:String = ""; var counter:int = 1; sqlStatement = new SQLStatement(); [Code] ....
Stream is a filestream. I'm trying to read a textfile and put every line into a new sqlite table row. I've also tried using sqlStatement.parameters as an alternative way to do my insert queries, but to no luck. that throws a different error: Error #3110: Operation cannot be performed while SQLStatement.executing is true.
I've written a PHP-script that returns true/false.I use a URLVariables-object to send two variables to the PHP-script (actually a username and password).
What is the most simplified way to get flash to return True(1) if a variable is > 0, returns False(-1) if a variable is < 0, and returns nothing(0) if the variable is 0?
I have set the amount of data that my SharedObject can store to none, and Never Ask Again. But I cannot get SharedObject.flush() to return false as per the help system. Settings changed here: [URL]
Code: stop(); var so:SharedObject = SharedObject.getLocal("myObj", "/"); // trap SharedObject memory limit set to 0
In the move function below, I'm attempting to have move return false, when it becomes true I want to delete this on enterframe event. In essence when the clips come to rest and the function is no longer needed delete the function call.
Code: //VARIABLE TO STORE NUMBER OF CLIPS DESIRED clipCount = 6; xArray = new Array(179.1, 249.1, 321.0, 179.1, 249.1, 321.0);[code].....
I'm having diffeculties using the unloadClip function. When clicking on one of the branches in a Tree menu, several thumbnails are loaded into a MovieClipLoader called 'clipLoader' from a XML file.
This works fine, but when you click on a different node from the Tree menu, all of the thumbnails should get unloaded.
For example: If the previous node you clicked had 4 thumbs, and the current one has only 2, the last 2 thumbnails are still visible from the previous node.
I tried clipLoader.unloadClip(holder);, but nothing seems to work, I also tried unloadMovie but also no luck there...
This is the listener for the Tree menu:
PHP Code:
listChanged = new Object(); listChanged.change = function(evt_obj) { var item = evt_obj.target.selectedNode; //If it is a folder�
The Help file for Flash 8 says regarding MovieClipLoader.unloadClip()
Originally Posted by flash docs
Removes a movie clip that was loaded by using MovieClipLoader.loadClip(). If you issue this command while a movie is loading, MovieClipLoader.onLoadError is invoked.so i assumed that i could use unloadClip to cancel a download...neither of these things seem to be true - anything in the function associated with the MovieClipLoader.onLoadProgress event continues to execute despite the unloadClip being called.is there a way to halt the MovieClipLoader from loading?
I'm having some troubles with the use of interface and inheritance in AS3. I've done lots of OOP in the past and what I'm trying to do seems obvious to me, but doesn't work in AS3. The question is : Is it possible to override a function that return an Object of class A, and make it return an Object of Class B which extends A ? It seems not to be possible, since I'm getting a signature error in Flash, when compiling. For example, the following set of class do not compile (the code in function definition doesn't matter):
In Flash MX I have a movie clip that is 32 frames long and loops. Now, what I want to happen is: when you press a button in the file, the movie clip will stop at frame 22. I don't want it to "goto and stop", instead, I want it to continue playing through until it hits 22.
i.e. if you hit the button at frame 5 it will continue playing until 22. or if you hit it at 27 it plays through the cycle, but stops at 22 (if possible, it would be great if I could get it to reverse if it was past 22, but i don't want to be greedy).
Now, one way I thought of doing this was to have an "on open 'stop at 22' = false " and "on press button 'stop at 22' = true.
In Flash MX I have a movie clip that is 32 frames long and loops. Now, what I want to happen is: when you press a button in the file, the movie clip will stop at frame 22. I don't want it to "goto and stop", instead, I want it to continue playing through until it hits 22. i.e. if you hit the button at frame 5 it will continue playing until 22. or if you hit it at 27 it plays through the cycle, but stops at 22 (if possible, it would be great if I could get it to reverse if it was past 22, but i don't want to be greedy).Now, one way I thought of doing this was to have an "on open 'stop at 22' = false " and "on press button 'stop at 22' = true.but now we come to my problem, I haven't done scripting for the past several months, and obviously what I wrote above is not an accurate script,
I can't seem to get th CV.swf to unload when I press the back button. The Home.swf loads ok. Anyone got any ideia why? And how may I solve this issue?
Here the codeit's on a frame on the time line of the CV.swf file, the Home.swf file is the starting point and has a similar code but no unload is needed).
I'm trying to make a basic true/false quiz in Flash.It involves a question with two radio buttons with instance names t1 and f1 (true and false).When the user presses check answers a movieclip with instance name yn1 moves to frame 2 or 3 which displays a tick or cross.
This is all working fully, the problem arises if the user presses check answers again.This for some reason turns the ticks to crosses and the crosses to ticks and I have no idea why!?My code is as follows:
import flash.events.MouseEvent; stop(); checkAns.addEventListener(MouseEvent.CLICK, checkAnswers); function checkAnswers (Event:MouseEvent):void
How do you make the childAllowsParent property of an SwfLoader go from false to true, that is, how as a parent application do you set up security to make the child app's events and other properties accessible to you. To read the flex docs on this, one would think nothing could be simpler:
"This property [childAllowsParent] is set to true if the child object has called the allowDomain() method to grant permission to the parent domain or if a URL policy is loaded at the child domain that grants permission to the parent domain. If child and parent are in the same domain, this property is set to true . [emphasis added]" So, I'm in a development environment and want to load an swf from my own system via an SWFLoader and then be able to monitor its events within the parent app.
on frame 1 I've got 10 movieclips and each movieclip has a toggle button to make it visible true and false.
How do write the script to do the following on frame 10?
if only 1 movieclip is visible make one_mc visible true if only 2 movieclips are visible make two_mc visible true if only 3 movieclips are visible make three_mc visible true ... so on for all 10 hope this make sense.
I have an intropage with two mc buttons that resides in another mc. They are for an English and a Dutch part. So when I click on either one of them, they go to the "Home" label (frame 2). But now at the same time when the main timeline goes to "Home" I want the movieclip container that contains 6 buttons (The English or Dutch ones) to be visible false or true when I click on one or the other. As a part of the code will show some of you there must be an 1119 error that I can't figure out. It has to do with the FrameLabel that is supposedly undifined. [code]If i remove the if statement and just put the visible statement that also gives an error.But maybe the conflict could be that btnTxtFrameN_mc nor btnTxtFrameE_mc exist on the first frame where I wrote the code and only appear as from label "Home" (second frame)
I am trying to display database details in a Flex datagrid and connected using HTTP Service. It was able to display details without any issue when I was working in the FlashBuilder 4.5, however, I deployed the bin-debug part in the Tomcat webserver to access it globally.
I am experiencing this error message when I am trying to access the swf file "HTTP request error Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://localhost:8084/UA/details.jsp"
I tried to create the crossdomain.xml file and deployed in the root directory but still experiencing the same error.Here is my crossdomain.xml :
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy>[code].....
I followed Kirupa's custom scroll bar tutorial and I'm trying to tweak a few things. Where would I put the code to make the arrows invisible when the content can't be scrolled any higher or lower? This is different from the scrollFace being invisible. I don't mean when there is no scrolling at all. Also, where would the "return to visible" (else) code go? The code I plan on using is:
I was trying to retrieve binary data over HTTP for my Flex application, and was running into some stumbling blocks. HTTPService did not seem to deal with binary data well, people said to use URLLoader. But URLLoader does not have the nice AsyncToken/IResponder interface that HTTPService provides.
So, I did some searching and could not find anyone extending URLLoader to provide this kind of functionality. I went ahead and took a stab at it myself: [URL].. Basically it wraps a URLLoader and an AsyncToken, and maps the COMPLETE, IO_ERROR, and SECURITY_ERROR events from URLLoader to results/faults that get raised on the AsyncToken.
How can I make my Array to return a randomly value? I want AirUnit to return a value between 1 and 3. I want LandUnit to return a value between 4 and 6. I want WaterUnit to return a value between 7 and 9.
I'm making a custom class and all my get functions are working fine except the one that returns an array. Here is the code for my class (abridged to the relevant parts):
ActionScript Code: /* VolcanicIsland class for Polypelago Script in progress
[Code].....
How do I get an array to return correctly? Doing trace(VI1.getData()[0]) doesn't work either.
I am trying to write functions as efficient and reusable as possible. One function in particular I wrote was designed to easily create new objects from externally loaded files. The problem I have is that I can't think of a way to make the function wait for an event listener to complete before returning the desired object. Here is what I have so far and I will point out where the problem is.
Code:
var myNewObj:Object = loadFile(parentName, "swfs/" , "file.swf"); function loadFile(parentObj:Object, urlLocation:String, fileName:String):Object{ var fileLoader:Loader = new Loader();
I'm developing an AIR app that requires a menu to show only during the first run. In it the user will be able to choose the desired language for the app to run in.
I'm displaying this menu without a problem but I need it to stay visible until the "select language" comboBox is changed and then return the selected choice's data value.
how to return a value only after the combo box is changed.
function promptFRMenu():String{ FRMenu.enabled = FRMenu.visible = true; //when I detect the app is running for the // first time, the dialog box is enabled
I'm just trying to make a simple function that will return all the data from my SQLITE database as an array. But it looks like when my function is returning the array, the SQL statement is actually still executing... so it's empty... Does anyone have a suggestion? Or am I just going about this whole thing wrong.I know I could just have the event listener functions outside this function, and they could then set the data. But i'm trying to make a AS3 Class that holds all my SQL functions, and It would be nice to have everything for this particular function just in one function, so it can return an array to me.
public function getFavsGamesArray():Array { getFavsArraySql.addEventListener(SQLEvent.RESULT, res);
I've been working on a mini-mouse maze in as2, placed in a movie clip called "mouse1". On frame one is the start button, and on two is the maze and finish button. So what I'm asking: is there a way to make the movieclip return to frame one when the player right clicks? I know this code, that makes it trace something but I cant use it to navigate.[code]
The issue i'm having is that i want to have dispersed code-generated stars, and then they form a form (reindeer, santa, etc).
The idea is how i make the stars disperse and then return to their previous positions, knowing that the initial positions were randomly generated as well.