Following is a php function for masking a string. Can somebody give me the actionscript equalent for this function.
public static function simple_encrypt($input) {
$return = array();
for($i = 0; $i < strlen($input); $i++){
$ascii = ord(substr($input, $i, 1)) * 2;
$return[] = base_convert($ascii, ...
Hi guys,
I have created a flex chart with multiple Y axis. I want that it shows origin for one of the data series. It shows the line, but on the wrong plase.
Maybe it is because I didn't tell to GridLines which axis use as a source? But, I am not sure if it is possible to do...
Please help if you know how to show horizontal origin on ...
Dear friends,
While making my choice b/n Array and Arraycollection I get confused why whould I use one and why not another.
I have read the theory in langref but apart from that is there some general advantages/disadvantages of one over the another that you have learned from your experience.
Thanks in advance.
...
I've been having trouble creating a mechanism to allow the user to select a span of time from a timeline. Basically i want them to be able to click and drag horizontally, and retrieve the start and end positions of that event.
I especially need to include the case where the event goes off the edge of the screen (even if the end positio...
I'm toying with an Adobe Air app that plays quite large movies. I want to run it on a 1920x1080 display connected to a Mac. Unfortunately, the movies tend to stutter and I'm betting that happens because I'm not using HW GPU acceleration for H264 playback.
Most of the player code is ported (aka copied) from a web player I built and which...
I've just started AS3. I like to use proper programming methods when I program - and I'm not sure how to write code in the symbol classes that is recognized by the main document class.
If I put all my code into the document class it works fine - but WHAT a mess!!! Surely this can't be how it's supposed to be done?
I've been away from a...
I'm trying to create a parametric equalizer in Flash. I've been looking for a way to read audio data and mess around with the samples before Flash plays them on the fly. Loading a sound in one Sound object and using Sound.extract() to read the data, processing it, then play a second second empty Sound object and writing the data to its s...
So this is a weird error that I am getting because I have four movie clips on my frame that I have running back and forth across the screen in a frogger like game. Three of them work and the fourth one does not even though I have the same code basically for all of them. Why would I get an error for one, but not the other 3? Here is my co...
I am building a Flash Application which will allow a user to mix two mp3 files and send the mixed result to our server.
Using Pixel Bender I am already able to create a mix:
public class Mixer
{
[Embed(source="mix.pbj", mimeType="application/octet-stream")]
protected var NewFilter:Class;
private var shader:Shader;
private v...
Hey,
So I'm working on a project, and I've created a 3D scene with particles and everything how I need it.. I'm hoping to use the PV3D2.0 LensFlare class to add a lens flare to the scene. I have all the lensflare movieclips set up, and I'm using the following code to instantiate the LensFlare, but I'm getting the error
TypeError: Error...
Pulling my hair out here trying to solve this one. I have no experience with classes...I code everybit of AS3 into the frames usually. I was trying a custom class out and it just isn't working well.
I have a movieclip called mc_info_panel that I have placed onto my stage in frame one of my main timeline. One frame one of mc_info_panel i...
i want to display a Quadratic equation with format like (4x2). i want to display 2 as superscript automatically after typing x in the textbox.
...
This is working, but is this a good example of polymorphism?
package mtm.test
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.MovieClip;
public class TestDocument extends MovieClip
{
public function TestDocument()
{
var image:Image = new Image();
...
Hi there..
I am a total Flash newbie. I just installed Flash CS5 and ran this code.
import flash.display.BitmapData
import flash.geom.Matrix
import com.adobe.images.JPGEncoder;
import flash.net.FileReference;
import flash.utils.ByteArray;
//get the default camera
//change your Default camera using the Flash Player Settings.
cam=Camera...
Hey,
I've a XMLList like:
<parent>
<one>
<child id="1" />
<child id="2" />
</one>
<two>
<child id="3" />
<child id="4" />
</two>
</parent>
And I want to do something like this:
trace(_LIST._loc_1.child[0].@id);
Where the _loc_1 would be "one" or "two".
Is this possible with the getDe...
Here is my code in its entirety. It won't trace when I Test Movie, but when I debug, it works fine.
import flash.events.*;
function scrollWheelHandler(e:MouseEvent){
trace(e.delta);
}
stage.addEventListener(MouseEvent.MOUSE_WHEEL, scrollWheelHandler);
I hate flash. This is in a new project btw. wtf is going on?
...
I'm making a puzzle game in Flash cs5/as3 which can have custom puzzle shapes.
Basically, the user can draw basic protrusions of a puzzle.
Then I create a black and white puzzle piece with a custom function like this
var piece:PuzzlePiece= new PuzzlePiece(true,true,false,false);
PuzzlePiece is a class that extends Sprite. The four arg...
Below is simplified version of a game I am creating. Basically, the game have some circles. Each circle shoot bullets that is dispatched with timerEvent. When the circle is clicked it is removed from the stage. However, the bullet still keeps on dispatching. I couldn't figure out how to stop timerEvent of each individual circle when it i...
Hi everyone, so today my question is how can we have 1 function triggered by both a Timer event and a Mouse event? 'm trying to avoid having to re-write/re-name a function just because I also have a Mouse event that triggers it and not just a Timer event.
Issue:
I have a addThis bubble fade in with icons on a button rollover, the addTh...
What I am trying to do is load 2 different swf's using 2 different buttons.
What I want to happen is when you click on button 1 it loads the first swf and button 2 loads the second swf removing any other swf from the stage first.
The problem I seem to be running into is with the loader. I cannot seem to load the images into the loader ...