Search Results

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

Page 15/37 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Flex 3 - XML - '<' remplacing by '&lt'

    - by coulix
    Hello there, I moved from flash 9 to flash 10 with flex SDK 3.2 and some small oddities regarding encoding. When appending child nodes with appendchild call '<' is replaced by '&lt' and with > on save in the xml file. Any idea of what could be the cause ?

    Read the article

  • ArgumentError: Error #1063: Argument count mismatch on com.flashden::MenuItem(). Expected 1, got 0.

    - by Suzanne
    I keep getting the below error only in firefox ArgumentError: Error #1063: Argument count mismatch on com.flashden::MenuItem(). Expected 1, got 0. at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip() at com.flashden::Preview() Below is my menu script: package com.flashden { import flash.display.MovieClip; import flash.text.; import flash.events.MouseEvent; import flash.events.; import flash.net.URLRequest; import flash.display.Loader; public class MenuItem extends MovieClip { private var scope; public var closedX :Number public static const OPEN_MENU = "openMenu"; function callLink(event:MouseEvent):void { public function MenuItem(scope) { // set scope to talk back to -------------------------------// this.scope = scope; // disable all items not to be clickable -------------------// txt_label.mouseEnabled = false; menuItemShine.mouseEnabled = false; menuItemArrow.mouseEnabled = false; // make background clip the item to be clicked (button) ----// menuItemBG.buttonMode = true; // add click event listener to the header background -------// menuItemBG.addEventListener(MouseEvent.CLICK, clickHandler); } private function clickHandler (e:MouseEvent) { scope.openMenuItem(this); } public function loadContent (contentURL:String) { var loader:Loader = new Loader(); configureListeners(loader.contentLoaderInfo); var request:URLRequest = new URLRequest(contentURL); loader.load(request); // place x position of content at the bottom of the header so the top is not cut off ----// loader.x = 35; // we add the content at level 1, because the background clip is at level 0 ----// addChildAt(loader, 0); } private function configureListeners(dispatcher:IEventDispatcher):void { dispatcher.addEventListener(Event.COMPLETE, completeHandler); dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); dispatcher.addEventListener(Event.INIT, initHandler); dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); dispatcher.addEventListener(Event.OPEN, openHandler); dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler); dispatcher.addEventListener(Event.UNLOAD, unLoadHandler); } private function completeHandler(event:Event):void { //trace("completeHandler: " + event); // remove loader animation ----------------// removeChild(getChildByName("mc_preloader")); } private function httpStatusHandler(event:HTTPStatusEvent):void { // trace("httpStatusHandler: " + event); } private function initHandler(event:Event):void { //trace("initHandler: " + event); } private function ioErrorHandler(event:IOErrorEvent):void { //trace("ioErrorHandler: " + event); } private function openHandler(event:Event):void { //trace("openHandler: " + event); } private function progressHandler(event:ProgressEvent):void { //trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal); } private function unLoadHandler(event:Event):void { //trace("unLoadHandler: " + event); } } } Any idea why this is happening?

    Read the article

  • How to extract text using regex in Actionscript?

    - by Lost_in_code
    In the HTML below: <a href="link1.php">1</a><a href="link2.php">2</a><a href="link3.php">3</a> How do I extract link1.php,link2.php,link3.php and push them into an array using regex? (There could be N number of <a> tags in the text) [Edit] I'm aware the regex for this is something like href="([^"])*". But I'd like to know how to go about this in Actionscript. Specifically, how can they be pushed into an array in Actionscript?

    Read the article

  • How to create a persistent connection using AS3 Sockets for a chat client

    - by Vivek
    I want to create a chat client in flash/flex for a chat server,something like a MUD/MOO client but I'm unable to create a persistent connection . I've been using the AS3 Socket class,but I'm getting disconnected from the server side,soon after the connection is made but the client still shows the 'connected' property as true .The server is asynchronous and was written in python using asyncore/asynchat, it works fine with most open source MOO/MUD clients . I tried connecting my program to a simple synchronous echo server,here both read and write worked fine with no disconnections from either side . So my question is how do I make a persistent connection with the server?

    Read the article

  • OSMF - add an actionscript cuepoint to a video?

    - by redconservatory
    I'm trying to add a cuepoint to a video using OSMF. I built an OSMF video player, and I'd like to use this instead of the FLVPlayback component, which seems like the only way to add an actionscript cuepoint? Anyhow, I created a cuepoint by writing this: var cuePoint:CuePoint = new CuePoint(CuePointType.ACTIONSCRIPT, 1, "good point", null); videoElement.addEventListener(MediaElementEvent.METADATA_ADD, onMetadataAdd); trace(cuePoint.time); The cuepoint time traced out to "1" (successful). I then took this code from the documentation, thinking it would help trace the cuepoint when I published my movie (to test the video) private function onMetadataAdd(event:MediaElementEvent):void { if (event.namespaceURL == CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE) { var timelineMetadata:TimelineMetadata = videoElement.getMetadata(CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE) as TimelineMetadata; timelineMetadata.addEventListener(TimelineMetadataEvent.MARKER_TIME_REACHED, onCuePoint); } } private function onCuePoint(event:TimelineMetadataEvent):void { var cuePoint:CuePoint = event.marker as CuePoint; trace("Cue Point at " + cuePoint.time); } However, I don't get a trace message when the video hits 1 second. Can anyone help me?

    Read the article

  • Any advices for AS3 Open Source tools?

    - by Helio S. Junior
    Hello All, I am looking for open source tools to do Actionscript3 web development. (Web Sites) I know about the existence of tools such as Eclipse+plugins and Flash Develop for the coding but I am most concerned about the graphics part. Is there any tool out there to create SWFs with all the graphics for animate with AS3 later? And besides.... how to find out the positioning of all the graphics in the layout withou a tools like Flash IDE. Is there a similar replacement tool for that? Thanks in Advance, H

    Read the article

  • Prefered method for looping sound flash as3

    - by Brian Heylin
    Hi there, I'm having some issues with looping a sound in flash AS3, in that when I tell the sound to loop I get a slight delay at the end/beginning of the audio. The audio is clipped correctly and will play without a gap on garage band. I know that there are issues with sound in general in flash, bugs with encodings and the inaccuracies with the SOUND_COMPLETE event (And Adobe should be embarrassed with their handling of these issues) I have tried to use the built in loop argument in the play method on the Sound class and also react on the SOUND_COMPLETE event, but both cause a delay. But has anyone come up with a technique for looping a sound without any noticeable gap?

    Read the article

  • where should damage logic go Game Engine or Character Class

    - by numerical25
    I am making a game and I am trying to decide what is the best practice for exchanging damage between two objects on the screen. Should the damage be passed directly between the two objects or should it be pass through a central game engine that decides the damage and different criteria's such as hit or miss or amount dealt. So overall what is the best practice.

    Read the article

  • Properly trimming PCM data from a ByteArray

    - by Lowgain
    I have a situation where I need to trim a small amount of audio from the beginning of a recorded clip (generally somewhere between 110-150ms, it is an inconsistent amount). I'm recording in 44100 frequency and 16 bitrate. This is the code I'm using: public function get trimmedData():ByteArray { var ba:ByteArray = new ByteArray(); var bitPosition:uint = 44100 * 16 * (recordGap / 1000); bitPosition -= int(bitPosition % 16); //should keep snapped to nearest sample, I hope ba.writeBytes(_rawData, (bitPosition / 8)); return ba; } This seems to work time-wise, but all the recorded audio gets staticy and gross. Is something off about my rounding? This is the first time I've needed to alter raw PCM data so I'm not sure about the finer details of it. Thanks!

    Read the article

  • Loading external SWF's with Transparent Background

    - by alvincrespo
    Just to get some professional opinions, is it possible to load in an external SWF and set that SWF's background to transparent? This question has nothing to do with embedding the SWF in an HTML page. I already know that setting the WMODE to transparent will create a SWF with a transparent background in a browser.

    Read the article

  • How to open new explorer when clicking links in webpages loaded by app of Flex/Air?

    - by SpawnCxy
    In my application I tried using following codes to do this: <mx:HTML x="0" y="0" width="100%" height="100%" location=“http://www.example.com”/> The page is loaded fine.But when I click the links I found sometimes there was no any response while I need a new explore window opened with the linking url.And also I tried: <mx:Script> <![CDATA[ private function init():void { var req:URLRequest = new URLRequest("http://www.baidu.com"); var a:HTMLLoader = new HTMLLoader(); a.width = 400; a.height = 300; a.load(req); htmlmc.addChild(a); } ]]> </mx:Script> <mx:HTML x="10" y="10" width="345" height="258" id="htmlmc"/> But still got nothing.Any good ideas? Thanks in advance!

    Read the article

  • as 3 button error

    - by ryancherry
    Hello! I'm very new to actionscript 3.0 and flash in general. I'm trying to update a website that someone else did with flash, and am having issues with it. I need a button to link to an outside website, but I keep getting the error "access of undefined property" on my button. I am using cs3 by the way This is my code, any help would be much appreciated! msds_btn.addEventListener(MouseEvent.CLICK, buttonClickHandler); function buttonClickHandler(event:MouseEvent) :void { navigateToURL(new URLRequest("http://www.retrohair.com/msds_html/msds_login.html")); } Thanks!

    Read the article

  • Binding key/value pairs loaded from xml

    - by Hichem
    I want to load key/values configuration pairs stored in XML file. To bind a collection of data i know i need to use the ArrayList class, but the problem is that i want to be able to bind the loaded values using their corresponding keys and not by their indexes in the ArrayList object. For example i want to be able to do this : <mx:Text id="errorText" text="{Config.params['someKey']}" /> instead of : <mx:Text id="errorText" text="{Config.params[0]}" /> where Config.params is ArrayList (obviously i couldn't use ArrayList since it doesn't allow selecting a value by key) So the question is how to bind the key/value pairs loaded form XML. I don't want to go manually set variables, i want to bind them so when they are loaded the are set automatically. Did anyone had to do something like that ?

    Read the article

  • Replacing a colour/colours in a movieclip with different colours?

    - by Oli
    I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors. So far I have semi-sucessfully used this method: stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick. However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours :( I am sure there should be a better way to do this. Any ideas or answers would be greatly apreciated - Thanks.

    Read the article

  • Setting instance names on keyframes quickly in AS3

    - by Boon
    Right now in Flash CS3 and up (using Actionscript 3) if you have the same instance that is used in multiple keyframes in a layer, and you decide to assign or change the instance name later, you would have to go to each keyframe and set the instance name. This is a big nuisance. Is there a quicker or better way to do this? NOTE: In AS2, you can set the name by using name property of the MovieClip in your code in the onLoad handler of the MovieClip class so it's done once and for all. Unfortunately in AS3, you are not allowed to set the name property anymore.

    Read the article

  • Communicating to Parent SWF

    - by Glycerine
    Hey guys I'm having such a hard time of it today. I have a game, I've loaded into a parent SWF - I would like my parent SWF to accept events I dispatch from within the game, or have the ability to talk both ways. -- Reason is, I would like to unload and load the game back in, once the end screen is active. Any help and I'll give you beer. thanks in advance.

    Read the article

  • attaching id to a movieclip

    - by Ross
    I have a loop that creates mc from a database for (var i:Number = 0; i < t.length; i++) { var portfolioItem:PortfolioItem = new PortfolioItem(); addChild(portfolioItem); portfolioItem.name = t[i][0]; portfolioItem.addEventListener(MouseEvent.CLICK, getThisName); } public function getThisName(evt:Event) { trace(evt.target.name); } I try and assign t[i][0] which is the table id to the name attribute but I jsut get 'instance4' or instance 14. How can I give these dynamically create mc's a name or custom property? ideally I would like to use a custom property called portfolio.id but would use the name property or another default property if it works.

    Read the article

  • How to get visible size of DisplayObject with perspective projection

    - by Ain
    The following is entirely a math question. As we know, PerspectiveProjection delivers perspective transformations in 3D represented by the interdependent values of fieldOfView and focalLength according to the following formula: focalLength = stageWidth/2 * (cos(fieldOfView/2) / sin(fieldOfView/2) Bjørn Gunnar Staal has prepared a good image to illustrate the situation. Q: How to get the visible on-screen size of the DisplayObject (Cube on the above-linked image) to which PerspectiveProjection has been applied?

    Read the article

  • Parsing XML with nodes containing underscores.

    - by alvincrespo
    How do I parse an XML document that contains nodes where underscores exist? <some_xml> <child_node> <child width_info="" height_info="" /> </childnode> </some_xml> I tried this: for each (var item:XML in Environment._XMLData.some_xml.child_node.child){ trace(child.@width_info); } But that does'nt seem to work. I can't change the XML either because its from a third party. Any help would be great. Thanks in advance!

    Read the article

  • How to eat HTML tags?

    - by Lost_in_code
    Is there any function that converts <a href="test.php"/> to &lt; href=&quot;test.php&quot;/&gt; It would be helpful if all html characters were converted in the similar manner. Is there a function or library to do this?

    Read the article

  • AMF through a BinarySocket written in .net

    - by KensoDev
    Hi All, I have a windows service behaving as a Binary Socket sending data to flex applications. Once I try to send strings or int's or any other native data-type, everything is working great. I even succeeded in sending JSon from the server to the client parsing it on Flex. I want to send AMF objects to the client. Meaning, I have a class called User, I want to fill it with data and send it to the client, there I want it to be mapped to an object on the client. How can I achieve this?

    Read the article

  • I want to use the fleximage gem and s3 for storage, but don't want dev/qa/test env's to use s3

    - by Kevin Bedell
    I have a rails app that I'm going to host on engineyard and want to store image files on s3. But I don't know if I want all developer machines to beusing s3 for storage of all our test and dev images. Maybe it's not an issue -- but it seems like a waste to have everyone storing all our images in s3. I've heard of some ppl who store images on s3 'hacking' dev environments to store images locally on the file system -- and then using s3 in prod only. What are other people doing?

    Read the article

  • Which flash server i should use for flash chat with a lot of instant users?

    - by Almas Adilbek
    I'm currently developing flash chat for social networking websites like facebook. Actually i want to develope flash chat in this game. Chat would have a lot of instant active users. So that, i need to know which flash servers i should use, is there any free ones that are pretty good for such high performance needs? I've found ElectroServer4 Professional. Is it enough for my task? Thank you

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >