flash-cs4

How to resize dynamically loaded image into flash (as3)

妖精的绣舞 提交于 2019-12-03 21:10:13
问题 Am struggling to find the right as3 code to resize an image once it is dynamically called into the stage and placed in a MC. I am loading using: var myLoader :Loader = new Loader(); mc.addChild(myLoader); var url :URLRequest = new URLRequest("myimage.jpg"); myLoader .load(url ); The stage will eventually open up into fullscreen (works ok) so I need to keep the image in its original size which is much bigger than the stage. What I need to do is shrink it on loading to the same height as the

Is there an unofficial Flash .FLA spec?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 08:29:36
Is there an unofficial spec anywhere that explains how to reverse engineer a Flash .FLA file? I'm specifically interested in creating an application that can "auto-scene plan" a Flash document programmatically, pulling in content from other files, arranging that content into layers, without needing the Flash IDE open. Animators would then be able to take these pre-assembled FLA's and begin animating them. I've already built a JSFL script that does this, but it runs very slowly, is difficult to debug or re-purpose. scope_creep I've spent days looking around the internet, to see if there is

(ActionScript) Move objects in an array producing a stadium wave effect

为君一笑 提交于 2019-12-02 18:50:07
问题 I want to move all objects in an array producing a stadium wave effect, how do i do that? I want to move the objects based on their y-value on the stage... all my squares are of 50x50 in size. I want to move them up then move them down. Below is my code, please give me advice. Thanks! import fl.transitions.Tween; import fl.transitions.easing.*; import fl.transitions.TweenEvent; var t1:Timer = new Timer(100, 0); var index:int = 0; t1.addEventListener(TimerEvent.TIMER, ping); t1.start(); var

Movement of Objects in a simulation

Deadly 提交于 2019-12-02 09:44:38
i am currently making a flash "pond" with fishes in it, and i have the ability to add food pellets onto the pond, how should i make the movement of my fishes to the food x,y location ? so it will be smooth , rather than setting the x,y location of my fishes to the x,y location of the food pellets. Also is there a good place to learn how to make my fishes move by its own? similar to http://abowman.com/google-modules/fish/ Fish class package { import flash.display.MovieClip; import flash.display.Stage; import flash.events.Event; import flash.utils.Timer; import flash.events.TimerEvent; import

Unloading swf using the unloadAndStop() method, but video sounds remain audible

天涯浪子 提交于 2019-12-02 07:19:37
I have tried many approaches to unloading my swf, but to no avail, the video sounds within my laoded swf keep playing even once the swf has been loaded. I have created a universal loader as follows: var loader:Loader = new Loader(); I then load various swf's into a movie clip named mov_contentLoader , for example the video swf is loaded as follows: loader.load(new URLRequest("video.swf")); //assign SWF url to loader mov_contentLoader.addChild(loader); //add loaded content to movi clip I then have a generic "exit" button, based on the state of the application, certain windows are closed, swf's

Flash CS4 <b> tag in with htmlText

戏子无情 提交于 2019-12-02 00:52:15
问题 Wow, this one is really weird. I have the following setup: Two textfields on the stage with Arial normal and Arial bold, both embedded. I then have another textfield which I am setting like so: tb.htmlText = "Test <b>Test</b>"; For some reason, the bold text is not displaying as bold, but as regular weight. I have tried embedding the fonts in the library, using the [Embed] meta tag and even resorted to using CSS to force the fontFamily. Weirdly, I can use Font.enumurateFonts and see both

Dynamic Object Initiation As3

﹥>﹥吖頭↗ 提交于 2019-12-01 14:39:45
I notice in older version of flash you can create an instance of a dynamic class. I am creating a game that will have many different classes that can be displayed on the stage but can very from time to time. How would I go about calling them dynamically. for example var newObject = new ["DynamicObject"](); ?? Is this possible in As3 ?? I think there are 2 ways you can do that: 1.Using ApplicationDomain.getDefinition('DynamicTemplate') something like: var DynamicClass:Class = this.loaderInfo.applicationDomain.getDefinition('DynamicTemplate') as Class; addChild(new DynamicClass); You would need

Loading .bmp (Bitmap) and .tiff file in Flash 10 using a Loader

陌路散爱 提交于 2019-11-29 08:38:19
I am developing a Image uploader using Flash 10. I am using FileReference object to browse images and Loader to show the image: Sample code: var tempFileRef:FileReference = FileReference(ev.target); var oLoader:Loader = new Loader(); oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad); oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); oLoader.loadBytes(tempFileRef.data); It works fine with .jpg and .gif files but when I browse .bmp or .tiff file, I am getting the error: Error #2124: Loaded file is an unknown type. Is there a way to load and

Loading .bmp (Bitmap) and .tiff file in Flash 10 using a Loader

跟風遠走 提交于 2019-11-28 02:25:58
问题 I am developing a Image uploader using Flash 10. I am using FileReference object to browse images and Loader to show the image: Sample code: var tempFileRef:FileReference = FileReference(ev.target); var oLoader:Loader = new Loader(); oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad); oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); oLoader.loadBytes(tempFileRef.data); It works fine with .jpg and .gif files but when I browse .bmp or .tiff file

Flash CS4 refuses to let go

余生长醉 提交于 2019-11-27 09:54:56
I have a Flash project, and it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready - I thought it was time. The new Jenine was better in every way - she had lost some code bloat, she had decoupled herself from a few vestigial class relationships, and she had finally come home to the namespace that she had always secretly known in her heart was the one she truly belonged to. She was among her own kind. Unfortunately, Flash would have none of that. Perhaps it had