ActionScript 2.0 :: Local Test - IE Versus Firefox
Mar 17, 2005
Although I will mention Dreamweaver it is still a flash question. When I test locally through dreamweaver in Internet explorer the address bar says "D:My Docsetc." when I test in firefox it says "file:///". Now I know how to say if it is local with the "file:///" but not with the direct path. How do I reference this in Actionscript?
Here is my code:
Code:
var setURL = new Array("http://local", "http://127.0.0.1", "http://localhost", "file:///");
How do I make the direct path in IE apart of the array? I tried "D:" it did not work.
So I wrote a CS4 Illustrator plugin that loads a SWF as its user interface. Works great on the mac, but I am having a problem on Windows:The .swf needs to be compiled with the "-use-network=false" option set in order to access some files on the local machine. HOWEVER when that option is set, all of my "Externalinterface" calls break down. When "-use-network=false" is not set, then I can't access the local files, BUT my "externalinterface" calls (which communicate with the plug-in) work just fine. The SUPER frustrating part is that
A) it works fine on the mac, and
B) on window, I don't even need to set the "-use-network=false" option for the swf to access the files IF the .swf is loaded in explorer.I'm not sure if using AIR is possible, but I'm trying that next since AIR can access both local and network files without all the sand box hokey-pokey.Also CS5 is not an option for me for this project.
In Flash, if I Test Movie in normal mode (Ctr + Enter) I get no complaints about accessing URLs. The SWF's sandbox is "localTrusted". However when I debug Test Movie (Ctr + Shift + Enter), the sandbox is different. I then get complaints about accessing URLs; Security Sandbox Violation "...Untrusted local SWFs may not contact the Internet..." if localWithFile, and "...denied due to lack of policy file permissions..." if localWithNetwork.
Is this a "feature"? If so, I'd like to be able to turn it off. It would be nice if there was simply a warning, and not actual failure. To fix it, I could trust the file using global trust settings, but that seems silly just for debugging.
I've developed a Vkontakte application by using Adobe Flex technology with WCF as my server side. The whole thing works perfectly on localhost, but after uploading it to Vkontakte - the WS doesn't seem to work and I get this error[code]...
I have imported a flv to as "import video" and placed it on the stage. I have added other layers each on frame one. I want to drop stills out as others enter but I cannot run the video on the timeline to determine at what frame I want something to change. I could of course time it out at 15 fps but is there not a friendlier way to pick a point where one object exits and another enters? The video is a flvplayback instance. I have not made it a movieclip or named it.
works perfect on my macbook pro (safari, firefox, and opera) but when I view the site on Vmare Fusion Windows XP and use IE and FireFox the pages don't load... I don't know what to make of this. Has anyone hear or seen anything like this happen before? BTW the website was created in Adobe Flash CS4/ AS 3.0 and published using Flash Player 10.
I'm trying to test a custom Flex 4 skinnable component, using the FlexUnit UIImpersonator class. If I run my tests from a FlashBuilder Spark only project everything works fine. If I try to test from a project with the mx component set on the classpath I get a "getElementIndex not available in non Flex 4 projects" error.Can I unit test spark components in FlexUnits visual test environment while still having the mx component set on the classpath?
UIImpersonator delegates it's method calls to a "testEnvironment".The implementation used for this "testEnvironment" is decided by the VisualTest EnvironmentBuilder class and the FlexEnvironmentBuilder class. If the FlexEnvironmentBuilder class can find the "mx.core.Container" on the classpath it returns a MX environment, else a Spark environment. Only the spark environment has valid implementations for Flex 4 relevant method calls on the UIImpersonator - like the addElement method.
My buttons only work when I click on them on the stage while having the "enable simple buttons" option on. They do not work if I try to "test movie," "test scene" and publish it to a SWF. Nothing responds whenever I am in these modes. I am using Adobe Flash Professional CS5 Actionscript 2.0.
i have a movie that has worked fine in past during Html test but ive been doing some dubugging using the flash test latly and it runs fine here but when i go back and try to test in Html mode no errors come just the movie never fully starts (starts up about as much as if there was an error).
I have two scenes in my flash file and in scene 1, first button takes you to frame 2 where movie clip is -works
on (release) { gotoAndStop("scene1",2); } second button takes you to frame 3
but on scene 2 that performs same function as scene 1, the first button
on(press){ gotoAndStop("scene2",2); }
instead of going to frame 2 goes to frame 3. and the second button goes correctly to frame 3.that happens when i test scene! when i test movie all buttons work properly.
In FlexUnit 1 it is possible to access the name of the currently-running test using the TestCase.getName() method because all tests subclass TestCase. In FlexUnit 4, however, there's no base class for tests; the tests are identified by annotations. So, how can I replicate the getName() functionality in FlexUnit 4?
I'm developing a game add-on/plugin which replaces a built in feature of an online game. The game loads an .swf therefore, my solution also has to be an swf for it to work 'in-game'.
I would like to be able to have the user press a button in the custom .swf I am making - and this would open an external application (amongst other things). I.e. if there was a button that said Notepad, it would open Notepad.exe on the machine.
My initial thinking was that i could have a XML Socket server 'daemon' runnning (c#) , which i could connect to with flash - however, as both the swf and the daemon are local, flash complained and gave this error: "Error #2010: Local-with-filesystem SWF files are not permitted to use sockets."
The only way i know to fix this - is to change the security settings of flash - not very user friendly!
So! Any thoughts on how I could otherwise go about this? I was thinking a custom http server could do the trick (connected with URLRequest) although i'm not too sure.
i am having a problem launching a local html file from my swf. i have a button called print that when clicked it is supposed to open the local html file and print out the content. this is the code i used on the button
on (release){ getURL("folder/folder/file.htm","_self"); }
I have a SWF file located at the local network in the public shared folder that I do not control over trying to read the external file on the local network.
I am currently hitting instead an security violation
Error #2148: SWF file file://....mySWF.swf cannot access local resource file://...config.xml"
I've added the network path where SWF an XML file resides to "trusted locations" via Flash Player Global Settings.
The added network path is successfully displayed at the list of "trusted locations" within Global Settings Manager, but it does not look like Flash Player is able to really parse the local network path as a "trusted location"
I have a HTML box and load a local html file from the project. In this HTML file I use jquery and I want to load an image from my user directory. I see the image from my user directory but jquery doesn't works. I get this error:
[Code]...
But if I load an image from the app workspace, everything works fine (I see the image and Jquery works). Is this a policy problem? The error says that is a "null object reference" problem, but this can't be true...
I'm working on a Mac. Now I made a site and when I compare colors on pc I get a huge difference:s. My green grey looks like it's black. How do you manage to get the colors wright on both platforms? The calibration of my screen is perfect for print.
A Video-loop at 25fps imported to flash, embedded, plays fine if the project fps also is 25fps.But i also want to add a 3D Carousel menu, but at the projects 25 fps it goes a little bit choppy when rotating quick.So I try to change the projects fps to 50, and voila, the menu looks good but the video plays to fast.The video should alternate between clips randomly, and the clips has to be preloaded, thus its embedded in the swf (...or could this be done with flvs?)5-10 clips.
I'm working on a new portfolio, full flash website for myself and so far I've been working on my Macbook Pro almost entirely. The website is somewhat heavy in graphics/animation however nothing too big, all pages are around 500kb or less. Running the website on my MAC in any browser it looks perfect, the animation runs smooth, everything goes great. However, when I try to run the same website on my PC which is pretty good, the whole website feels a little bit choppy and laggy and I'm not sure why. It feels like it chokes for 1/4th of a second every like 2-3 seconds, lower FPS basically.
I have an application that I support but did not create. I need to test it on FMSS 3.0 but the developer version has both Streaming and Interactive Server enabled. Is there any way to disable the Interactive Server in the Developer Edition so I can confirm the application works on Streaming Server without influence from Interactive Server? The application works on the development server but when I move it to the production Streaming Server, it does not respond the same.
I am planning to start a new project in as3 and I want Dependency Injection in the project. I found that parsley and Robotlegs are two popular frameworks for implementing DI in AS3. Which is the best one among these two?
My main requirements are
lightweight minimal learning extensive documentation and active helping community
when i'm coding directly on the timeline, i usually create a var like this:
Code: var home:MovieClip = this;
so i always have something to reference the main timeline's scope. how could i do this in a class? delegate.create gets a little confusing.
i tried a few things like the following:
Code: class com.myClass { public var className:String = "myClass"; public static var version:String = "0.0.1";
[code]...
of course this is redundant because it'll scope just fine as parseNews();, but i'm just wondering why it's letting me scope it like this here and not in the onLoad declaration?
I'm animating various squares that needs to move "smoothly" on the screen.I've tried with the basic Tween and with TweenLite at 30 and 60 fps and the animation still choppy while at 90 fps looks better.
I have an AS2 .swf file called �sample.swf� This �sample.swf� contains a proportionally resizable background image. An external .swf file �content.swf� loads on top of it. The size of �content.swf� is 900x600 px and it is positioned to the absolute center (x and y) of the stage at all times.
So basically you open the page in a browser and resize it, the background image resizes as well and keeps its proportions and the content always stays in the absolute center regardless of the size of the browser. Here�s my problem, when I resize my browser to smaller than the content size (900x600), the content gets cut off. So what I want is to activate the scrollbars whenever the browser size goes under 900x600 in either directions (x,y) You tell me if it�s possible. I am open to other solutions as well.
So I'm working on a as3 site that allows for users to signup/login, and I'm torn between using cookies vs SharedObjects to remember login info, I've been googling about it and I find a lot of people are super paranoid about LSOs, so maybe I should just go the regular cookie route?
I'm trying to load YouTube playlist feed data and I'm having some trouble with the ATOM version, which is the YT default. I'm having no problems with the RSS version, but the RSS takes a few minutes longer to update when making changes to a playlist. I can load both and toXMLString(); both feeds but I'm getting an error when I try and parse the ATOM feed.So if the ATOM feed looks like this:
HTML Code: <feed ... > <entry>...</entry> </feed>
Shouldn't I be able to get the following trace to work after the completed load where playlistXML is my new XML for the feed:
Code: trace(playlistXML.entry[0].title);
I'm getting a "TypeError: Error #1010: A term is undefined and has no properties." when I try and output that title data.And the RSS is like this: