Actionscript 3 :: Is An Alchemy C Library Faster / Slower Than An Equivalent Library
Apr 19, 2011
I've got a simple question. Suppose some simple lib written on c. Did I understood correctly that alchemy compiles it AS3 before compiling it to swf. If so, will the lib be slower or faster in comparison with the same lib written on AS3.
I wanted to make live drums play with keyboard shortcuts. The problem was that MP3 is not good enough in this case (encoders adds random silence at beginning of the sound) and also flash itself makes delay (I tried use already buffered file with play specified_start_point_in_miliseconds)). So my solution is OGG (this format is gapless). I use compiled swc file from Adobe Alchemy library and simple frontend for it. Everything works fine, OGG file is playing, but its still much delay - no matter if its lodeaded external or as embedded, and if its first or n time. How to make sound play fast equally to key press.
Here is my very simple example code: import flash.display.Sprite; import flash.events.*; import flash.utils.ByteArray; import flash.events.SampleDataEvent; import com.mauft.OggLibrary.OggStream; import com.mauft.OggLibrary.OggEmbed; [Code] .....
right now i have some items in my library that use a base class using the linkage menu item by right clicking on the item in the library.
i want to dynamically populate the movie clips instead of them being already in the library. I know how to create/populate the movieclips by using the loader class, but i am not sure how i assign the base class to each movieclip i create in my .as file
Im trying to write the codes for buttons that make a Square rotate faster and slower. I tried hard but it did not work. how about a slider to control speed of the square_mc. can some1 give me the code.
this is the code:
addEventListener(Event.ENTER_FRAME, startRotate); function startRotate(evt:Event):void { // Call function rotateSquare
I have seen a few blog entries on this and have had a discussion or two with my team mates but I would like to see what the stack overflow community thinks.
So why does the Adobe Alchemy Tool create so much faster running flash byte code than the flex compiler?
Also, when will the flex compiler be able to make similar performance gains? Will it require programmer specific use of special Array's or something of that nature to get the same performance?
I am working in two different applications, one to be compiled for desktop use (AIR) and one to be compiled for the web. They are part of the same project and use the same visual components, but they are completely different apps. When a visual component is changed in one application then it should also change in the other one. Is this a good situation to use a shared library fla? I am new to the concept of shared libraries and I am considering the options.
On one had I would not have to update 2 applications everytime I change something, on the other, I would always have to recompile the library folder when I do the smallest changes to a component.
I am making a flash app where I want to have a user defined viewport like the stage in the flash IDE which the user can use to define objects that have a starting postition somerwhere off or on the stage and an ending position either or on or off the stage with the object then tweening between the two points. My question is this: I want the user to be able to define a curved path for the object to tween along. Is there a library of code that I can use to define curved paths for the app?
Ideally I would like something similar to the functionality available in Flash, so a bezier curve sort of path that is subdivided into handles that can be dragged to define the path of the tween. If there isn't an existing library, then do you know of the functions that I would need to define (mathematical equations related to drawing curves etc)?
In my child swf I am using the sound from library with "attachSound". I also use the play/pause button controls of this sound alongwith the other animation.Now when I load this into my main swf file with "loadMovie", It plays fine but no sound. I found that this is due to no sound linkage in my main file library.I want to share my child swf's library with main file's library.
As one would expect, Classes within my RSL can access the classes and methods of the embedded swcs. In other words, classes in my library can for instance call import org.alivepdf.Print and then call AlivePDF's Print.print() method. But it there any way for my project to also use those third-party classes and methods, by "tunnelling through" my RSL??? Even though my project is using my RSL, when I try to type out org.alivepdf.Print it cannot be found.(Obviously I can make a manager class in the library to "pass through" specific commands to the embedded swcs; I'm looking for something a little more generic and all-encompassing here).
Library symbol "Card" is linked to class "Card" which extends "MovieClip". Library symbol "Card" contains a card background image.Library symbol "Ace" is linked to class "Ace", which extends class "Card". Library symbol "Ace" contains a TextField with a big letter "A".So we have Ace extends Card which extends MovieClip. Ace therefore extends MovieClip, but does not DIRECTLY extend MovieClip.When I drop an instance of Ace on the stage and compile the clip, all that shows up is the big letter A. However, I expected the background image from Card to be included, since Ace extends Card, and the Card symbol contains the background.It seems like Flash ignores symbol content unless it belongs to the top-level class being instantiated.I think it's LAME that one symbol can't extend another. The IDE could easily draw Card as a non-editable background while I'm editing Ace which extends it, and it should instantiate Card's content and then Ace's content when an Ace is instantiated.
I have a dashboard I created using Flash CS5 using CS5.5 and ActionScript 3.It seems that while this dashboard is running, the FPS gets slower and slower over time (over several hours) I am thinking that I might have a memory leak but I am not sure how to find out.The project is a Flash Projector exe that loads 8 independent swfs.Each swf file essentially calls a web service and gets XML dataThey then dynamically create a bunch of TextFields,assigns an event listener (Event.ENTER_FRAME) and animates across the screen.When the TextField goes off the screen, I clean up the Text field by removing the EventListenerremoving the TextField and setting the TextField to null.
My question is, does a better, faster CPU necessarily equal faster SWF compile times? Or does it rely on something else (OS, memory, etc). I only use AS3 and some of my projects take a while to compile. If certain hardware can guarantee me a faster compile time, it'd be worth including those things in my shopping list.
I can make a normal preloader, with a bar and percent shown and so on... But I want to make a little thing in the middle of the preloader that rotates faster and faster when the percent loaded goes up. This is what I thought would work:
[code]in my original code..function "test" will change the x axis of the images by Timer..I wanna the x axis of the images can be changed after every two seconds..but when I run it..it's obvies faster and faster every time when the Timer dispatch the TimeEvent the delay always shorter than the last time.
When you open the Library panel and then my a new library so like you have 2 on the screen now pretty helpful if you want to open an external and have your current project open and drag and drop right. But here is the part I don't understand you have your 2 panels open now and every time you open your Library panel 2 pop up instead of one. God forbid if you every opened like 4 or 5 of these free floating Library panels I already have 3 going and there up there. is there a way to have all your open your Library panel with out having multiple un-needed Library opening along with the one you want?
In my child swf I am using the sound from library with "attachSound". I also use the play/pause button controls of this sound alongwith the other animation.
Now when I load this into my main swf file with "loadMovie", It plays fine but no sound. I found that this is due to no sound linkage in my main file library.
I've made a library in flex with different components and my CSS I want to use in different projects (the goal of a library....). BUT even if I can use my components, I can't use my CSS file which is in the library. When I try <mx:Style source="assets/style.css" />, it wasn't found :(
So, how I should do to have a CSS file in my library which can be use in a project ??
I'm using a XML inside my Flash to create something like an "internal database".Then I need to use that elements data to pull objects from the Library and add them to the stage using a for loop.
Here's the XML:
ActionScript Code: var paises:XML = <paises>
[Code].....
I believe it must be reallly simple, but not for an "AS-dumb" like me..my problem is... I need to assign a different MC from the Library to the stage every time the loop goes on.
I want to add a nice mc. It is on my library. I've checked "Export for Actionscript" and "... frame 1" checkboxes. It has a name "step2". Base class name "flash.display.MovieClip".I also have an .as that works ok.
I'm new to flash/AS3 and I'm having trouble figuring out how to use the library.I understand that when I include the line import fl.controls.Button.I need to have a button in the library (otherwise I get a compiler error) but how do I put a button there? I tried copying a button from Common Libraries into may library, but that didn't help. I also tried drawing a rectangle, dragging it to the library, and clicking on "Button" in the properties box, but that doesn't work either.
I was messing about with an idea I had to run through and handle objects, and I figured a nice way to find out what object it was I was looking at, would be to determine the name it has (the one defined in the library, not the instance name) and work from that accordingly... But I can't figure out how to retrieve its library-name? I mean, there are ways round it... No big-deal, but I just can't believe that I can't grab an object's library-name.