flash

Flash XML config file problems with asp.net MVC

不问归期 提交于 2019-12-24 07:30:09
问题 I'm creating an asp.net MVC app, first time I've done this. I have a flash component I need to use in a view. I have included the SWF files etc in the Contents folder and referenced it from my view, the flash file loads when you get to the view, great. The problem occurs because the flash file references and XML file for its configuration data, and I'm getting an error accessing that XML file. I'm guessing this is because flash is looking for a relative path and is using the URL for the page,

Flex: Modify an embedded icon and use it in a button?

半城伤御伤魂 提交于 2019-12-24 07:07:09
问题 Just that, if you embed an icon: [Embed(source='icons/checkmark.png')] private static var CheckMark:Class; You end up with a dynamic class. You can pretty easily assign the icon to a button at runtime by calling the setStyle method: var btn:Button = new Button(); btn.setStyle("icon", CheckMark); But what if you wanted to alter the icon at runtime, like changing it's alpha value or even redrawing pixels, before assigning it to the button? So far I can't find a satisfactory answer... 回答1: This

Link button in action script3 + fade out in jQuery integration

﹥>﹥吖頭↗ 提交于 2019-12-24 06:58:37
问题 I need help. I'm a graphic designer and i new to jQuery. In AS3 i find nice jQuery script - if you click to link the website its fade out and new site fade in. I use custom.js in html5 page $(document).ready(function() { $("body").css("display", "none"); $("body").fadeIn(2000); $("a").click(function(event){ event.preventDefault(); linkLocation = this.href; $("body").delay(2000).fadeOut(2000, redirectPage); }); function redirectPage() { if (location.href.indexOf('reload')==-1) location.replace

Actionscript if / else syntax Question

↘锁芯ラ 提交于 2019-12-24 06:49:37
问题 Which of the following best translates the English statement "If it's rainy, we will watch a movie. Otherwise we will go to the park." a. if (rainy = true) { gotoAndStop ("movie"); } b. if (rainy == true) { gotoAndStop ("movie"); } c. if (rainy = true) { gotoAndStop ("movie"); } else { gotoAndStop ("park"); } d. if (rainy == true) { gotoAndStop ("movie"); } else { gotoAndStop ("park"); } My answer would be "d" - is that correct? 回答1: Yes, 'd' is the correct answer. The difference between =

Error in Flash addition

谁说胖子不能爱 提交于 2019-12-24 06:45:04
问题 Make a new AS3 Document in Flash, paste in the following code and run it: var a:Number=0; trace(a) // 0 a+=0.3; trace(a) // 0.3 a+=0.3; trace(a) // 0.6 a+=0.3; trace(a) // 0.8999999999999999 a+=0.3; trace(a) // 1.2 a+=0.3; trace(a) // 1.5 a+=0.3; trace(a) // 1.8 a+=0.3; trace(a) // 2.1 a+=0.3; // ^ This is the output. Notice the inaccuracy starting from 0.9 / 0.89 Why the error? I'm just doing an ordinary hi resolution addition. Any workarounds? 回答1: This is a standard floating point problem.

AS3 RegEx returns null

≯℡__Kan透↙ 提交于 2019-12-24 06:43:46
问题 Can anyone explain why the code below traces null when on the timeline? var cleanRegExp:RegExp = /^[a-zA-Z0-9]+(\b|\/)/; var str:String = "/num83r5/and/letters/4/A/"; trace(str.match(cleanRegExp.toString())); I've read the documentation, so I'm pretty sure that I'm declaring the RegEx correctly and that String.match() should only return null when no pattern is passed in, otherwise it should be an array with 0+ elements. I suspected a badly written expression, but surely that should still

Change style of tabs in Flex 3

为君一笑 提交于 2019-12-24 06:42:32
问题 I am new to Flex 3.4. I want to change style of few tabs (highlight them) on click of a button. I came from a javascript background and not able interpret in Flex's way. 回答1: Styling tabs in Flex is sort of tricky - the TabBar and TabNavigator classes have a style called tabStyleName , which is the name of another separate style that defines the look of your tabs. Here's an example which changes a set of tabs from a red background to blue by changing the tabStyleName style on the TabBar -

AS2: Calculate days between two dates

余生颓废 提交于 2019-12-24 06:35:33
问题 I use this script currently to determine the difference between two dates: // Slide_Tracker[?].date_int are results from the built in function getTime() var current_date = new Date(Slide_Tracker[i].date_int); var past_date:Date = new Date(Slide_Tracker[i - 1].date_int); var date_diff:Number = Math.round((current_date - past_date) / 86400000); The problem with this is I want to monitor the actual physical day change so if someone accessed the application at 11:59 PM and then came back 5

reload embedded swf in html page in IE

做~自己de王妃 提交于 2019-12-24 06:34:14
问题 I have a swf file embedded in a html page. I want to reload the swf file without refreshing the page. There is a same problem asked here: reload/ reset embedded swf on click And I tried the accepted answer and it works in chrome: var obj = $("object#flash_99674493"); obj.html(obj.html()); But it seems it doesn't work in IE. How to make it work in IE? 回答1: If your .swf is embedded with <object> , use data property: document.getElementById('flash_99674493').data += ''; For ones embedded with

flash file not displaying on the screen?

狂风中的少年 提交于 2019-12-24 04:54:09
问题 I am using webview control for displaying a flash .swf file in my application. when i run the app screen displaying whole white scrren. Here it is my code, public class flash extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); setContentView(R.layout.main); String url