actionscript

Endless repeating scrolling background

徘徊边缘 提交于 2019-12-02 10:48:07
I got a problem with AS3 and AIR. I'm working on a side-scrolling game for smartphones with a plane and I use different backgrounds as layers. Before all other: I use GPU and only bitmaps, quality is set to low. So Performance settings are all set for smartphone use. I putted them into a rectangle using the drawing API and move the background with a matrix: protected var scrollingBitmap:BitmapData; protected var canvas:Graphics; protected var matrix:Matrix; public function move(dx:Number, dy:Number):void { matrix.translate(dx, dy); if(dx != 0) matrix.tx %= scrollingBitmap.width; if(dy != 0)

Javascript to Flash communication doesn't work

北城以北 提交于 2019-12-02 10:10:10
I'm trying to control a flash player from javascript, i did as i saw on the internet and i get an "not supported" error here what i've wrote: on js: function getFlashMovieObject(movieName) { if (window.document[movieName]) { return window.document[movieName]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(movieName); } } function SetNum1() { var x=getFlashMovieObject("flashmovie"); x.Setvariable(

Beginner Actionscript reference

匆匆过客 提交于 2019-12-02 10:07:59
My eight years old son asks to "teach him programming in Flash". Can somebody refer on good Actionscript learning resource online? The Flash version we have is "Flash MX". Thank you in advance. see if this fits your bill: http://www.scribd.com/doc/9409007/ADOBE-FLASH-ACTIONSCRIPT-BOOK www.flashkit.com www.karupa.com You should also check out some stuff from top AS developers ( Brimelow , Skinner , Moock ), although, nowadays much of the material will be focused on AS3 (Flash 9/10). You might also want to upgrade to Flash MX2004, since that is when AS2 was introduced. It's a much nicer version

Collision Detection in Flash Functionalities? (hitTestObject)

折月煮酒 提交于 2019-12-02 09:58:22
Hello, so I've been recently using hitTestObject to detect collisions in an android app I'm making. After testing for a bit, I realized that the game was detecting "fake" collisions. What I mean by this is that it was detecting a collisions not when the pixels of an object(s) are touching, but (after doing a bit of research) I found out that the boxes of the objects where colliding. So I had the game stop with a collision, and this is how it looks like: I tried outlining the two object's boxes, for clarity. As you can see their boxes are touching. Is there any way to have it detect when pixels

Hiding nodes in a flex tree component keeping the children visible

流过昼夜 提交于 2019-12-02 09:50:13
I have a tree with a dataprovider which takes the following form: <details name="Cars"> <contact_person>aaaa</contact_person> <list> <car type="A"> <car name="A1"/> <car name="A2"/> </car> <car type="B"> <car name="B1"/> <car name="B2"/> </car> </list> </details> I want the tree to be shown like this Cars A A1 A2 B B1 B2 That is I want to hide the contact_person and list nodes.Deleting the nodes from the dataprovider cannot be done.So what i did was to create a custom tree data descriptor by extending DefaultDataDescriptor.Then override the getChildren method and applied a filterfunction to

Flash to take the view to fullscreen

亡梦爱人 提交于 2019-12-02 09:03:13
问题 I need a link to invoke a flash movie (with javascript) that takes the view to full screen, and show the page content. Exactly as if the user has pressed F11. Is there such flash movie? Edit This is different from what the flash player does on Youtube and other video sites in that the flash movie has no content to show and after the page goes fullscreen I want the normal page content to be displayed. The only role of the flash object would be invoking the fullscreen mode. 回答1: JavaScript (and

Open PDF or Folder

徘徊边缘 提交于 2019-12-02 08:21:20
I try to open PDFs or folders (in finder/explorer) triggered by a mouse click in a swf application running in flash player. Opening a PDF via urlRequest and navigateToUrl() always opens the browser. I read about this solution with fscommand and it seems that we have to write shell scripts for mac and PC. Doesn't sound perfect. The swf is executed on cd ROM. So I think we can't use an air application and the classes of the air framework (File... etc.). Is there a better way? As far as I know, you unfortunately cannot open a PDF into flash natively. It sounds like these *PDF*s are static assets

ActionScript 3 SharedObjects don't persist across different swfs?

淺唱寂寞╮ 提交于 2019-12-02 08:18:53
I am serving two different swfs that read and write to the same SharedObject variable. The SharedObject variable is a number, and each swf checks that number to make sure it isn't using the same number twice. It then stores the last number it selects. In this way both swfs should never use the same number twice, no matter which order they're loaded. If I repeatedly load one of the swfs, the never-twice rotation works. However, when switching back and forth between swfs, sometimes the number is repeated. SharedObjects are supposed to be global to the Flash Player, so why would this happen?

Actionscript 3 saving currentframe location to local hard drive?

六月ゝ 毕业季﹏ 提交于 2019-12-02 07:47:24
I asked similar question sometime ago, but I am making new one to be much more specific with my question with some example! I´ve found this code snippet/tutorial from googling, but I cant seem to figure out how to modify it for my needs: // open a local shared object called "myStuff", if there is no such object - create a new one var savedstuff:SharedObject = SharedObject.getLocal("myStuff"); // manage buttons btnSave.addEventListener(MouseEvent.CLICK, SaveData); btnLoad.addEventListener(MouseEvent.CLICK, LoadData); function SaveData(MouseEvent){ savedstuff.data.username = nameField.text //

use flash action script to develop online games

孤街浪徒 提交于 2019-12-02 07:26:59
For short: can you tell me some great resource to study if I want to develop online games using flash technology? Including 3D games. George Profenza You can start with the newly released Flash Platform Game Technology Center on Adobe Devnet. There are quite a few books out there on as3 games, I'll try not to repeat the ones already mentioned: The Essential Guide to Flash Games: Building Interactive Entertainment with ActionScript (source: friendsofed.com ) This is a great book, tons of great examples, industry tips. This is pretty complete, as it starts with the basics and ends with promoting