ActionScript 3.0 :: Unload The Class But Still Showing Output
Feb 26, 2011/// msgbox class
package{
import flash.display.MovieClip
[Code]....
/// msgbox class
package{
import flash.display.MovieClip
[Code]....
I try this code... Bt when i render fla file through flash it shows output but when i jst play swf file it shows nothing
stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyMovement)function KeyMovement(event:KeyboardEvent):void{ var myStr=String.fromCharCode(event.charCode) output.text="key is Pressed="+myStr}
i put an textbox on stage output but it is showing nothing...
ActionScript Code:
if(Number.POSITIVE_INFINITY == Number.POSITIVE_INFINITY){
trace(Number.POSITIVE_INFINITY/Number.POSITIVE_INFINITY);
} if(5 == 5){
trace(5/5);
}
Outputs:
NaN
1
Whenever I output the xml data, it still brings out the xml tags but on the second row it shows the elements.
//First Row Load
<item>images/1.jpg</item>
<item>images/2.jpg</item>
<item>images/3.jpg</item>
<item>images/4.jpg</item>
<item>images/5.jpg</item>
<item>images/6.jpg</item>
//Second Row Load
images/11.jpg
so on and so forth....
The AS I used is this:
//Loading of Images
if(rCount > 0 && index < rCount) {
var i = index;
index++;
var adThumb = qAds[i].*;
trace(adThumb);
I've tried using the "toXMLString()" and the "toString()" but still the same thing continues to output.
I am currently developing a flash application that would allow a user to control a movieclip on the stage using 2 keyboard inputs (like turning 2 knobs in order to align something).I have it set up that on the 2 keyboard inputs, the movieclip moves.What I am looking at doing is using trace statements that I use to track the position of the movieclip, which is just a simple black dot, and having the values of the trace statement show up on screen in 2 dynamic text fields, after being rounded to the nearest whole integer. The dot is in the movieclip entitled mCoordPlane.My script is below:
stop();
mAligned.visible=false;mNotAligned.visible=false;
var letterK:Boolean=false;var letterJ:Boolean=false;var letterD:Boolean=false;var letterF:Boolean=false;[code]......
I managed to show the output of a shell command in TextArea of flex by calling following php file via HTTPService and then using the dataprovider attribute of TextArea to show the returned output.
<?php
$output = shell_exec('ls -l');
return $output
?>
Now i have a C file which prints some lines (by using printf command of C) when i run it in shell using
./myCfile
But following php code seems to not return anything as my TextArea remains empty
<?php
$output = shell_exec('./myCfile');
return $output
?>
Problem that I want to share with you is that I have two external swf. One is swf generated by Flex IDE and second one is generated by Flash IDE. When I load flex swf, loading progress output is not showing until the whole file is loaded. This problem is not presented when I load flash swf as you can see on this testing page 90.157.198.254/test/test.php.
[Code]...
I have got all my code working, including this display function, however "totwaste" does not appear in output text btw i am just using a textfield I have put on the fla manually...and yes I have called it "output".i plan to create the text field dynamically, however it didn't work.[code]
View 3 Repliestest.fla has the document class test.as. This is test.as:
Code: Select all// test.as
package
{
import flash.display.MovieClip;
public class test extends MovieClip
[Code]....
Why is it so? I want to be able to output the value of number through the document class like I showed in the code of test.as above.
Now i am learning Oops concepts.... It going welll..... but i have doubt in some places....
[Code]....
I put this script in Brick.as file. Actionscript Code: import com.adobe.ooas3.Brick;var firstBrick:Brick = new Brick(); I put this script in my_flash.fla file. I got the out put from this example file. I am clear with this. Because the class name and function name are same. But,
[Cdoe]....
In the above script the class name and function name are different.... What script should i put in the fla file to get the output?
understanding the use of an external class in Flash CS5/AS3. The need is to be able to encode/decode JSON and I have found a library that sounds good at: [URL]. But Im a bit confused as all the tuts show attaching code to an object (convert to symbol, export for AS frame 1). I'm not which one is the right one for my needs. All I need to do is read the JSON data and show the output in a text box much like I would with XML.
View 3 RepliesI am trying to unload a class from memory using the following experiment:Create a shape on stage, make a movieclip out of it, add a trace in the first frame, extend the movieclip to be about 40 frames, give the movieclip a linkage name "test" and remove it fromstage.Experiment 1:Add the following code to the stage:ActionScript Code:var mcl = new test();Publish the movie. You should see the trace statement showing up all the time.Now I wish to delete this instance.Experiment 2:ActionScript Code:delete mcl;gives an error that it cannot delete a fixed property and have to set it to null instead.Experiment 3:
ActionScript Code:
mcl = null;
No error, but still see the repeating trace output.
[code]....
I am trying to load external swf's from buttons. I managed to load an external swf from a button, but as a result I can't work out how to get it to unload when other buttons are clicked. Currently In the flash file I have only 2 buttons 'dutrain_b' and 'portfolio_b'. I would like to add many more when the code is working.
Code: Select allimport flash.display.MovieClip;
this.stop();
dutrain_b.addEventListener(MouseEvent.MOUSE_DOWN, godutrain_b);
[code]...
I am trying for first time actionscript as package document.And I am trying to make run a Doc class that load an XML file and output the results on trace.I don't know where are my errors:
Code:
package
{
import flash.display.MovieClip;
import flash.events.*;
[code]...
I am unable to unload content loaded by loader class.
View 4 RepliesSprites, Shapes and MovieClips added as children of the main class just aren't visible. There's no error message at compiletime, no error message at runtime, everything seems to work perfectly except that the child (and its children, whatever they happen to be) just doesn't manifest on the screen. It might be worth noting that not all DisplayObjects have this problem. Bitmaps and TextFields, for instance, both show up perfectly.
If it matters, I'm running Flash Player 10 on 32-bit Windows Vista, compiling using Flex 4 with a command line instruction of the following form:
"mxmlc.exe" -as3 -static-link-runtime-shared-libraries=true -target-player "10" whatever.as
I've already tried basically all the obvious tests I can think of to narrow down the problem. Aside from the object being invisible and apparently not responding to mouse clicks, everything works exactly as expected.
I'm quite new to AS3 (coming from php/c#) and like it very much. My problem: trace doesn't output anything in the Output window anymore?!
View 2 RepliesI'm quite new to AS3 (coming from php/c#) and like it very much.My problem: trace doesn't output anything in the Output window anymore?!
View 3 RepliesI want the current swf to unload and the new one to load only after a transition occurs. Is there a more efficient way to do this than if. switch()?
View 2 RepliesI have this code in a class:
Code: Select allpackage com.jhoyt{
import flash.net.URLRequest;
import flash.events.*;[code]....
and I have this code on the timeline of the movie its being loaded into:
Code: Select allimport com.jhoyt.SSIlaunch;
var ssi:SSIlaunch = new SSIlaunch();
addChild(ssi);
I know its loading because I can put trace actions into the addAndPoint function and it gets called. what can I do to make it display?
I have this code in a class:
[Code]...
I know its loading because I can put trace actions into the addAndPoint function and it gets called. what can I do to make it display?
I am working on a school project that requires me to load external .swf or .jpg files. I currently have all of the buttons working and are loading an external .swf file on to the screen. The problem I am having is that when I go from one button to the next the loaded .swf stays on the screen and the next .swf gets loaded on top of it. I know that I need to unload the file but I am not sure where to put the code for the unload or what code exactly to use. I would like when the button is pressed to unload the previous loaded .swf and load the new .swf without having a separate button to unload.
[Code]...
I'm trying to unload an external SWF on _root to load a new one instead. I've tried (almost) everything but can't figure it out... I get this error : "Error #1010: A term is undefined and has no properties."
[Code]....
I'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?
View 5 Repliesvar nextY = 0;
var nextY2 = 18;
for (var count = 0; count < result_lv.typeCount; count++)
{
[code]....
The type count is correct but the information for the project is wrong.
I have 1 class (that is extending a UIcomponent) that is representing a component. In that component I create different instances of another class that is also a UIComponent but this class doesn't show up in de first class. I see that it is running and that it has the correct hights but I got the feeling that it doesn't show up with this hights. If I trace I see the width and height is 200 X 200 but there is still nothing visible in my component.
View 1 RepliesI have been trying to output XML with PHP but encountered a strange(!) error in Internet Explorer. The expected xml output is this:(simplified)
<root>
<match_id>12</match_id>
<stadium_id>43</stadium_id>
[code]....
I have set the PHP header for XML output, and changed lots of other things but could not make it work.The $match->getId() part is just returning an integer but IE always shows this value as 0. If I set <fan_id> and <match_id> manually, IE shows the values correctly. By the way, I am using this XML output in Flash (AS3) and this also shows the same result with IE.
alright, i want the output to be one after another, but right now it just overwrites a previous output in the loop. how would i get it to output one after another?
package {
import flash.display.*;
import flash.text.*;
import flash.events.MouseEvent;
[Code]...
How would I go about compiling just AS3 in CS3? I tried having my .as files in a folder then creating a new .fla from within CS3 in the same folder but I cant seem to get any output.
View 3 RepliesI'm having some problems importing a class, the message that Flash gives me is this; The class being compiled, 'ImageLoader', does not match the class that was imported, '[URL]'. The only line of code in my flash movie is this: import com.martijndevisser.*; And yes, the class is in that folder The class is from here: [URL] I've used the class before and it works fine, I just dont know what to do?
View 4 Replies