actionscript

How to debug Flash/Flex in two browsers?

Hi Flash experts! I have a Flex 4 application which connects to ASP.NET webservice based on FluorineFx. It is authenticated by cookies via RemoteObject.setCreadentials() Both applications connect to FMS server and talks to each other via RTMFP direct connection (P2P). I want to debug both instances of this application in Firefox and I...

OSMF/ActionScript 3 - detecting the end of a live RTMP stream, etc.

What's the best way to check whether there is video data (or not) in a live RTMP stream? For example, if a broadcast terminates, can I auto-detect that condition, to perform some sort of "thank you for watching" behavior? Also, how can I know if a visitor somehow gets disconnected from the Internet during the broadcast? (So I can notify...

populate 2 columns in datagrid from combobox itemRenderer

Hallo Hope one of you can perhaps help me. I have a data grid with an Combobox itemRenderer in it. What I have is a grid with a person id and person name (more stuff in grid but I am struggling with this). In the person name column I have an combobox with all the people on then system's names and id's. What I want to do is when I selec...

Knowing which instance of a symbol the event listener came from?

I need some help! I have no doubt this is a dumb problem that I've just over-thought to the point I got dumb about it. I've got one "main" instance of a MovieClip symbol (let's call it Mountain) with an accompanying class. In the flow of the program, I automatically generate 8 other instances of the same symbol, let's say, each has a di...

AMFPHP how to get object in php that is dispatched by flex?

hello i am working on AMFPHP and i had this problem -> i am using XAMPP server with AMFPHP gate way for flex and this is working well for returning values from PHP ->the problem is how can i get the object in php which i passed to the pap class using flex code is here:- connection.objectEncoding = ObjectEncoding.AMF3; ...

Unable to send MIDI file name to Java to playback music

I could play MIDI file where "filename" is a String type with "asd.mid" value. However, I tried to sent AIR's nativeprocess command to Java, it shown "could not read" error. How come? Java: private void playMidi() { if(isPlaying.equals("0")) { try { song = MidiSystem.getSequence(new File(filename)); ...

Javascript - what kind of declaration is this?

I come from other programming languages and I am new to Javascript. I am trying to understand what a Javascript code is doing. I found this line var guiTouchPos : Vector2 = touch.position - guiTouchOffset; What kind of declaration is this? What is this line doing? Wouldn't it be easy to write var guiTouchPos = touch.position - guiTo...

Midi file unable to read in Java program

I still confuse if I don't use command line to sent parameter through Flex application to Jar with "xyz.mid" as a filename, to the read input, it throw me an error which cannot read and when I use command line, it works! How do I get the Nativeprocess to work? I found it could display exactly the right filename, it is not the location ...

How to save locally user data in AS3, and then read it/export it?

Hey there, i was wondering what the AS3 experts would do to perform this task: save user data (registry form) locally, and then be able to read it or export it into something client can read. Thanks in advance, i am quite new to the AS3 approach to this things, thing to notice is this project is pure AS3, and deployed in Adobe AIR, so n...

Flex 4 skin in FXG or image which is more efficient?

I need to display the skin as a piano keys which has up and down state. Compare to a commercial grade music player like NI Kontakt, it doesn't consume over 10% (around 3-5% to be exact) of my CPU when playback a song or I abuse by press the keys repetitively as fast as I can. However, I see my Flex app will use over 10% which is double ...

Comparison of Flash 3D Engines

Hi, I am currently digging into the whole Flash 3D stuff and I am quite unsure which engine I should use. I really prefer haXe for development but ActionScript 3 is also fine. Therefore I would like to ask you about experiences you have made! If you answer this question please consider the following points: Easy to use? Easy to learn...

Which is efficient: Switch, If or function?

I will need to handle a piano key that can respond as fast as possible without high CPU load with repetitive key press and release on virtual piano in Flex application. Is calling function much effective or Switch? Example: switch(keyNote) case 'c4': keypress.button=down; case 'c4': keypress.button=down; case 'c4': keypress.button=do...

Dispatch Flash Event when person closes browser

I have an RTMP stream loading and would like to know the drop off time of the video. Is there a method of knowing when a person abruptly leaves the video session by closing the window, back button, address bar, etc? Or do i need to make an external interface call from JavaScript to Flash using something like onunload & onbeforeunload ev...

actionscript dictionary contain function

I want to initial all states such as c4.currentState='down' so that I could call dictionary key to execute the function, is it possible? private var keyMap:Dictionary = new Dictionary(); private var c4v1:Object = new Object(); private var c4v0:Object = new Object(); private function initial_keyEvent():void { keyMap[c4v1] = "c4.cur...

actionscript image vs skin performance

Using FP 10.1, and undecide which is more efficiency if I implement a skin button with FXG contain gradient, bevelfilter, stroke for up and down state VS two state of images. Which one would use less CPU? When do I use cacheasbitmap? ...

Flex 3 reads browser http proxy setting

Is there a way to know the proxy setting of web browser under Flex 3, namely actionscript 3? We use socket library to connect remote HTTP server. It is nice to read web proxy setting to connect to HTTP proxy instead of directly to HTTP server. ...

how to apply tween motion on UIcomponents in flex using actionscript?

hello i want to apply tween motion on UIcomponents using actionscript in flex. i searched alot but didn't find something useful help required. thanks in advance. ...

AS3 check if class extends another class

In AS3, I'm trying to check whether an object is an instance of, or extends a particular class. Using something like if (object is ClassName) works fine if the object is an instance of ClassName but not if it's an instance of a class that extends ClassName. Pseudo-code example: class Foo {} class Bar extends Foo {} var object = new Ba...

flashvars issue

Hi, I received an swf (AS3) file that works when you pass it variables through flashvars. I can't recompile it to work in a different way because we only bought the compiled swf, not the source. We could use it in an HTML page, but the problem is we must use it (in a sort of proprietary) Windows form (fundamentally, an application that t...

Swf banner button hyperlinks don't work when there is NO "WWW" vs. with "WWW" in the URL?

We have a swf banner with buttons/links on our site header. When our customers DO NOT enter the "www" before our URL the banner links do not work - do not forward to the page. When our customers enter the "www" in the URL It works. First Thoughts, Is it a security setting in the browsers? I tried the latest version of firefox, chro...