ActionScript 3.0 :: Make A Simple Test For Current Project?
Apr 26, 2011
I'm trying to make a simple test for my current project and I have som problems with Vector class. I'm assigning BitmapData to the MovieClip and store this MovieClip to an Array. Then I'm able to access BitmapData.If I do the same but use Vector instead of Array class, I get this error if I want to access BitmapData:1119: Access of possibly undefined property bitmapData through a reference with static type flash.displayDisplayObject.
Code:
//var store:Array = new Array(); // - THIS ONE WORKS!
var store:Vector.<MovieClip> = new <MovieClip>[];
var itemBitmap :Bitmap = new Bitmap();
itemBitmap.bitmapData = new BitmapData(100, 150, false, 0x990000);
[code]..
View 3 Replies
Similar Posts:
Jun 4, 2009
I've been trying to make my a simple RTMP player test. It seems to be getting the link, but not actually playing the video.
Here is the code:
Code:
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect("rtmp://video.njspeakup.com/vod/ppd");
var stream_ns:NetStream = new NetStream(connection_nc);
[Code].....
The onStatus is tracing back info, but like I said, nothing is playing. I have a videoPlayer on the stage with the name my_video. The FLA is attached. (CS3)
View 1 Replies
Nov 9, 2011
my default document is the swf file.
View 1 Replies
Jan 19, 2011
I'm an MA student, and I am looking to make a simple theremin in Flash as part of a project. Can it be done? Has anyone done it before?
View 3 Replies
Nov 17, 2011
I have set up a Flash Project to publish two FLAs simultaneously.However, when I click on "Test Project" I get the following error message:Quote:Cannot open a protected movie.However, when I publish each of these FLAs independently, I do not get the error message and the file publishes and runs with no problem.
View 0 Replies
Jan 28, 2010
is there a way to get the current directory of the project? i'm trying to load images using dynamic paths and it seems that the link is broken. but seeing the current directory of the running project i'll be able to make sure that my picture links are valid.
View 1 Replies
Jun 22, 2011
I need to write and test xmlStuff.as. I would like to test it on its own without launching the entire application (launched with index.mxml).
Project
Folder: src
Package: Default Package
- index.mxml[c
If I was using java what I would do is I would create a new package: [url].....
And I would put this code in it:
public class xmlStuffTester {
public static void main(String [] args){
XmlStuff xs = new XmlStuff();[code]...
(Alternatly I would write a unit test if I knew exactly what the xml output should be. I don't know that yet so I prefer the above approach.)Question: What is the standard way to do this in Flex builder?
View 1 Replies
Feb 6, 2010
Even though there are plenty introductions to TDD (even in PHP, my primary programming language now),My friend introduced me TDD a while ago, but I wasn't actually able to understand it - what's the point in writing tests to everything first - even the simplest tasks - when in the end, it looks it's more efficient to test only if something doesn't work, although it might be much harder to locate the bug (this could be solved through VCS, no?).So is there any introduction, with dead-simple examples and arguments behind "pros"?Something like "yeah, it's better, because you have better design - look at this example..."I understand that you create "test" and then the function, that should pass the test. But how you say to language, what results should it have? To me it looks that you do some function... debug it (the same way as you debug in no test driven dev.) and call it test and do it again..Also, is this applicable to MVC approach? Or rather, CodeIgniter Newbie MVC?Read a bunch of posted and googled advices, plans, ways and tutorials. I am still not entirely into TDD - I mostly have pretty good visualisation and I think (hope?) I write pretty maintable code, so i still see it as an extra work...
View 7 Replies
Mar 30, 2011
How can I take a simple counter and I want to load the current count into a textbox?
My code:
count1 = new Timer(count);
count1.addEventListener(TimerEvent.TIMER,stopWatch);
count1.start();
[Code]....
1067: Implicit coercion of a value of type int to an unrelated type String.
View 2 Replies
Jul 11, 2010
I've benn trying to get a simple socket server test to work for days now and it seems I'm not getting very far.Basically I just want to send some data from flash to the php script and have it echo it out, or anything at all like that I've been working from this tutorial http[url]....I have this basic flash class which just sends a string to the server:
Code:
package{
import flash.net.XMLSocket
import flash.display.MovieClip[code]...
The server side php is the attached script (pretty much this http:[url]....So I keep the php running on my server then run the as class, what happens is after a while (presumably the 15 second script limit in as) I get this error:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: .../networking.swf cannot load data from website.com:9980.at base()
View 1 Replies
May 25, 2010
Greetings ActionScript.org community. I've been struggling for a couple days now, and I am really interested in some guidance.
Basically, I'm trying to make a 3 page flash where the "Learn More" button on each page takes you to a different landing page. Problem is that I keep getting "Error #1009".
The .fla is attached to this message as a .zip or you can see the .fla here: [URL]
I've gone through a lot of related posts here about error #1009 and I gather that I'm trying to call an object that isn't instantiated yet, but I just can't seem to fix it in my .fla. I've tried all sorts of different approaches, but obviously not the right one yet. Here is the code I'm using:
Code:
stop();
pg2_btn.addEventListener(MouseEvent.CLICK, goPage2);
pg3_btn.addEventListener(MouseEvent.CLICK, goPage3);
[Code]....
View 3 Replies
Mar 3, 2011
I get a working application in Flash made that lets the user click to create blocks which subsequently gravitate towards the mouse. I made the exact same thing in Processing too, just to compare speeds.However, when I run the Flash version and add around 15-20 blocks, the framerate drops to 5-10 FPS.In the Processing version I can add ~60 with no noticeable slowdown. What's the deal, Flash?
Links to each version's source:
Flash version
Processing version
Here is the source for each in case you are a wizard and can help just by glowering at the code sternly and telling it to behave:
Flash version:
blocks.fla
import flash.events.Event;
import flash.display.MovieClip;
[code]....
View 1 Replies
Aug 4, 2007
I'm trying to make a preloader for a little flash project that involves re-assembling a load of rectangles to make up a pattern.Idea is that instead of the usual load bar i wanted to make use of this pattern that is relevant to the project and have it rebuild it self with these rectangles flying in from the side. So far I have got the tweening sorted using the tween class and staggered the 42 (yes took a little while, probably an easier way so let me know on that also) rectangles using 'setTimeout' so it releases each 100milliseconds after the one one before it. This probably the wrong way to do it but i wanted to check how it looked and this was the one way i knew how to do it.
I want to make it so that these rectangles fly in a complete the pattern once the loading has finished, but on a fast connection I don't want it to rush the animation but for a slow connection I obviously want it to adjust the release time and maybe even the travel speed to compensate.
I had an idea of maybe working out the percentage loaded divided by 42 and then run an if statement to see if that percentage for that segment had been reached before 100millseconds had passed, if 100 had passed then release the rectangle, if not then hold the rectangle until 100 m/s had passed. Not sure if that is the best way to do but that's why I'm looking for some suggestions from more experienced developers.
Code:
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
// declare variables
[code]....
View 1 Replies
Jan 9, 2009
I was trying to make a test with a class menu, but I have 2 problems: one is I can't change the name of menu, like home, links, contact, and other one is the pictures on line, I can't see them into the boxes. [URL]
View 1 Replies
Oct 4, 2004
Is it possible for me to use An array to make a 1 hit test count for more than 1 MC like have
Code:
floor=["MC1", "MC2", "MC3"];
}
if (this.hitTest(_root.floor)){
[Code].....
View 5 Replies
Aug 4, 2009
I have managed to create some buttons movie clips and understand how to link pages. The only question i have is how do you make the button/link for the current page highlight so the user can know what page they are on? Is there a way to have a current page indicator in flash as you can do with html/css?
View 2 Replies
Aug 31, 2008
i was just wondering if anyone can point me to a right direction or help me out. I have this game with "balls" coming from down and going towards up and i was just wondering how can i make more and more of them come depending on the current level.
I guess all of them are going to be copies of the same "mc" but can anyone me copying them.
View 1 Replies
Jun 21, 2010
I cant "center" my project, like you can see its "fixed" (yellow lines) in the left side and I cant see "invisible" part of project... (area around the project). how can I move my project so I can see the not-project area around the project. (picture 2).
At the moment situation... (cant see that area around the project)
http://img19.imageshack.us/img19/1186/68553623.png
View 2 Replies
May 25, 2010
i have a function which when the space bar is pressed it goes to a different frame. However the function can still be performed on different frames, how can i make the code only apply to that frame?
ActionScript Code:
function spacebarGoto(event:Event){
if(pressSpacebar){
gotoAndStop("start");
}
}
View 4 Replies
Aug 16, 2010
I was able to gather info on how to test and display users OS and FP version. However this info is "dormant" it is just being displayed on the screen.Does anyone know how to make an alert message to upgrade to the current Flash Player if a user runs the lower version?
View 1 Replies
Aug 5, 2011
I have a slideshow where you can click a button and it will bring you to a specific frame with an image on it. How can I code it so that the clicked button that represents the 'current' slide changes color until another button is clicked? When the other button is clicked, it will take on the 'current' color I bet this has been asked before, but I've only found responses for AS2.
View 3 Replies
Aug 10, 2005
how can make a button that makes the current page my homepage? im 99% sure there's Javascript involved and I've tried writing it my self P.S if its, I got one button to work (adding to favorites),
View 5 Replies
Jun 17, 2011
How i make export my Flex project for IOS.I am using Flash Builder 4.5 .
View 2 Replies
Jul 4, 2009
I'm trying to create a very basic player for my very basic site.
View 3 Replies
Sep 8, 2010
I am using Flex Builder for an Actionscript which apparently has a dependency on IMXML object. I'd never heard of this object, and there is nothing on the project site about any dependencies. I assume it's a Flex component library, though. Which library should I include in order for this program to resolve its dependency issues?
View 1 Replies
Aug 2, 2011
I'm developing an ActionScript 3.0 project for Blackberry Playbook, Android and iOS. I have some custom UI classes, like buttons, that I want to use it in another projects. How can I make an actionscript mobile library project? I'm using Flash Builder 4.5, and I'm not using Flex in my code.
View 2 Replies
Dec 19, 2010
I need a basic calendar that shows the current month the user views it. Then, I need certain dates on that calendar just to be highlighted into a color, red. The dates that are red, I have ready in a simple array in the format:
array= "01, 05, 12"
View 1 Replies
Jul 6, 2009
I'd like to make a simple button that pops out (nicely animated) on mouseover to about 300% it's original size. You can se the button I want to animate here - it's those little buttons some of which are shaded. I want to make them more visible...
View 1 Replies
Jul 18, 2010
I am trying to make a simple movie to run only once.I have put an actionsscript in the very last frame:
var i :int;i = i + 1;if (i==2){ stop ();}
trace (i);
but it keeps looping.The final .swf has to run from within Acrobat 9.
View 3 Replies
Dec 30, 2008
I need a simple counter (in Action Script 3) to tell visitors to a website, since you opened this web-page... X number of babies have been born worldwide.
Where X is simply an ever-increasing number. Say that there are 200,000 babies born everyday throughout the world, then I want the counter to increment...200,000/(24X60X60) = 2.315 per second
View 3 Replies