flash

embedding sources dynamically

喜欢而已 提交于 2019-12-25 03:38:13
问题 is it possible to embed sources dynamically. instead of doing this [Embed(source = '../../../../assets/levels/test.xml')] I could probably do something like this var src = '../../../../assets/levels/test.xml' [Embed(source = src )] 回答1: It's not possible for anything within metadata annotations to be dynamic :/. That is, you can't place variables into metadata annotations. If that was possible, there would be SO many cool possibilities. So your first option is the only way to directly embed

IIS7.5 not displaying Flash object

夙愿已清 提交于 2019-12-25 03:37:11
问题 I'm writing a MVC web app in ASP.NET MVC, which is supposed to be serving up a Flash object written by one of my colleagues. I don't know any Flash; he doesn't know any C#/ASP.NET; hence the question goes to SO! The code on my web page looks like this: <head> (blah blah blah...) <script type="text/javascript" src="/FlashStuff/js/swfobject.js"></script> <script type="text/javascript"> var GP_MLM_flashvars = {}; GP_MLM_flashvars.remote = 'true'; GP_MLM_flashvars.streamprovider = 'localweb'; GP

Rewrite (or hijack) an absolute URL request made from a flash (swf) file in a browser

喜夏-厌秋 提交于 2019-12-25 03:34:15
问题 Is there a way to rewrite (or hijack) an absolute URL request made from a flash (swf) file in a browser? Eg I have a flash application that is requesting http://example.com/myImage.png The code in the flash application cannot be changed but I want to be able to either use another flash or some javascript to write that URL as the image is beging requested - to something like example.com/myImage.png?u=123456 回答1: You could have a chance of doing it your are talking about an AS2 swf. The AVM1 is

actionscript Storing a value after a button is clicked

ⅰ亾dé卋堺 提交于 2019-12-25 03:32:38
问题 I don't program a lot. Sometimes I program a bit of Actionscript 3. Now I wanted to create an flash enviroment where people can click on buttons and play a video. I think I almost figured it out with the following script: public class main extends MovieClip { private var drukknop1:knopje; private var drukknop2:knopje; private var drukknop3:knopje; private var drukknop4:knopje; private var drukknop5:knopje; private var drukknop6:knopje; private var drukknop7:knopje; private var drukknop8

How do you scale a dynamic textfield in flash from the center point using as3?

纵饮孤独 提交于 2019-12-25 03:26:53
问题 I'm trying to make a text effect where on every frame the textfield increases in size and decreases in opacity. I'm using the scaleX and scaleY properties of my dynamic textfield to enlarge, but it's doing so keeping the left registration point fixed. I want to make it scale up radially outward, or with the center point fixed. Can anyone tell me how to do this? 回答1: You can easily create a wrapper for the TextField (i.e. a Sprite containing the TextField ) to enforce the registration point to

Passing params to an external swf via loader

放肆的年华 提交于 2019-12-25 03:12:26
问题 I have a map of the US acquired from here (called U.S. Map). I am currently generating XML from inside an ActionScript file, and would then like to display this map using my generated XML as the argument. According to this, to do this in html would require the following declaration: world.swf?data_file=pathname/filename.xml How can I replicate this behavior using the Loader from ActionScript? Right now I have: var ldr:Loader = new Loader(); var url:String = "us/us.swf?data_file=senate.xml";

XMLSocket working in firefox but not IE

淺唱寂寞╮ 提交于 2019-12-25 03:12:17
问题 I'm helping a customer who has a problem with a flash app. The flash app uses an XMLSocket to connect to a service running on localhost. It works fine under firefox. It uses the following line to setup the security policy: System.security.loadPolicyFile("xmlsocket://localhost:10032"); Running the flash app under firefox, the service listening on port 10032 gets a connection with a <policy-file-request/>, responds to it, and it works well. Under IE, the service never gets the connection and

2D Platform Game using hitTestPoint:glitches

半腔热情 提交于 2019-12-25 03:10:23
问题 So I created my own code for a 2d platform game (like Mario). I decided to use the hitTestPoint method to handle my collisions. It worked smooth as butter, and everything was working perfectly. The character could move up and down ramps perfectly. My next step in creating my game would be to change my character (which was a block at the time) into a human character that can go to frames labeled "walk", "jump" and "stand". After creating variables for the two character states "run" and "stand"

Error Referencing Externally loaded SWF

家住魔仙堡 提交于 2019-12-25 03:08:42
问题 I'm loading an swf say "test.swf" which gets loaded in imageLoader , so I can get its content by : imageLoader.content So if I wanted one of the movieClips inside it I would do this : imageLoader.content.testMovie.transform.colorTransform = someTransformation; But when I do this, since the movie is not loaded the file is not compiled and gives me an error your referring to something that is not there. How else am I supposed to reference a content that will be loaded later? 回答1: Wait till it

Using “Import” AS3

ε祈祈猫儿з 提交于 2019-12-25 03:08:29
问题 I´d like to know. What exactly does 'import'? I´m thinking about to use a flash component with this 'import': //import the required data class import fl.data.DataProvider; //import the AutoComplete class import com.yahoo.astra.fl.controls.AutoComplete; I mean, I don´t have those folders in my app main folder. Is it importing from web? If yes, is it safe? If server is shut down, will the app, that uses those classes, crash? Thanks. 回答1: With the import statement you can include certain