Search Results

Search found 908 results on 37 pages for 'as3'.

Page 2/37 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • PNGs alpha transparancy in AS3 - Unknown file-type

    - by WiseDonkey
    Hello there! After whittling down of the options we've encountered a problem with PNG's and ActionScript 3 (AS3). When loading a PNG 8 or PNG 32 with alpha transparancy we're getting the following error reported in Flash:- "Error #2124: Loaded file is an unknown type" Now, we're dealing with some legacy images, and it appears as though this problem isn't universal - some images believed to be 32bit alpha PNG are loading. BUT, some conclusions:- converting one image that was 32 bit alpha (NOT WORKING IN AS3) to PNG 8 index transparency DID work. And converting that same image to PNG 8 alpha DID NOT work. These all worked in AS2 There is no difference between the headers Headers of a Failing Image [0] => HTTP/1.1 200 OK [1] => Date: Tue, 06 Apr 2010 14:17:28 GMT [2] => Server: Apache/2.2.3 (Red Hat) [3] => Last-Modified: Tue, 06 Apr 2010 13:44:05 GMT [4] => ETag: "3700054-11d6-a3983340" [5] => Accept-Ranges: bytes [6] => Content-Length: 4566 [7] => Connection: close [8] => Content-Type: image/png Headers of a Working Image [0] => HTTP/1.1 200 OK [1] => Date: Tue, 06 Apr 2010 14:19:02 GMT [2] => Server: Apache/2.2.3 (Red Hat) [3] => Last-Modified: Fri, 30 Oct 2009 18:38:08 GMT [4] => ETag: "ba8057-65f2-5445c400" [5] => Accept-Ranges: bytes [6] => Content-Length: 26098 [7] => Connection: close [8] => Content-Type: image/png Any thoughts of a direction of further investigation or thoughts on a bewildering problem with little to no documentation; very warmly welcomed. EDIT Now it would appear as though something in the PHP conversion of the images is shafting; I use the following PHP to add alpha layers:- imagealphablending($image_p, false); ImageSaveAlpha($image_p, true); ImageFill($image_p, 0, 0, IMG_COLOR_TRANSPARENT);

    Read the article

  • AS3/Flex Override function in imported swf

    - by Riccardo
    I'm using a flex component that use a to load a .swf file. The loaded .swf - is passed to me as is and I can't edit - it has some as3 functions in it Is it possible in the "parent" application (the one with ) to override functions included in the "child" swf (the imported one)? And if it's possible, how? Thanks

    Read the article

  • AS3: how to get current calendar week

    - by msec
    How can I get the current calendar week with AS3 ? I've not found any information by using the official adobe online-reference (check: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Date.html) or using google's web search. Thank you soo much! Kind Regards, msec

    Read the article

  • How to access the stage from an AS3 class in Adobe Flash

    - by Graphithy
    The problem I've encountered is that I am using a keyboardEventListener to make a movieclip run around. As I'm a college student, I'm creating this for an assignment but we are forced to use as3 classes. When I run the code in the maintimeline, there is no problem. But when I try to access it from another class (with an 'Export for ActionScript' on the movieclip in question) I get an error he can't address the stage. this.stage.addEventListener(KeyboardEvent.KEY_DOWN, dostuff);

    Read the article

  • Easiest way to store long term variables with AS3

    - by deeb
    What's the easiest way to store a simple numeric variable on my server and then have a Flash application also hosted on the server read/write the variable? I've seen various xml solutions, but they look too complex for such a simple job. Is there a way to just read/write a simple text file with just AS3 and no middle-ware?

    Read the article

  • Good MVC framework for AS3

    - by webwise
    Do you know a decent MVC framework for AS3? I am currently looking into PureMVC but I need some reassurance that it's the best choice. Do I really need to use a framework? or would it be better for me to implement MVC myself?

    Read the article

  • Organising XML results as cells in container (AS3)

    - by PJ Palomaki
    Hi, I'm having some problems figuring out how to organise data pulled off XML in cells within a container. I'm sure this should be a basic thing in AS3, but my head's fried.. can anyone help? Basically an array if fed to callThumbs() which iterates through it and compares the entries with preloaded XML _my_images. If match is found, it's sent to processXML which loads all relevant info and loads a .jpg thumbnail. All this is then fed to createCell which creates a specific cell with position values depending on x_counter and y_counter values (4 cells in a row) and adds the cell into a container _container_mc. The Problem: This all works fine and looks fine, the problem is that the cells within the container do not display in descending order. They are in random order, probably because some of the .jpg's takes longer to load etc. How do I easily organise the cells within the container in descending order by the XML .id value? Or how do I tell Flash to wait till the thumbnail and data is loaded and the cell created and added? Thanks guys, would really appreciate all the help! PJ //Flash (AS3) function callThumbs(_my_results:Array):void { // selector = 1 for specific items, 2 for search items var _thumb_url:XML; for (var r:Number=0; r < _my_results.length; r++) { // iterate through results vector, compare with _my_images XML .id for (var i:Number=0; i < _my_images.length(); i++) { if (_my_images[i][email protected]() == _my_results[r]) { _thumb_url=_my_images[i]; processXML(_thumb_url, i); } } } } // End callThumbs function processXML(imageXML:XML, num:Number) { // Processes XML data and loads .jpg thumbnail var _thumb_loader=new Loader(); _thumb_loader.load(new URLRequest("thumbs/thumb_sm/" + imageXML.@id + "_st.jpg")); _thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,thumbLoaded); _thumb_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, urlNotFound); var id:XMLList = new XMLList; id = imageXML.@id; var description:XMLList = new XMLList; description = imageXML.@description; function urlNotFound(event:IOErrorEvent):void { trace("The image URL '" + String(imageXML.@id) + "' was not found."); } function thumbLoaded(e:Event):void { var imageLoader:Loader = Loader(e.target.loader); var bm:Bitmap = Bitmap(imageLoader.content); createCell(bm, id, description, num); adjustFooterBar(); // Adjust bottom footer } } // End processXML private function createCell(_image:Bitmap, _id, _description:String, _position):void { // Creates a cell with data, add to container var _cell_mc = new CellTitle(); _cell_mc.initCell(_image, _id, _description, _position, x_counter, y_counter); if (x_counter+1 < 4) { x_counter++; } else { x_counter = 0; y_counter++; } _container_mc.addChild(_cell_mc); // movieclip container } // End createCell

    Read the article

  • AS3 - Loader class: Resize external swf to it's original stage size

    - by Rob
    Hi there! Here is my problem (unfortunatelly didn't find solution @google): I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 300 x 200. After adding the external swf to the main swf the external swf expands it's size from 300 x 200 to the main swf's size: 800 x 600. How can i prevent this? I want the loaded swf to save it's original size. Cheers Rob

    Read the article

  • AS3 Embed Image Instead of drawing graphics

    - by David
    I've got a custom AS3 scrollbar that I need to modify. The scroll thumb (the draggable part of a scrollbar) is currently just done by drawing a rectangle. But I need it to look more like a real scrollbar. Not sure how to modify the below code to import/use a scroll thumb image: scrollThumb = new Sprite(); scrollThumb.graphics.lineStyle(); scrollThumb.graphics.beginFill(0x0066ff); scrollThumb.graphics.drawRect(0, 0, 1, 1); addChild(scrollThumb); I know that I would embed an image by doing something like this: [Embed(source="images/image1.png")] private static var Image1Class:Class; But then how do I set the scrollThumb = to the image? Thanks!

    Read the article

  • Flash makes Firefox not to respond

    - by Hasan Gürsoy
    I have a full screen flash animation. When this page is open at Firefox and I want to minimize or re-size Firefox screen minimize button starts to blink and Firefox does not take any action till this tab is closed. There is not too much code in the flash file.

    Read the article

  • Pass easing function as variable in AS3

    - by Andrej
    Hi, I've been looking for some time now.. Is is possible to pass easing function as variable in AS3? eg. TweenLite.to(mcDelimiter, resizeTween, { x:(stageWidthHalf-(initStageWidthHalf-mcDelimiteri_X)), ease:Elastic.easeOut } ); TweenLite.to(mcBody, resizeTween, { x:(stageWidthHalf-(initStageWidthHalf-mcBody_X)), ease:Elastic.easeOut } ); ... now if I at some point want to change "Elastic.easeOut" to something else I would have to change it at multiple parts of the code.. Can it be done so I just pass it as a variable and then if I want to change it, do it only on one place? EDIT: ...also, can for eg. if(currentFrame == "FrameLabel") somehow be done? ..meaning, can I pass the currentFrame label name as a variable? Thanks in advance for anwsers, Andrej

    Read the article

  • Flash AS3 undefined property MouseEvent in document class

    - by Lee
    Hi guys, this is my first time trying to use document classes in AS3 and im struggling. I am trying to add event listeners to a 2 levels deep movie clip, waiting for a click however i am getting the following error. ERROR: Access of undefined property MouseEvent package { import flash.display.MovieClip; import flash.media.Sound; import flash.media.SoundChannel; public class game extends MovieClip { public var snd_state = true; public function game() { ui_setup(); } public function ui_setup() { ui_mc.toggleMute_mc.addEventListener(MouseEvent.CLICK, snd_toggle); } public function snd_toggle(MouseEvent) { // 0 = No Sound, 1 = Full Sound trace("Toggle"); } } }

    Read the article

  • Why flash makes Firefox not to respond

    - by Hasan Gürsoy
    I have a full page flash animation. When this page is open at Firefox and I want to minimize or re-size Firefox screen, minimize button starts to blink and Firefox does not take any action till this tab is closed. There is not too much code in the flash file. What can cause this? Also this could not be related with full page. I saw other flash files doing same thing. As I remember same problem at Daily Motion. When trying to switch tab nothing happens till I stop video or close the tab.

    Read the article

  • [as3] list cellRenderer

    - by lemon
    I'm quite new with as3 via cs4 so please bear with me. I'm trying to make a phone book type list that displays the users name, cellnumber and possible a delete button. --- Bob 09XXXXXXXXX delete --- Sussie 09XXXXXXXXX delete --- Johnny 09XXXXXXXXX delete --- I've tried making a list and added to it a XML dataprovider <profiles> <profile> <label>Bob</label> ... </profile> It'll then display a list of names Bob Sussie Johnny But what do I have to do in order to get it print like fig 1? I know that it has something to do with CellRender but I can't seem to find any decent examples in Google.

    Read the article

  • AS3 mouseX and mouseY values wrong in Firefox

    - by Gerard
    Hi there, I'm getting some strange behaviour in my Flash movie, only in Firefox for MAC (3.6.2). Basically, the mouseX and mouseY properties of all display objects become massive numbers: < 100000000. This issue only occurs on Firefox, it is not present when the movie is run standalone, nor when it is run on any other browser. The swf requires Flash Player 10, and is written in AS3. It is also embedded via SWFObject, but I tested using the export code supplied with Flash and verified the issue is still present. Has anybody heard of this? Is it a Flash or Firefox bug? Is it a bug at all? Thanks

    Read the article

  • as3 formatting a textfield

    - by duckofrubber
    Hi, I'm dynamically creating textfields in as3, and formatting them with the TextFormat class. I'm having some issues though with selecting the exact "style" of font to apply to the textfields. My code so far looks like: formatT = new TextFormat( ); formatT.bold = false; formatT.color = 0x000000; formatT.font = "TradeGothic"; formatT.size = 16; var textItem = new TextField(); textItem.text = "foobar"; textItem.setTextFormat(formatT); addChild(textItem); This works ("Trade Gothic" is applied to the enclosed text), however I can't figure out how to apply a specific style of "Trade Gothic", for instance "Light Oblique". Is there some way that I can specify this using the TextFormat class? Thanks.

    Read the article

  • AS3 Memory management when instantiating extended classes

    - by araid
    I'm developing an AS3 application which has some memory leaks I can't find, so I'd like to ask some newbie questions about memory management. Imagine I have a class named BaseClass, and some classes that extend this one, such as ClassA, ClassB, etc. I declare a variable: myBaseClass:BaseClass = new ClassA(); After a while, I use it to instantiate a new object: myBaseClass = new ClassB(); some time after myBaseClass = new ClassC(); and the same thing keeps happening every x millis, triggered by a timer. Is there any memory problem here? Are the unused instances correctly deleted by the garbage collector? Thanks!

    Read the article

  • AS3: Synchronize Timer event to actual time?

    - by Nebs
    I plan to use a timer event to fire every second (for a clock application). I may be wrong, but I assume that there will probably be a (very slight) sync issue with the actual system time. For example the timer event might fire when the actual system time milliseconds are at 500 instead of 0 (meaning the seconds will be partially 'out of phase' if you will). Is there a way to either synchronize the timer event to the real time or get some kind of system time event to fire when an second ticks in AS3? Also if I set a Timer to fire every 1000 milliseconds, is that guaranteed or can there be some offset based on the application load? These are probably negligible issues but I'm just curious. Thanks.

    Read the article

  • AS3 microphone recording/saving works, in-flash PCM playback double speed

    - by Lowgain
    I have a working mic recording script in AS3 which I have been able to successfully use to save .wav files to a server through AMF. These files playback fine in any audio player with no weird effects. For reference, here is what I am doing to capture the mic's ByteArray: (within a class called AudioRecorder) public function startRecording():void { _rawData = new ByteArray(); _microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, _samplesCaptured, false, 0, true); } private function _samplesCaptured(e:SampleDataEvent):void { _rawData.writeBytes(e.data); } This works with no problems. After the recording is complete I can take the _rawData variable and run it through a WavWriter class, etc. However, if I run this same ByteArray as a sound using the following code which I adapted from the adobe cookbook: (within a class called WavPlayer) public function playSound(data:ByteArray):void { _wavData = data; _wavData.position = 0; _sound.addEventListener(SampleDataEvent.SAMPLE_DATA, _playSoundHandler); _channel = _sound.play(); _channel.addEventListener(Event.SOUND_COMPLETE, _onPlaybackComplete, false, 0, true); } private function _playSoundHandler(e:SampleDataEvent):void { if(_wavData.bytesAvailable <= 0) return; for(var i:int = 0; i < 8192; i++) { var sample:Number = 0; if(_wavData.bytesAvailable > 0) sample = _wavData.readFloat(); e.data.writeFloat(sample); } } The audio file plays at double speed! I checked recording bitrates and such and am pretty sure those are all correct, and I tried changing the buffer size and whatever other numbers I could think of. Could it be a mono vs stereo thing? Hope I was clear enough here, thanks!

    Read the article

  • AS3 - Can't access properties or methods of a MC child that has been added in script

    - by Chris
    Hi All - I am still a bit of a beginner at AS3, so bear with me, please. I have created a loop to instantiate tiles on a board. In the following example, "Gametiles" is an array containing objects of class "Tile" which is a class that extends MovieClip. "Game" is a MC that I added to the stage in the flash developing environment. for(var i:uint=0;i < Gametiles.length;i++){ var pulledTile = Gametiles[i]; var tilename:String = "I_Tile_" + pulledTile.grid_y + "_" + pulledTile.grid_x; var createdTile = new InteractiveTile(); pulledTile.addAnims(createdTile); Game.addChildAt(pulledTile, 0); Game.getChildAt(0).name = tilename; } The above code works - but with a tricky problem. If I did something like the following: trace(Game.I_Tile_1_3.x); I get "TypeError: Error #1010: A term is undefined and has no properties." However, I am able to access theses children in the following manner: var testing = Game.getChildByName("I_Tile_1_3") trace(testing.x); This method is a bit cumbersome though. I really don't want to have to create a var and call getChildByName every time I want to interact with these properties or methods. How can I set up these children so that I can access them directly without the extra steps?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >