I'm using the following code. It works fine with getElementByID but if I use a OS detection function it stops working.
function getFlashMovie(movieName)
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
getFlashMovie('myId').sendToActionsript(str);
The above...
Is it possible to reflect an object in actionscript and get the property names back in the order they are positioned in the class?
I have tried the following
var reflectionObject : Object = ObjectUtil.getClassInfo(obj);
var propsArray : Array = reflectionObject.properties;
(orders alphabetically)
var typeInfo:XML = describeType(obj)...
I have a pretty good handle on dispatching from classes other than the Document Class, but what happens when I want to dispatch an event from the Document class and have other classes listen to the document class broadcast?
It seems like there are several ways to approach this (i.e using a Singleton, using composition, using MovieClip(r...
The situation is simple. I have a datagrid that gets its data from a webservice.
When data from the webservice is retrived it calls the following function:
private function onListReg():void
{
arrRegOld = WSAutoreg.list.lastResult as ArrayCollection;
arrReg = WSAutoreg.list.lastResult as ArrayCollection;
dgReg.dataProvider ...
Is there any ActionScript 3 Style Guide available online?
...
i'm trying to call a method inside a flash movie from js, every time the mouse leaves the "div".
It works on Internet Explorer, but not in firefox. any ideas?
here is the html script:
<script type="text/javascript">
window.onload = function(e){
init();
}
function init(){
document.getElementById('div').on...
I want to clone an object of a class (whose source code I do not have) and copy all of the associated event handlers from the original object to the new cloned object. Does anyone know how I can do that? I know how to copy the properties from the original to the new, but can I iterate over all the event handlers and add them to the new o...
hey everyone.
Lets assume i got 3 .flv files in a folder. How can i create a flashplayer which can read the amount of .flv files from that folder and play them. And if example, i add 2 more videos to that folder, the flashplayer will detect them too, and play them chronologically after the name, date, etc.. ??
just need some guide or ...
Hi,
I am trying grab all the member variables in AS3, and then foreach one i would like to process it in various ways. I would need the name and then if it is a collection of some type I would like to loop through that collection as well. I am attempting to essentially serialize in a somewhat custom fashion.
Thanks!
...
I have imported to the library two images and have given them the custom class names MaskImage and MaskedImage. Then i write the code:
package
{
import flash.display.*;
public class MaskDemo extends Sprite
{
// Properties
private var sprMaskedImage:Sprite;
private var sprMaskImage:Sprite;
private var bmMaskedImage...
Hi im loading a child swf into my parent swf and I want to pass some parameters to the child swf. Any idea on how to do this.
Here is my code:
var req:URLRequest = new URLRequest( "test.swf" );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener( Event.COMPLETE, loadComplete );
loader.load(req);
function ...
I know its possible for FFmpeg to render from the webcam to SWF and FLV. But the problem is the SWF file can only be read via AS2 and FLV seems to only be loading a static frame from my Flash Player.
Is there a way for FFmpeg to render a AVM3 SWF or a stream-able FLV?
...
Adobe Flash Builder: How to make a function to play video starting from one second and ending in another? So I havein MXML simple video player tag. I need some function to play that video from second X to second Y and pause it. How to do such thing?
BTW: we asume file is embeded into SWF.
...
Hi all,
I'm facing some strange issue in appendChild. In the below code at line no 3 'xmlTobeUpdated' is not appending to 'xmlRecord'. Instead of appendChild(), i tried with prependChild() that time its got added to the beginning. Any have idea why appendChild not working. Is there any issue in that method. Please Help.
1 xmlToBeUp...
// Import Papervision3D
import org.papervision3d.Papervision3D;
import org.papervision3d.scenes.;
import org.papervision3d.cameras.;
import org.papervision3d.objects.;
import org.papervision3d.materials.;
public var scene:Scene3D;
public var camera:Camera3D;
public var target:DisplayObject3D;
public var s...
I am about to create a simple demo in flash where I have 3 layers, 3 keyframes.
Currently I am just use some simple gotoAndStop() to move to the next keyframe.
But now I need a custom event to do that but I can't create a class inside the action of a keyframe so I am not able to create a custom event.
I just have AS3 developing experie...
Having a bit of a problem creating an instance of an object. Bear in mind that this is timeline based and NOT an external class…
var foo:Object {
var a:String;
var b:String;
}
var new_foo:Object;
function makeFoo():void
{
new_foo = new foo();
}
function doStuff(e:MouseEvent):void
{
makeFoo();
}
Everything runs fine ...
Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks.
public static short[] decmail_str_to_binary_data(String s)
{
short[] data = new short[s.length()/2];
for (int i = 0; i < s.length(); i += 2)
{
char c1 = s.charAt(i);
char c2 = s.charAt(i + 1);...
I have two applications in my project 'test' the applications are one.mxml and two.mxml and i want to use the same main.as file in both using
<script source='main.as'/>
Can I access the components of both applications from main.as when both are running simultaniously.
Thanks in Advance
Prashant Dubey
...
Hi,
This one is driving me insane! For some reason, when I export a bin-release of my application, all my text fields have a different line spacing from that of the bin-debug version. How is this even possible?!
Has anyone else come across something like this before?
...