More and more of my projects are becoming entirely FlashDevelop based, as 98% of the time, I don't need to see the stage. If I do, I code everything in FlashDevelop, and debug it with Flash.
Sadly, I ran into a snag when FlashDevelop didn't want to recognize the Vector class, at least not with code completion. The solution was actually quite simple.
Make sure you have the intrinsic AS file
Browse to the directory where you have FlashDevelop stored (in my case "C:\Program Files\FlashDevelop\".
Continue browsing through to "\Library\AS3\intrinsic\FP10\".
If you have the same setup as me (the default install path) the folder should now read:
C:\Program Files\FlashDevelop\Library\AS3\intrinsic\FP10\
If that folder contains Vector.as, you are good to go on to the next step, otherwise, you either need to update to the newest FlashDevelop, and/or the newest stable release of the Adobe Flex SDK (big file)
Make sure your projects are being treated as Flash 10 and not Flash 9
Finally, (and this was the part that wasn't working for me) on the menu bar, choose Tools > Settings, or press F10.
When the dialog appears, go to "AS3Context", and make sure the "Default Flash Version" is set to 10, instead of the default 9.
While you are in there, take the time to make sure other settings are set to your preference, such as class paths and the SDK location.
If it's still not working for someone, post a comment, and I'll try to debug it.
This blog has moved to a new location!
http://iqandreas.github.com/
Showing posts with label CS4. Show all posts
Showing posts with label CS4. Show all posts
Wednesday, October 28, 2009
Wednesday, September 9, 2009
Error: Error #2071: The Stage class does not implement this property or method.
Error: Error #2071: The Stage class does not implement this property or method.Similar to Error #2069, Error #2071 occurs when you try to set stage properties that have been overriden.
at Error$/throwError()
at flash.display::Stage/set x()
at Untitled_fla::MainTimeline/frame1()[Untitled_fla.MainTimeline::frame1:1]
To quote the ActionScript 3.0 Language Reference:
Quote:
In addition, the following inherited properties are inapplicable to Stage objects. If you try to set them, an IllegalOperationError is thrown. These properties may always be read, but since they cannot be set, they will always contain default values.
|
If you want to measure any farther, you will have to start measuring in the operating system's coordinate space.
Also note that the following stage properties are overriden, and throw errors if you try to set them. These are different than the properties listed above because they will hold actual values, not just the default ones, but you are still not allowed to modify them.
- height - can be read, but throws an IllegalOperationError if set
- width - can be read, but throws an IllegalOperationError if set
- stageHeight - is able to be set, and will not throw an error, but it seems as though changing this property has no effect on the stage, at least not when run in the Debugger Player
- stageWidth - is able to be set, and will not throw an error, but it seems as though changing this property has no effect on the stage, at least not when run in the Debugger Player
- textSnapshot - cannot be read or accessed. Should be in the list above, but I'm not sure why Adobe didn't include this property to the list.
NOTE: Unless you like boring nitty gritty details, you can just stop reading right here. The rest is just for reference.
In addition, some properties and methods cannot be run outside of the stage's security sandbox without the proper permissions, so those methods are overridden just so Flash can check their security credentials. They act just as the regular methods they override with the difference that they will dispatch a SecurityError if accessed by an object outside of the current sandbox.
The affected properties all have to do with children and are "mouseChildren", "numChildren", and "tabChildren". The affected methods that have to do with containing children are addChild(), addChildAt(), removeChild(), removeChildAt(), setChildIndex(), and swapChildrenAt(). Finally, the only other affected methods have to do with Event Dispatching, and are all overriden for security checks; addEventListener(), dispatchEvent(), hasEventListener(), and willTrigger(). Strangely enough, removeEventListener(), doesn't require a security check...
However, don't bother memorizing them as these methods will act just like any other display object to outside users, and won't affect your code at all.
Thanks to Senocular for pointing much of this out.
Error: Error #2069: The Loader class does not implement this method.
Error: Error #2069: The Loader class does not implement this method.Following this error number leads to a simple line:
at Error$/throwError()
at flash.display::Loader/addChild()
at Main/onXMLComplete()[C:\Documents and Settings\Andreas\Desktop\temp\menu_8_sept\Main.as: 116]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
ActionScript Code:
var imgLoader:Loader = new Loader();
var preloader:Preloader = new Preloader(); //Just a little custom preloader class that says "Image Loading"
imgLoader.addChild(new Preloader()); //ERROR #2069
At first thought, this should be possible. Checking the language reference, the Loader class extends "DisplayObjectContainer", so it should indeed have that function.
In fact, all of the following functions will give an error message:
- addChild()
- addChildAt()
- removeChild()
- removeChildAt()
- setChildIndex()
The answer is hidden away in small print inside of the Language Reference:
Quote:
| The Loader class overrides the following methods that it inherits, because a Loader object can only have one child display object—the display object that it loads. Calling the following methods throws an exception: addChild(), addChildAt(), removeChild(), removeChildAt(), and setChildIndex(). To remove a loaded display object, you must remove the Loader object from its parent DisplayObjectContainer child array. |
As usual, the ActionScript 3.0 Language Reference is your best friend.
Labels:
2069,
addChild,
addChildAt,
adobe,
AS3,
class,
CS3,
CS4,
error,
flash,
function,
implement,
lang ref,
language,
loader,
method,
reference,
removeChild,
removeChildAt,
setChildIndex
Tuesday, June 2, 2009
Flash 9+ for the Wii? [And more links + praise for FireFox]
FireFox, and its glorious offline tabs
Since I have a 45 minute commute to and from work (and luckily, I'm rarely the one driving), and at work I have no time to read up on blogs and sites, when I get to work and during my breaks, I find something interesting or try to find the solution to some problem that has been bugging me.
Then, instead of reading the post or blog (which usually ends up being pretty long and not worth spending my precious break time on) I open it in a tab in FireFox. Often, I'll notice an interesting title in the sidebar, which leads to another post, so I open it in another tab to read later. This process repeats several times during the day.
Finally, when I leave work, I have 40 different tabs containing all sorts of interesting information. The problem is, when I get home from work, I am to tired to stare at a screen, trying to comprehend with a blurry mind what some see as a clear solution to one of my problems. So the next day I go to work, still holding those 40 tabs, ready to be read. But during break, I accumulate even more!
So then you get to the point I am at now; 6 windows and 87 tabs (exactly, according to FireFox). And when you think you are all set to go, Windows XP decides to restart the computer and apply all those updates he thinks is so very important. [Tears hair from head, wanting to explode]
Thank goodness for the built in Session Restore feature. I don't know what I would do without FireFox, even though I believe that the programmers at Microsoft put in some sort of bug system that targets FireFox, hoping that internet users will switch over to the new and improved Internet Explorer [plays fanfare] .... not happening. FireFox is my friend, and I will never be unfaithful.
Enough about FireFox, on with the links!
Math.getProbability(Nintendo.Wii + Adobe.Flash));
I was Googling around, searching for any hope that Wii's built in browser might support might some day support Flash 9 or 10 (more specifically, AS3). That way, I wouldn't have to find an oldschool coder to convert my complex and likely sloppy code to slow, inefficient AS2.
I stumbled across this link, which brings a little hope to my heart, but sadly I can't verfiy the aucenticity of the information. I really hope so, but I wouldn't guarantee anything. It doesn't say anything about adding support for the browser, but it will allow Flash Developers to create games for WiiWare without having to learn a new language. :D
http://nintendo.joystiq.com/2009/03/13/cave-story-dev-nintendo-opens-wii-to-flash-development/
Now the big question is, will WiiWare development be open to anyone, or just people who pay an outrageous price for the WiiSDK and have a full fledged corporation where the proprietary information can be stored securely?
If anyone can verify this information with hard, cold evidence, please leave a comment or email me.
An important announcement from Developers woldwide:
Do you see the ads at the bottom of the page? Click them.
Most developers work for free, and the only money they earn is from advertisement income. It doesn't cost you a penny to click the link, and usually, you might find some pretty good deals or learn about a new neat site.
So give those developers a chance! Help keep free software... FREE!
CLICK THE ADS! (of other developers)
-- A message from your local department of coders.
So I encourage everyone, right now. Put down what you are doing. Stop thinking about how tired you are getting off this site. Next time you are on someone's site, show some appreciation, and click. Enjoy the great deals you find from clicking the ads, and deep inward satisfaction that you are putting food in my belly and getting me (legal people, read: others) through college. :)
Ads can actually be quite beneficial. For example, I recently clicked a link for an RTS game, and I'm actually enjoying it. (No, I won't give out the site address unless I get paid to advertise it)
More links to come once I get some sleep... Work tomorrow as well... Ugh...
Since I have a 45 minute commute to and from work (and luckily, I'm rarely the one driving), and at work I have no time to read up on blogs and sites, when I get to work and during my breaks, I find something interesting or try to find the solution to some problem that has been bugging me.
Then, instead of reading the post or blog (which usually ends up being pretty long and not worth spending my precious break time on) I open it in a tab in FireFox. Often, I'll notice an interesting title in the sidebar, which leads to another post, so I open it in another tab to read later. This process repeats several times during the day.
Finally, when I leave work, I have 40 different tabs containing all sorts of interesting information. The problem is, when I get home from work, I am to tired to stare at a screen, trying to comprehend with a blurry mind what some see as a clear solution to one of my problems. So the next day I go to work, still holding those 40 tabs, ready to be read. But during break, I accumulate even more!
So then you get to the point I am at now; 6 windows and 87 tabs (exactly, according to FireFox). And when you think you are all set to go, Windows XP decides to restart the computer and apply all those updates he thinks is so very important. [Tears hair from head, wanting to explode]
Thank goodness for the built in Session Restore feature. I don't know what I would do without FireFox, even though I believe that the programmers at Microsoft put in some sort of bug system that targets FireFox, hoping that internet users will switch over to the new and improved Internet Explorer [plays fanfare] .... not happening. FireFox is my friend, and I will never be unfaithful.
Enough about FireFox, on with the links!
Math.getProbability(Nintendo.Wii + Adobe.Flash));
I was Googling around, searching for any hope that Wii's built in browser might support might some day support Flash 9 or 10 (more specifically, AS3). That way, I wouldn't have to find an oldschool coder to convert my complex and likely sloppy code to slow, inefficient AS2.
I stumbled across this link, which brings a little hope to my heart, but sadly I can't verfiy the aucenticity of the information. I really hope so, but I wouldn't guarantee anything. It doesn't say anything about adding support for the browser, but it will allow Flash Developers to create games for WiiWare without having to learn a new language. :D
http://nintendo.joystiq.com/2009/03/13/cave-story-dev-nintendo-opens-wii-to-flash-development/
Now the big question is, will WiiWare development be open to anyone, or just people who pay an outrageous price for the WiiSDK and have a full fledged corporation where the proprietary information can be stored securely?
If anyone can verify this information with hard, cold evidence, please leave a comment or email me.
An important announcement from Developers woldwide:
Do you see the ads at the bottom of the page? Click them.
Most developers work for free, and the only money they earn is from advertisement income. It doesn't cost you a penny to click the link, and usually, you might find some pretty good deals or learn about a new neat site.
So give those developers a chance! Help keep free software... FREE!
CLICK THE ADS! (of other developers)
-- A message from your local department of coders.
So I encourage everyone, right now. Put down what you are doing. Stop thinking about how tired you are getting off this site. Next time you are on someone's site, show some appreciation, and click. Enjoy the great deals you find from clicking the ads, and deep inward satisfaction that you are putting food in my belly and getting me (legal people, read: others) through college. :)
Ads can actually be quite beneficial. For example, I recently clicked a link for an RTS game, and I'm actually enjoying it. (No, I won't give out the site address unless I get paid to advertise it)
More links to come once I get some sleep... Work tomorrow as well... Ugh...
Subscribe to:
Posts (Atom)
