ActionScript 3.0 :: Critique Class - Add Some Common Functionality?

Feb 5, 2010

I've extended Sprite to add some common functionality - this is a generic class I use in most of my real-world applications.Everything "works", but I'm curious if there's anything I'm doing that could be done better, or if there are common tasks that should be included that aren't, or if there are members that aren't really that handy and perhaps could be omitted.

For example, there are several members to handle display-list traversal - I've kind of gone back-and-forth on this, and various versions have had methods to remove all siblings, or retrieve an array of elderSiblings and youngerSiblings,etc,but that seemed a little overboard so have been removed.The offsetWidth and offsetHeight are inelegant at best (so clumsy in fact I'm really leaning toward removing them entirely), but AFAIK there's no other way to get back the "true" height/width of an object whose first child is not a position 0.Also I'm curious about the event management overrides. I've run these on several commercial applications and have found them both useful and without any obvious drawbacks, but have never seen anyone else do anything similar,

View 13 Replies


Similar Posts:


ActionScript 2.0 :: Find Greatest Common Factor And Lowest Common Multiple?

Nov 21, 2010

find greatest common factor and lowest common multiple

View 8 Replies

ActionScript 3.0 :: Common Class Directory Source Path ?

Oct 20, 2011

I have created few actionscript projects and most of them uses same com/ dir with same classes library such are adobe or greensock.In Flash builder, on one of the projects, I`ve created new source path, to that common dir.So now I have structure like this: MyProject

[source path] com
src (with AS documents)
fla (flash file)

When I edit one of my AS files from src dir in Flash Builder, I can normaly see reference to [source path] com directory, and I have full tooltip reference to it`s content.

ActionScript Code:
import com.greensock.loading.*;
import com.adobe.serialization.*

However, if I try to edit that same file in flash professional, I get no reference and there is no way I can compile file.What am I doing wrong, why flash professional does not see classes from my com directory? I even try to point it to that dir in actionscript settings but that did not work either.

View 1 Replies

ActionScript 2.0 :: CRITIQUE NEEDED On New Flash Site I Did

May 5, 2009

First, if I am doing a full flash site (like I did), what is the web standard now as far as load times? You see I have the site fully loading all content first, before the home page even shows. I have heard of dynamically loading content, for instance, different sections and subsections of the site, to be called on when clicked, as opposed to loading the whole site first.Now are there any benefits to dynamically loading sections as opposed to loading ALL of the content first? What is the pro standard? Is loadingsections/subsections/content dynamically something very easy to do, left for aprofessional, or left for a seasoned professional?Second, How important is the "title tag" in the html page that I am embedding the flash site in? I recently changed it from "Untitled", was leaving it as "Untitled" a rookie mistake?

Third, I have set up several email addresses for the client, including some web forms, that i used php file to send it to their email when they hit the send button; My question is...in the php file, I have it sending email to the client, and myself. I don't plan on reading their email, but thought I would effectively cc myself, for backup, in case something was wrong with their email, then I would have the client's email in case...so is that ethical or legal to do? What would web pro's do? I don't want to get in trouble, but I don't want to ask the client, because I don't think she will understand my reasoning.Lastly, if you were an instructor and I was your student that did the site I did as a final project, how would you grade it? Look at is as a critique of the site based on professional web standards and protocol so to speak.

View 17 Replies

Professional :: Sound Class - Use Event Listener - How To Get Functionality?

Jul 5, 2011

i have got all my public vars for sound class but im having trouble on how i would execute them because i normal would use event listener but its OOP lol so how do you get that functionality ?code in star.as file:
 
