Home » Archive

Articles in the Strange/Bugs Category

AS3, Strange/Bugs, flash »

[17 Mar 2010 | No Comment | ]

If your project compiles a bit faster than usual but doesn’t seem to work at all without even giving you any error. Or when debugging your project, it simply tells you that there is no actionscript code or something similar, you might want to have a look at this post first: http://blog.open-design.be/2009/05/27/5005unknown-error-when-optimizing-byte-code-bullshit/
And if this doesn’t solve your problem then you might have this problem:
Two symbols having the same Class name. I know, flash doesn’t allow that but when assigning a base class to a bunch of symbols, it might happen …

AS3, Strange/Bugs, flash, usefull »

[26 Jan 2010 | 5 Comments | ]

Well in fact, it is… or is it not ? depends on how you see it.
The trouble
If using masks or objects that have their “visible” property on true but “alpha” at 0.0, it is taken into account into the calculation of the bounding rectangle. Even objects that are outside of the masked area are added to it.
The solution(s)

During my search, I found a post from David Barlia: http://studio.barliesque.com/blog/2008/10/the-trouble-with-getbounds/. He uses a custom technique to approximately calculate the bounding area of a DisplayObject.

In that same post, someone proposed to use BitmapData …

AS3, Strange/Bugs, flash »

[20 Jan 2010 | 4 Comments | ]

Here is the “configuration”:

One main movie that loads external movies.
Externals movies that have stop() functions on their timeline.

When played alone, the external movies run perfectly. The stop() functions work well and everything’s fine.
But when loaded into the main movieclip, all the stop() functions stop working… (well in a way they work “too well”)
Reason:
Conflicting classes… (I suppose)
My external movies have a base class, let’s call it “ExternalMcBaseClass”.
In my main movie, I declare that my external movies are of the type of “ExternalMcBaseClass”. When I specify their type as a simple “MovieClip”, …

AS3, Strange/Bugs »

[27 May 2009 | 3 Comments | ]

So, if you got a bug on FireFox and Safari when trying to insert a @ character into a textfield, just take a look at this post: http://blog.madebypi.co.uk/2009/04/21/transparent-flash-text-entry/
It seems to happen when a div is placed (or was…) over your flash movie.

AS3, Strange/Bugs »

[27 May 2009 | One Comment | ]

For those people out there who are experiencing this cool issue, just upgrade your flash cs4 10.0.0 to 10.0.2. It solved the problem for us.
Sometimes Flash CS4 won’t even show you anything in the Output and/or Compiler errors windows and when debugging your movie it will just tell you that it cannot do anything with a project containing no code or something like that. It is the same issue.
It seems to happen on “very large projects” as the guys at Adobe say but I’v worked on larger project and it …

AS3, Strange/Bugs »

[18 Apr 2009 | 2 Comments | ]

Sometimes you just spend time for stupid things like this and when you find out how to do it you just wonder why it has to be like this… I feel like there are still a lot of inconsistencies in ActionScript 3…
Anyway, here is the code to do so. Just set a new SoundTransform object to the soundTransform property of your NetStream object like so:

var nc = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// change "1" to whatever you need the volume to be changed to
ns.soundTransform = new SoundTransform(1);

AS3, Game, General game programming, Network programming, Strange/Bugs, managers »

[29 Jan 2009 | 12 Comments | ]

Basic Events manager classes. Remove all events, group events, suspend and resume events…
Features

Keep track of all events added and removed with this manager.
Add listener.
Remove listener.
Add a listener to one or more groups.
Suspsend a listener and/or a group of listeners without removing them.
Resume a listener and/or a group of listeners.
Remove all listeners from a group.
Remove all listeners.

For what purpose ?
Well, frankly, those events are sometimes a pain in the arse to manage.
Let’s say we have a bunch of buttons we just want to disable for some period of time and then …

AS3, Strange/Bugs »

[24 Jan 2009 | No Comment | ]

Here is the case:
I have one MovieClip called “container” that holds several other MovieClips. Each one of these MovieClips have a dropshadow filter applied to them.
The “container” mc is masked by a shape on the timeline and one can scroll up and down this mc via a scrollbar.
Well, now it seems that the more MovieClips the “container” mc contains, the slower the scrolling is (which is logical). And it’s true until the “container” mc reaches a certain height. I sai “certain” because I didn’t really bother to calculate it (just …

AS3, Strange/Bugs »

[6 Aug 2008 | No Comment | ]

Another strange thing happening in Internet Explorer (MSIE 7.0):
my movie is linked to a class (Document class) and in the constructor of this class I either do nothing or go and play a frame number labelized “step1″. This label is located at frame 45 on the main timeline of my movie.
In Firefox, no problem, but in IE, it stops at frame 29, even if I use a gotoAndPlay(45);
After some debugging, it seemed that the movie wasn’t entirely loaded while trying to access this frame. probably the reason why it stopped …

AS3, Strange/Bugs »

[5 Aug 2008 | No Comment | ]

I just came across a problem when using the getChildAt function. It returns null even though there are children (numChildren property is greater than zero).
The thing is that it happens only after I move to another frame of a MovieClip object. And only for “dynamic” objects like the TextField (StaticText works just fine). (by “dynamic” I just mean objects that can be created with actionscript)
It seems that when moving to another frame of a MovieClip using actionscript doesn’t “initialize” all the objects contained in that frame (and set with the …