ActionScript 3.0 :: What Is The Conversion Of Onload Event
Jul 8, 2009I have following code on AS2 . Now I need to convert into AS3.
[Code]...
I have following code on AS2 . Now I need to convert into AS3.
[Code]...
i have this code that load on a keyframe
loadListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
info.text = Math.round((bytesLoaded/bytesTotal)*100)+"%";
[Code]....
Because the swf_loader are mp3 player and if i change page wihout having press the stop button first the music is still playing. I have try to just add swf_loader.unloadMovie(); on every other keyframe but it doesnt work. i guess i have to find out where this swf_loader exist/is included right?
I have a class with a XML object in it. In one of the class' methods, I tell the XML object to load a document. Before I do that, I set up the onLoad event to call one of the class' other methods. The problem is that in that handler function, I can't seem to access any of my class' data. If I try to use the "this" pointer, I'm getting the XML object not my class.
A simple example:
[AS]
class MyClass
{
var theXML:XML;
[code]....
im trying to create a conversion utility that uses number input via calculator style buttons to generate conversion for the following distances:
-Miles to/from KM
-cm to/from mm
-binary to/from decimal
Now i was thinking of possibly having the options contained within an drop down and an input text field where the numbers are entered via the calculator buttons. The only thing im struggling with is how to perform the actual calculations on the different formats. Has anyone had to do anything similar in the past? Ive only found currency conversion examples and not sure how to apply that to these conversions.
I have this code inside a for loop which is inside a function:
Code:
_root["track" + i] = new Sound();
_root["track" + i].loadSound(extTracks.data.tracks[i], false);
createOnLoad("track" + i);
[Code]....
When i test the movie in flash itself everything works fine, but when i open the movie in IE or the stand alone flash player, details_txt and length_txt are both empty.
Is it possible to retain variable information after exiting an onLoad event?I have a variable declared outside the onLoad event which a function called from within the onLoad event populates. The problem is, after leaving the onLoad event the variable gets cleared
View 1 RepliesI have a class with a XML object in it. In one of the class' methods, I tell the XML object to load a document. Before I do that, I set up the onLoad event to call one of the class' other methods. The problem is that in that handler function, I can't seem to access any of my class' data. If I try to use the "this" pointer, I'm getting the XML object not my class.
A simple example:
[AS]
class MyClass
{
var theXML:XML;
var someVariable:Number;
[code]....
I am loading an xml configuration file and based upon values obtained from it, I am connecting to an xml socket in the server.
But I can't register for socket.onConnect Function now. I could do it in my old cold in which I didn't use a configuration file. The configuration values are loaded properly. It seems the issue is in the way, socket.OnConnect function is registered.
[Code].....
I tried the following:
$this->view->pagedata['body'] = "onload='purchase_ajax_init();'";
But just keep getting:
Notice: Indirect modification of overloaded property Zend_View::$view has no effect in C:Program Files (x86)endApache2htdocsljjapplicationviewsscriptspurchasecreate.phtml on line 4
I'm embedding a flash object in an html page and calling windows.onload to initialize the Flash movie. The problem is that the windows.onload does not wait for the Flash object to completely load. Is there way to make sure that the Flash object has fully loaded?
Here is the code I'm using:
<head>
<script>
var falshObj = null;
function pageInit() {
thisMovie();
[Code] .....
I am writting an image gallery that loads one intial xml file named galleries.xml.From this point each xml node loads a XMl file for that gallery that holds all the images.The problem arises in the fact that to do this I need a onload function within an onload function.Onload functions dont accept parameters so I can pass down the variable that shows what loop the gallery loop is on as I need that in the function that holds the images.
View 4 RepliesI often recieve FLV files for work and need to convert them to SWF. I know that flash imports FLA files but not FLV... I converted the FLV the F4V, opened it in flash, exported it as a SWF and it worked great... once.After that it rendered a white screen. How can I take an FLV file and properly convert it to a SWF suitable for web serving?
View 1 RepliesI have been creating animations for children, and recently finished an animated short. I am more of an artist than a techie, and I have not been able to find a clear cut answer as to what is the best way to convert flash to DVD. What file should be converted to achieve the best quality? SWF? MOV file? Is there a way to do it from flash? from Adobe Premier? I tried the AVI output and the quality was terrible.
Is a seperate converter needed? If so, are which give the best quality audio and visually? Here are some of the basic requirements for an animated short entry: DVDs must be compatible with standard set-top DVD players-- do not simply burn a quicktime or AVI file to a disc as data. It is highly preferred that you send us an NTSC, Region 1 or region free (Region 0) DVD when submitting to us, but we will also accept PAL and SECAM formats as well. If you are sending a DVD that has a region code other than 0 or 1, and/or a format other than NTSC, please mark this CLEARLY on the disc AND on the DVDcase.
I have buttons across the way that are going to listen if they are clicked and if they are clicked it performs a test that says "if i'm not on this page then go to it"I'm a script kiddy I'll admit so I copy paste and go with what works. My compiler errors are down drastically when publishing to AS3.
[code]...
I am working on a project in which i need to convert swf file to jpg and mail it to customer.So for converting swf to jpg i used as3corelib the all code run successfully but the converted image is not showing in php page.my script is as follows,
my flash as3 script is follows :
import com.adobe.images.JPGEncoder;
import flash.display.BitmapData;
import flash.utils.ByteArray;
import flash.net.URLRequest;
[code]....
how to convert swf movie clip to image format(jpg,gif) using action script 2.0.I successfully done this using action script 3.0 But my project in action script 2.0.
View 0 Repliesi've been working throught the great book, Quote:'foundation flash for designers'I thought i'd play around with an mp3 player, the example below uses an array for the mp3's, i want to load them using xml.whatever i'm doing i'm getting lots of errors, i have done xml loading before but this seems a bit more difficult.
PHP Code:
var songList:Array = new Array("alternative.mp3", "rockfunk.mp3", "chill.mp3");
var isPlaying:Boolean = false;
[code]....
I make basic promo videos for some of my clients & a couple need the file in swf format.Currently I am using iMovie (for basic image to image cross disolves). I am learning Premier Pro& plan on using that in the next month or so.iMovie exports in .mov format. What is the best way of converting to swf? Would it be media encoder to FLV, then Flash to SWF?
I am using Mac OS 10.5.6 & I have CS4
There are options to do it using Java and JS. And these options can be clubbed with AS3 but is there something out-of-the-box in native AS3 to do it.
View 3 RepliesI created a thread about converting an .as file to xml and then back. I asked too mny questions in that thread, I apologize...I was being greedy. Does anyone know how to, once you have a string, convert it to XML.
View 0 RepliesIs it possible to convert swf to flv dynamically.
View 0 RepliesSearched around for this one a bit. Kinda sucks that there are a lot of synonyms for HSV.
HSB, HLS, HSL, HSB, HBS, etc.
Basically Hue, Saturation and ( Brightness / Value / Luminosity ).
What I am trying to accomplish is an extremely fast way to convert 24-bit RGB values to 24-bit HSV values. I've tried a few different ways with somewhat unexpected results.
Using a lookup table for every 24-bit color eats tons of memory and is actually slower than calculating the values on-the-fly (doesn't make sense to me).
Here's a partial example of what I currently use:
Code:
package org.peaceoutside.utils
{
public class ColorMath
{
[Code]....
I have a whole bunch of WAV files, and for each of them I am to create a SWF file, which will contain this WAV (of course compressed as MP3) on the first frame, and then on a separate leyer there will be a stop action on the last frame, corresponding to length of this WAV. The SWF is supposed to have the same name as WAV. I s there any way to automate this process?
View 1 RepliesI am converting a regular movie from Windows moviemaker wmv export (exported at highest quality) and converting it with Xilisoft flv converter (at highest quality upon conversion) and I noticed the output quality of the final FLV is degradated a little. Some of the symptoms are: lower light, slight pixelation,and loss of crisp detail. Audio sounds great but why does the picture lose it's clarity from how it looks in moviemaker? I can see the crispness of the outlines in the video in Moviemaker, but in the final flv, it loses that. Is there anything I can do to make it keep it's original crisp look like how it looks in MM, or do you have to expect a loss of quality when using flvs?
View 4 RepliesI am using the CS5 media encoder to convert mp3 movies to flv for a site. The encoder is bringing the video over fine but not the audio.
View 3 RepliesThis is a mockup of my swf: It's just a menu and a sprite named scene (which is a container for obj1 and obj2 and it's child obj3).The obj1 and obj3 are draggable. While dragging them the MouseEvent.MOUSE_MOVE is fired and in it's event handler I'm updating a textfield with the object's coordinates relative to the scene object:
private function onMouseMove(e:MouseEvent):void {
myTextfield.text = "x:"+ objectBeingDragged.x + " y:" + objectBeingDragged.y;
}
When I move obj1 I have no problems because it's parent is scene and the coordinates I want are the coordinates relative to scene. But when I try to move.obj3 I'm getting the coordinates relative to it's parent (obj2) and I want the coordinates of obj3 relative to scene.I tried to convert the objectBeingDragged coordinates to global and then to local but I had no success...
private function onMouseMove(e:MouseEvent):void {
var localPoint:Point = new Point(objectBeingDragged.x, objectBeingDragged.y);
var globalPoint:Point = objectBeingDragged.localToGlobal(localPoint);[code].....
I have a problem sending a String as a number..
I have a text field called score0 :-
var score = score0.text;
The string (score0.text) will have an "s" at the end as the time is counted in seconds and tenths, so I will be receiving something along the lines of "8.1s" as a value.. I would like to take score0.text, remove the "s" then *1000 the amount as a number before use..
I'm not that good with Math and i have a formula for a that it's universal from what i understood but i dont know how to transform it to work with Flash's Math API.
View 2 RepliesI am wondering if it is possible to get a url to some image on google, say a square (jpg/png/gif), and process it into an SVG. Is this possible?
Right now I'm getting ByteArray data in Actionscript by making a URLRequest('image/on/google'), with dataFormat="binary". I don't think Actionscript could handle/do it, but maybe it could. I'm also good with Ruby, so perhaps is this possible with Ruby?
If so, any sample code/libraries to get started?
I guess another way to ask it is, how do I convert a Bitmap to a set of Vector Paths like Adobe Illustrator does?
Here are my functions for conversion:
[Code]....
Question: How can I solve this and is there a bug in the API? PS: I admit the code isn't straight forward because it simply didn't work. PPS: SimpleXMLEncoder throws stack overflow if I have objects that have a property value referencing to other objects... so that's why I want to write my own method for the conversion