package {
import flash.display.MovieClip;
public class star extends MovieClip    {[code]......

View 2 Replies

ActionScript 3.0 :: FlashDevelop - Setting Base Class Functionality?

Oct 22, 2010

In flash CS3 we can set a base class. What if I do artworks in Flash 8 and code in Flashdevelop? How do I achieve the base class functionality in this situation?

View 8 Replies

ActionScript 1/2 :: Approximate The Functionality Of Assigning A Document Class To A FLA/published Swf?

Sep 9, 2011

Is there a way in AS2 to approximate the functionality of assigning a document class to a FLA/published swf?
 
I would like to publish a swf that is an instance of a Topic class (extends movieclip). For various reasons I can't use AS3, but I would really like to emulate that part. Any ideas?

View 1 Replies

Actionscript :: Flex 4: Override The Default Button Functionality In A Skin Class?

Jul 20, 2010

I have a videoplayer with a custom skin class. I want to override the functionality of the fullscreen button. When I add an click event, the player still goes into fullscreen mode. How can I prevent the fullscreen event from firing?

View 2 Replies

Media Server :: RTMP Based HTTP DVR Functionality And HLS Based IOS Functionality?

Jan 20, 2012

I want to use RTMP based HTTP DVR functionality and HLS based IOS functionality, So I need to know how to MPP from my existing DVR app to the livepkgr app so that the stream being recorded at the DVR app can be used by the Flash and Stream MPP over to livepkgr app and can be used by the IOS HLS.

View 1 Replies

ActionScript 3.0 :: Can't Put A Common MC Inside 5 MCs?

Aug 3, 2011

Simple question: In AS3 you can't do sharing of a MC between more MCs, right? In AS2, you can. How can I work around this?

Let me be specific: in ActionScript *TWO* I do something like this:

movie.attachMovie(LargeImage, "image", 20);

LargeImage = movie clip of 400 x 480.

Now... the thing is: I do this for 20 MovieClips but they all REUSE the same original MC apparently (with no memory increase, of course). If I animate the MC, it will animate within all 20 MovieClips. I'm using a mask to show only portions of the MC, but I think that's not important.
 
But in ActionScript 3 this wouldn't work, right?
 
Because in AS3 every time we .addChild, the child is REMOVED from the parent, so the same MovieClip / Sprite couldn't be in 2 places at once. How would you work around this without creating a separate instance of the "LargeImage" MovieClip for each object? Note that I don't want to use BitmapData & CopyPixels: the object may be animated.

View 11 Replies

ActionScript 3.0 :: Can't Put A Common MC Inside 5 MCs

Aug 3, 2011

In AS3 you can't do sharing of a MC between more MCs, right? In AS2, you can.Let me be specific: in ActionScript *TWO* I do something like this:

Code:
movie.attachMovie(LargeImage, "image", 20);
LargeImage = movie clip of 400 x 480.

Now... the thing is: I do this for 20 MovieClips but they all REUSE the same original MC apparently (with no memory increase, of course). If I animate the MC, it will animate within all 20 MovieClips. I'm using a mask to show only portions of the MC, but I think that's not important. But in ActionScript 3 this wouldn't work, right?

Because in AS3 every time we .addChild, the child is REMOVED from the parent, so the same MovieClip / Sprite couldn't be in 2 places at once.How would you work around this without creating a separate instance of the "LargeImage" MovieClip for each object? Note that I don't want to use BitmapData & CopyPixels: the object may be animated.

View 9 Replies

Flex3 :: Widget For A Common Calculator?

May 4, 2010

I need a calculator for a flex app I am making, and was wondering if there was any official widget prebuilt or already in good quality. I could make one myself but it would be nice to use one that already existed and had a nice api to customize it with.

View 1 Replies

Flex :: Common Function Across Modules?

Jun 25, 2011

We are working on a project where we have multiple modules- all these share a common set of functions like rounding, string parsing etc.Currently, we have added these functions into the parent container (which calls these modules) and use them in the respective modules. Likewise, if we have to share variables between modules, we add them to the parent module- so it becomes shareable across.Is this the right approach- both from a performance and structure perspective?

View 2 Replies

Common Video Format That Will Run On Any Browser?

Jan 30, 2012

Video format that play on any browser , with play/pause/stop buttons? i have the following code for .swf but i cant get any button to control. [code]...

View 3 Replies

ActionScript 3.0 :: Translation From All The Common Commands?

Nov 11, 2009

is there a site out there that has a translation from all the common AS2 commands?I'm just learning AS3 now and i have no idea how to do the basic things such as _root.mc.loadMovie("asd.swf"); anymore

View 6 Replies

ActionScript 3.0 :: Finding The Least Common Denominator

Feb 17, 2011

I want to know how to find the Least Common Denominator between two fractions so I can make them into integers. I understand to do this you probably need to get the denominator itself but I can't figure out a way mathematically to do this.

View 9 Replies

SWFAddress - Common URL String Not Allow Page Reload

Jun 10, 2011

Here is the code that I've got, I'm also using SWFaddress:
Code:
function whyPageLoad(event:Event):void {
var link:URLRequest = new URLRequest("[URL]");
navigateToURL(link, "_self");
}

The swf exists on a page [URL] and the link above [URL] doesn't work/do anything. I tested the swf on a different URL and it loads the page correctly or if I load it into "_blank" it also works. So it seems to be something with the common URL string that is not causing a page reload.

View 1 Replies

ActionScript 3.0 :: Why Underlining Certain Fonts But Not Others (all Of Which Are Pretty Common)?

Apr 29, 2011

I have a simple question that hopefully has a simple answer (which mocks me with its elusiveness). In the code below (taken from Gary Rosenzweig's "ActionScript 3.0 Game Programming University" (2nd ed.)), I am declaring a simple style sheet using all AS3 supported tags/attributes to underline an HTML link. My question is this: why won't AS3 underline the chosen font (Arial) but yet it will underline certain other fonts that I substitute it for (such as "Times New Roman" and "Garamond")?

[Code]...

View 3 Replies

Flex :: How To Set Common Background Color For All Tabs

Oct 30, 2009

Is there a way to set a common Backgroundcolor for all the tabs in a given TabBar? Rightnow I am able to set color only for selected tabs using
tabBar.getChildAt and setStyle

View 1 Replies

Flex :: Set Up Projects That Reference Common Controls?

Mar 30, 2010

I'm not a flash developer, I'm having issues figuring out how I should set up these two projects that I have in Flex Builder.I've already created projA which has a .mxml that references several custom controls & skins from com.xxx.controls within projA.I now have to build projB which also has a .mxml that will create a different .swf. I want to use some of the same controls from projA.I currently build projA through the command line and nant and will need to do the same for projB.

Should I create a new project to move all of the common controls into? How do I then use this library project in both the projects & compile via command?

View 1 Replies

Actionscript 3 :: Serialization Format Common To Node.js?

Feb 22, 2011

The game is written in Flash, and I plan to develop the server in node.js because (a) it would be a cool project for learning node.js, and (b) it's fast, which is important for games.The server's architecture is based on messages sent between the server and client (sort of like Minecraft's server protocol). The message format I have so far is a byte (the packet type), two bytes (the message length) and that many bytes (the message data, which is a mapping of key-value pairs). Problem is, I really don't want to develop my own serialization format (because while I probably could, implementing it would be a pain compared to using an existing solution).Unfortunately, I am having problems finding a good candidate for the message data serialization format.

ActionScript's own remoting format might work, but I don't like it much.SON has support in node.js (obviously) and in ActionScript, but it's also textual and I would prefer binary for enhanced speed.MessagePack looked like a good candidate, but I can't find an ActionScript implementation. (There's one called as3-msgpack on Google Code, but I get weird errors and can't access it.)BSON has an ActionScript implementation, but no node.js support besides their MongoDB library (and I'm planning on using Redis).

View 4 Replies

Have Flex WebServices Share A Common Wsdl

Aug 3, 2011

I have a flex app that loads a WSDL at runtime and shares that across several different web services I have defined. Unfortunately each call to loadWSDL() makes a network request for it, and while it's not really a problem due to caching it's still annoying and wasteful to have all those requests generated. Is there a simpler way to solve this problem and only make one network request?[code]

View 1 Replies

Arrays :: Flash / AS3 - How To Find Common Values

Dec 13, 2011

I'm struggling with something that shouldn't be too difficult but I can't figure it out I have a number of Arrays with different values and I want to find the common values all of the Arrays have, see example below:
var arrayOne:Array = ["1","2","3"];
var arrayTwo:Array = ["1","2","7"];
var arrayThree:Array = ["1","2","9","12"];
_resultArray = ["1","2"];

View 3 Replies

ActionScript 3 :: Most Common Color In Bitmap (Data)

Mar 26, 2012

I would like to extract the most common color of a bitmap. My first idea was to do this by looping through the bitmapData and extracting every pixel color and storing it in an array. But the function has to be as light as possible so my question is; Is there a more lightweight approach to achieve this? The function is used to extract background color of a Bitmap.

View 4 Replies

ActionScript 2.0 :: Rotation Around Common Center OnEnterFrame

Mar 25, 2008

url...I'm using this code i made some changes like changing the array for a xml.In some part i put a button to stop the movement and i used [code]
and it works perfectly, but then i want to return with another button to the movement. and i can't make it work.

View 2 Replies

ActionScript 3.0 :: What Is Common Or Acceptable Flash CPU Usage

Jul 17, 2009

I'm building a media player with alot of tweens in the interface , I'm wondering what is common or exceptable in the professional flash community. When I tween the whole Interface into another view firefox spikes to 12 - 16 cpu on a 3.01 GHz duo-core. Is this normal? After the tween Firefox flunctuates between 2 - 8 cpu while idle.

View 6 Replies

ActionScript 3.0 :: Mixin Instead Of Include For Common Function?

Aug 12, 2010

If I have say a dozen classes, that may or may not be called at runtime, and that all have a common function; is there an advantage to creating a separate class with just this common function in it and then having it mixin at runtime ?I am wondering would this allow me to reduce the size of each class and thereby the swf file size? I figure this must be wrong else why would we ever extend anything when we could just mixin the functionality we want at runtime?

View 4 Replies

ActionScript 2.0 :: Finding Most Common Element (Mode) In Array

Jun 6, 2006

I have a simple array and I want to find the most common element in the array, i.e. the mode statistically. This is what I have so far,

var answers = ["c","b","c","a","b","c","a","b"];
var aTotal = 0;
var bTotal = 0;
var cTotal = 0;
for (i=0; i<=answers.length; i++) {
switch (answers[i]) {
[Code] .....

View 3 Replies

Jquery :: Online Graphs Of Common Tween / Easing Functions?

Apr 13, 2010

Is there an online cheat-sheet to graphs of common tween / easing functions? I want a bookmark I can refer to when picking a function for a tween (e.g., Quintic, Quadratic, "Bounce"). The only one I can do in my head easily is linear.

View 1 Replies

Actionscript 3 :: Resizing Images - Load With A Common Size (300x300)?

Mar 14, 2011

I'm using loader class to load images. I'm loading ten images with different sizes. I'm trying to load them with a common size (300x300) doing this:

[Code]...

But, I can't see anything.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved