Search Results

Search found 6496 results on 260 pages for 'neon flash'.

Page 121/260 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • How to get associated URLRequest from Event.COMPLETE fired by URLLoader

    - by matt lohkamp
    So let's say we want to load some XML - var xmlURL:String = 'content.xml'; var xmlURLRequest:URLRequest = new URLRequest(xmlURL); var xmlURLLoader:URLLoader = new URLLoader(xmlURLRequest); xmlURLLoader.addEventListener(Event.COMPLETE, function(e:Event):void{ trace('loaded',xmlURL); trace(XML(e.target.data)); }); If we need to know the source URL for that particular XML doc, we've got that variable to tell us, right? Now let's imagine that the xmlURL variable isn't around to help us - maybe we want to load 3 XML docs, named in sequence, and we want to use throwaway variables inside of a for-loop: for(var i:uint = 3; i > 0; i--){ var xmlURLLoader:URLLoader = new URLLoader(new URLRequest('content'+i+'.xml')); xmlURLLoader.addEventListener(Event.COMPLETE, function(e:Event):void{ trace(e.target.src); // I wish this worked... trace(XML(e.target.data)); }); } Suddenly it's not so easy, right? I hate that you can't just say e.target.src or whatever - is there a good way to associate URLLoaders with the URL they loaded data from? Am I missing something? It feels unintuitive to me.

    Read the article

  • In ActionScript, Is there a way to check if an input argument is a valid Vector of any type?

    - by ty
    In the following code: var a:Vector.<int> ... var b:Vector.<String> ... var c:Vector.<uint> ... var c:Vector.<MyOwnClass> ... function verifyArrayLike(arr:*):Boolean { return (arr is Array || arr is Vector) } verifyArrayLike(a); verifyArrayLike(b); ... What I'm looking for is something like _var is Vector.<*> But Vector.<*> is not a valid expression, even Vector. can not be placed at the right side of operators. Is there a way to check if an input argument is a valid Vector of any type?

    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

  • Loop through children and display each, as3

    - by VideoDnd
    How do I loop through all of my children, and display each? I would like to know the best way to do this. my children and containerfive children, one plays every sec, 1,2,3, etc. var square1:Square1 = new Square1; var square2:Square2 = new Square2; var square3:Square3 = new Square3; var square4:Square4 = new Square4; var square5:Square5 = new Square5; var container:Sprite = new Sprite; addChild(container); container.addChild(square1) container.addChild(square2) container.addChild(square3) container.addChild(square4) container.addChild(square5) my timer var timly:Timer = new Timer(1000, 5); timly.start(); timly.addEventListener(TimerEvent.TIMER, onLoop); Note: Tried for loop, numChildren -1, and visibility ERROR 'access of undefined property' //Thomas's idea var timly:Timer = new Timer(1000, 10); timly.start(); timly.addEventListener(TimerEvent.TIMER, onLoop, false, 0, true); // var square1:Square1 = new Square1; square1.visible = false container.addChild(square2) var square2:Square2 = new Square2; square2.visible = false container.addChild(square3) var square3:Square3 = new Square3; square3.visible = false container.addChild(square3) var square4:Square4 = new Square4; square4.visible = false container.addChild(square4) var square5:Square5 = new Square5; square5.visible = false container.addChild(square5) var container:Sprite = new Sprite; this.addChild(container); var curCount:Number = 100; // function collectChildren(container:DisplayObjectContainer):Array { var len:int = container.numChildren; var mySquaresArray:Array = []; for (var i:int = 0; i < len; i++) { mySquaresArray.push(container.getChildAt(i).name); } return mySquaresArray; } // function onLoop( e:Event ) { curCount = e.target.currentCount; if( curCount > 1 ) { var previous_square = curCount -2; mySquaresArray[previous_square].visible = false; } var current_square = curCount - 1; mySquaresArray[current_square].visible = true; }

    Read the article

  • Assigned numbers to movie clip to plug in formula... not working

    - by Matthew MlgPro Harding
    So I am attempting to vertically evenly space these movie clips so I came up with a math formula involving n( the button number) but Its not working. var buttonArray:Array = [ side_banner.btn1, side_banner.btn2, side_banner.btn3, side_banner.btn4]; var buttonCount:uint = buttonArray.length; for (var i:uint=0; i< buttonCount; i++) { buttonArray[i].addEventListener(MouseEvent.CLICK, outputNumber); buttonArray[i].theTrigger = [i + 1]; } function outputNumber(e:MouseEvent):void { trace( e.target.theTrigger); buttonArray[i].y = (((stage.stageHeight - 400)/4)*(e.target.theTrigger)) - ((stage.stageHeight - 400)/4)/2 } But apparently each movie clip doesn't actually have a numerical value just a numeric name... how can I get the "n" btn number to use my formula? Thanks

    Read the article

  • Electroserver to Smartfox migration help

    - by Garrt
    I've got several demonstration programs that use Electroserver, but I'd also want to test the same code using Smartfox. What is the most straightforward method to do this kind of migration? I know the types of classes that need to be changed, but since the terminology is slightly different in both libraries, it's difficult to make a smooth transition. Fortunately, the programs are simple and I can probably do a bit of trial and error in replacing each missing class, but is there a better solution? Thanks.

    Read the article

  • mp3 playback stop echoing, as3

    - by pixelGreaser
    Hitting play more than once, causes an echo and I can't stop my mp3 player. What's the best practice for mp3 playback? var mySound:Sound = new Sound(); playButton.addEventListener (MouseEvent.CLICK, myPlayButtonHandler); var myChannel:SoundChannel = new SoundChannel(); function myPlayButtonHandler (e:MouseEvent):void { myChannel = mySound.play(); } stopButton.addEventListener(MouseEvent.CLICK, onClickStop); function onClickStop(e:MouseEvent):void{ myChannel.stop(); }

    Read the article

  • Hidden youtube player loses its methods

    - by zaius
    I'm controlling a embedded youtube chromeless player with javascript, and I want to hide it occasionally by setting display: none. However, when I show the player again, it loses its youtube methods. For example: <script> swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=player", "player", "425", "356", "8", null, null, {allowScriptAccess: "always"}, {id: 'player'} ); var player = null; function onYouTubePlayerReady(playerId) { player = document.getElementById(playerId); player.addEventListener('onStateChange', 'playerStateChanged'); } function hidePlayer() { player.pauseVideo(); player.style.display = 'none'; } function showPlayer() { player.style.display = 'block'; player.playVideo(); } </script> <a href="#" onClick="hidePlayer();">hide</a> <a href="#" onClick="showPlayer();">show</a> <div id="player"></div> Calling hidePlayer followed by showPlayer gives this error on the playVideo call: Uncaught TypeError: Object #<an HTMLObjectElement> has no method 'playVideo' The only solution I can find is to use visibility: hidden, but that is messing with my page layout. Any other solutions out there?

    Read the article

  • AS3 and the loader class

    - by Acti67
    Hi, I write here, because after looking for a solution, I could not resolve my error... var test:MovieClip; var sign:Loader = new Loader(); sign.contentLoaderInfo.addEventListener(Event.COMPLETE, completSIGN); sign.load(new URLRequest("http://files.zebest-3000.com/278374/3011/3011.swf")); function completSIGN(e:Event):void { test = MovieClip(e.target.content); addChild(test); } This is the error: TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul. at Main::StateManager() So, the movie (some videos work perfectly and others not) does not want to load in my container ; it seems there is a problem in the mapping... and can't modify the distant movie. Is there an other method of loading a movie inside one other (I have try also to load with bytearray, but it's the same)? Can we catch this error and relocate the instance to help him to find the correct way?

    Read the article

  • How can I get FlashVars values in ActionScript 2.0?

    - by AndreMiranda
    Hi! I have to dynamically send a flashvars value from <object>/<embed>, for example "<object name="flashvars" value="test=myxml.xml"> to my swf file. And in my AS, I have this: var xmlPath:String = _level0.test; doc.load(xmlPath); So, this way I want to read several xml files (at least it's my intention!). But nothing of what I do works... I also tried doc.load(_root.test) but it didnt work too. If I do: doc.load("someXML.xml") It works just fine!! I'm trying to solve this for many many hours and still didn't find any solution!! Thanks in advance!!!

    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

  • pass ...rest to a NetConnection call

    - by dome
    I want to pass a rest in a netconnection call, something like this: public function requestData(service : String, ...params) : void { nc.call(service, params); } this doesn't work since the call is expecting each parameter to be separated by commas, like: nc.call(service, params[0], params[1], params[2]); I've read some posts about apply, but I can't find a solution for this specific case.

    Read the article

  • Flex DataBinding Drilling Down Through Arrays

    - by Joshua
    The help page on the BindUtils.bindProperty function: http://livedocs.adobe.com/flex/3/langref/mx/binding/utils/BindingUtils.html Has this to say: "For example, to bind the property host.a.b.c, call the method as: bindProperty(host, ["a","b","c"], ...)." But what if I need to bind to host.a.b[2].c? How do I do that?

    Read the article

  • Caurina Tweener and Alpha

    - by Jk_
    Hi guys, Usually I work with TweenLite but I had to modify the code of someone else who worked with Caurina Tweener. I have a basic problem with it! On my scene, I have a simple movie clip filled with black. Into this movieclip a bitmap file (jpg). When I make a tween on the alpha of my mc, it seems that there is a delay (in the alpha) between this the black background and the image. Tweener.addTween(thisMc, { _autoAlpha:0, time:1 } ); I'm sure there is an easy way to avoid this problem but I can't find it out! Cheers, Jk_

    Read the article

  • Can I embed video on external sites while still using tokens to protect the content?

    - by JKS
    On our own website, it's easy to protect against direct links to our video content by grabbing a token through AJAX and verifying the token through PHP before the file download is started. However I'm also researching how I could provide an embed feature, like YouTube or vimeo etc., without compromising this security feature. The problem is that the embed code I want to provide should look something like <object>...<embed>...</embed></object> -- but I don't know how to grab and append the token to the filename. I mean, I guess I could attach a script that did some gnarly JNOP business, but that's too dirty. I'm using JW Player for the actual video container. Huge thanks to anyone who can help...

    Read the article

  • Browser Side Photo Editing Library

    - by echox
    Hi! Currently I'm searching for a free solution to simple edit some photos at the users browser. Resizing and Cropping would be mandatory. I'm not searching for an online service (for example SUMO or PIXLR which are great), because I want to include the software into a WYSIWYG Editor. JavaScript would be really nice, but it would have to work in IE 8. Pixastic is a great example, but works only in modern browsers (not IE 8 :-/) Any suggestions what I could use? Maybe setting up some kind of image processing service with ImageMagick and communicating with it through AJAX could also be an solution? Has anyone gained some experience with such a solution?

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >