Problem with loadvariables "error opening URL"

This is my first time try to retrieve info from database with flash.

So I tried to access my asp file with the following code:

loadVariablesNum("data.asp", 0) or loadVariables("data.asp", this)

Both gave me the same error "Error opening URL 'file:///C:/flashCode/data.asp'"

my files (fla, swf and data.asp) are located in the same folder (ie. C:/flashCode).

Does anyone have any clue Do I have to enable some sort of permission on OS so that flash can open/access file

Posted On: Thursday 18th of October 2012 11:22:13 PM Total Views:  134
View Complete with Replies

Related Messages:

Flash MX 2004: Lag problem   (86 Views)
I recently strated creating a RPG game in Flash MX 2004 AS2.0 and when I start my game after 3-5min it starts lagging. Any tips thanx code: //_root function rollover(who2, text2) { timer = 1; countdown = function () { timer--; if (timer == 0) { textbox.text = ""; clearInterval(countdownInterval); } }; countdownInterval = setInterval(countdown, 1000); if (_root.cursor.hitTest(who2)) { textbox.text = text2; } } function visible(who) { if (who._x>player._x+300 || who._xplayer._y+300 || who._y who._visible = false; } else { who._visible = true; } } //end root [/code] //player onClipEvent (load) { var speed = 5; var oldspeed = speed; var health = 200; var maxHealth = health; _root.shot._visible = false; var selected = 0; shotcount = 1; rad = 0.0174532925199433; moving = false; } onClipEvent (enterFrame) { _root.textbox._x = this._x-250; _root.textbox._y = this._y-270; _root.textbox.selectable = false; if (moving) { moving = true; this.gotoAndStop(2); mcx = _x-m.x; mcy = _y-m.y; _rotation = -Math.atan2(mcx, mcy)/rad; mr = _rotation*rad; if (Math.sqrt((mcx*mcx)+((mcy)*(mcy)))>speed) { _y -= speed*Math.cos(mr); _x -= -(speed*Math.sin(mr)); } else { _x = m.x; _y = m.y; moving = false; this.gotoAndStop(1); } } if (Key.isDown(Key.SHIFT)) { this.gotoAndStop(1); moving = false; myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x); myDegrees = Math.round((myRadians*180/Math.PI)); _root.yChange = Math.round(_root._ymouse-this._y); _root.xChange = Math.round(_root._xmouse-this._x); this._rotation = myDegrees+90; } if (Key.isDown(Key.SHIFT) && (moving=true)) { moving = false; } // helti = (health/maxHealth)*100; if (health100) { shotcount = 1; } } if (Key.isDown(Key.SHIFT) && this.selected == 1) { moving = false;"li"+shotcount, shotcount+7000); _root["li"+shotcount]._visible = true; shotcount++; if (shotcount>100) { shotcount = 1; } } } // end player //shot onClipEvent (load) { var attack = 5; if (this._name == "li") { this._visible = false; } else { this._visible = true; } this._x = _root.player._x; this._y = _root.player._y; this._rotation = _root.player._rotation; shotxspeed = 20*Math.sin(_root.player._rotation*(Math.PI/180)); shotyspeed = 20*Math.cos(_root.player._rotation*(Math.PI/180)); } onClipEvent (enterFrame) { _root.visible(this); this._x += shotxspeed; this._y -= shotyspeed; if (_root.player._x-220>this._x || this._x>_root.player._x+200) { unloadMovie(this); } } //end shot //cursor onClipEvent (enterFrame) { startDrag(_root.cursor_move, true); Mouse.hide(); } onClipEvent (mouseDown) { if (!Key.isDown(Key.SHIFT)) { _root.player.moving = true; duplicateMovieClip(this, "as2", 0); _root.as2.gotoAndPlay(2); Mouse.hide(); } } onClipEvent (mouseUp) { Mouse.hide(); } //end cursor //spider onClipEvent (load) { var hp = 10; } onClipEvent (enterFrame) { _root.visible(this); _root.rollover(_root.spider2, "sta"); _root.rollover(this, ["Spider lvl. 1 hp:"+hp+"/10"]); if (hp == 0) { unloadMovie(this); } xdist = Math.round(_root.player._x-this._x); ydist = Math.round(_root.player._y-this._y); distancefromthis = Math.round(Math.sqrt((xdist*xdist)+(ydist*ydist))) ; if (distancefromthis=50) { EmyRadians = Math.atan2(_root.player._y-this._y, _root.player._x-this._x); EmyDegrees = Math.round((EmyRadians*180/Math.PI)); _root.yChange = Math.round(_root.player._y-this._y); _root.xChange = Math.round(_root.player._x-this._x); this._rotation = EmyDegrees+270; this.walkTo(_root.player._x, _root.player._y); this.gotoAndStop(2); } if (distancefromthis EmyRadians = Math.atan2(_root.player._y-this._y, _root.player._x-this._x); EmyDegrees = Math.round((EmyRadians*180/Math.PI)); _root.yChange = Math.round(_root.player._y-this._y); _root.xChange = Math.round(_root.player._x-this._x); this._rotation = EmyDegrees+270; this.gotoAndStop(3); } if (distancefromthis>=150) { this.gotoAndStop(1); } function walkTo(X, Y) { // Y-Axis movement if (this._y(Y+20)) { this._y -= 2; } // X-Axis Movement if (this._x(X+40)) { this._x -= 2; this._xscale = 100; } } } //end spider //li onClipEvent (load) { var attack = 5; if (this._name == "li") { this._visible = false; } else { this._visible = true; } this._x = _root.player._x; this._y = _root.player._y; this._rotation = _root.player._rotation; shotxspeed = 20*Math.sin(_root.player._rotation*(Math.PI/180)); shotyspeed = 20*Math.cos(_root.player._rotation*(Math.PI/180)); } onClipEvent (enterFrame) { _root.visible(this); this._x += shotxspeed; this._y -= shotyspeed; if (_root.player._x-220>this._x || this._x>_root.player._x+200) { unloadMovie(this); } } // end li //cb onClipEvent (load) { var s = 0; var r = 0; } onClipEvent (enterFrame) { _root.visible(this); _root.rollover(this, "Lighting bolt"); if (this.s != 0) { _root.player.moving = false; _root.player.gotoAndStop(1); startDrag(this, true); _root.cursor._visible = false; } if (r != 0) { _root.player.selected = 1; _root.ib4.e = 1; } else { _root.player.selected = 0; _root.ib4.e = 0; } } onClipEvent (mouseDown) { if (_root.cursor.hitTest(this)) { this.s = 1; } } onClipEvent (mouseUp) { if (this.hitTest(_root.ib1) && _root.ib4.e != 1) { this._x = _root.ib1._x; this._y = _root.ib1._y; this.r++; } else { if (this.hitTest(_root.ib2) && _root.ib4.e != 1) { this._x = _root.ib2._x; this._y = _root.ib2._y; this.r++; } else { if (this.hitTest(_root.ib3) && _root.ib4.e != 1) { this._x = _root.ib3._x; this._y = _root.ib3._y; this.r++; } else { if (this.hitTest(_root.ib4) && _root.ib4.e != 1) { this._x = _root.ib4._x; this._y = _root.ib4._y; this.r++; } else { this.r = 0; } } } } this.s = 0; stopDrag(); _root.cursor._visible = true; } //end cb //arm onClipEvent (load) { var s = 0; var r = 0; } onClipEvent (enterFrame) { _root.visible(this); _root.rollover(this, "Armor"); if (this.s != 0) { _root.player.moving = false; _root.player.gotoAndStop(1); startDrag(this, true); _root.cursor._visible = false; } if (r != 0) { duplicateMovieClip(_root.arm, "arm2", 2); _root.arm2._x = _root.player._x; _root.arm2._y = _root.player._y; _root.arm2._rotation = _root.player._rotation; _root.player.speed -= 1; } else { removeMovieClip(_root.arm2); _root.player.speed = _root.player.oldspeed; } } onClipEvent (mouseDown) { if (_root.cursor.hitTest(this)) { this.s = 1; this.r = 0; } } onClipEvent (mouseUp) { for (i=5; i
EXIT fullscreen problem   (115 Views)
Ok.. I know it has been asked before probably, but I have worked myself in a bit of a mess. I'm playing flv files from a standard FLVPlayer. I managed to get a button working to get the flv movie into fullscreen. First I stretch the FLVPlayer to fit the stage and then invoke the Stage.displayState to "fullscreen" and back to normal with my button. So far so good. Only... when I exit the full screen by the ESCAPE key, the movie stays streched. It seems to be pretty difficult to read the escape-key (in fullscreen mode double as hard), but is there a way to release any code if the escape key is hit which makes it go OUT of the fullscreen mode The basic keyListener doesn't seem to work. Thanx!
The problem with ESC   (95 Views)
Friends. i am from İstanbul Turkey. I have a problem with ESC button. I am trying to make interactive CD with flash. i run flash in fullscreen when i press ESC the procejt resize norman screen. How to i bloc this function ESC. I mean when i press ESC the player dont make anything... Sorry for my english language Please help me.. Best regards from here to all of wold !
XML addition problems in AS-2   (138 Views)
I am wrestling with a problem adding numerical values in my Actionscript. I have built an XML driven image gallery for a client in AS-2 that gets it's attributes (mostly numerical values) from an external XML file. I go to use subtraction in the form of either - or -= and it works normally. However when I go to add a two numerical values (one stored locally within the flash movie and one loaded in externally) it fails and simply tacks the loaded number on to the end of the first number. For example: I load the value of "thumb_spacing" from an XML file. Lets say 12; This number is to be added to the width of the thumbnail which is a movieclip drawn in my code(50). This is a sample of my code that is giving me the problem: ActionScript Code: thumb_spacing = gallery.firstChild.attributes.thumb_spacing; for (var i = 0; i < total; i++) { thumbURL = images[i].attributes.url; thumb_mc = scroller_mc.createEmptyMovieClip("thumb" +i,scroller_mc.getNextHighestDepth()); thumb_mc.beginFill(0x000000,100); thumb_mc.lineTo(50,0); thumb_mc.lineTo(50,50); thumb_mc.lineTo(0,50); thumb_mc.lineTo(0,0); thumb_mc.endFill(); thumbLoader.loadClip("img/" + thumbURL,thumb_mc); thumb_mc._x = (thumb_mc._width + thumb_spacing) * i; thumb_mc._xscale = thumb_mc._yscale = scale; } Adding 12 + 50 should give me 62 but when I trace the value it is resulting in 1250.... If I perform a trace adding two values locally, it works fine. (10+10 traces as 20) What am I doing wrong help is extremely appreciated.
problem using #include in cs3   (220 Views)
Hi , I have a project that was built in as1 originally (and I'm even ok with keeping it in as1) but when I go to to output a file using flash cs3 it doesnt seem to read an external .as file... In the first frame there is #include " and the file is there in the same directory (and it all works with flash professional (version 7) or MX, but when I try to publish it w cs3 (still for player 6 and action script 1) I get the compiler error: Scene=Scene 1, Layer=AS, Frame=1, Line 1 Error opening include file File not found. #include "" Any thoughts on how to fix this Different syntax maybe to load the .as file from cs3 I'd rather just output the file as is (flash 6, as1) because I'm afriad there are a lot of other things that might break if I try to got to as2, but if there is an as2 solution, I'll take it..
expandable banner problem rollover buttons   (133 Views)
I have an expandable banner which has a video player in its expanded state, during this state I have a button that covers the entire stage with a rollout that causes it to collapse. Then on a layer above that the play pause and volume controls as buttons. Whenever I rollover these video buttons it collapses the banner, so they become useless. I tried putting expand functions as rollover on the video controls however this causes the video to restart. I've attached the fla, any help would be appreciated.
swapDepths problem   (111 Views)
hi everybody, i have a little problem. in my movie i have one moviclip (box_mc) that stay always on the stage, and i need that when i loaded a swf (my_mc.swf) in the stage, it stay behind the moviclip box_mc, and not in first position. sorry for my bad english: can anyone help me please
problem in preloader   (116 Views)
i need fast help .... am trying to make flash website and i wanted to put a preloader but when i did that the result that the swf fully loaded then the preloader blink for one seconed and if u want to see example visit and alos the source file you can download it from [URL"]here [/URL].it is cs4 and for sc5 here plz also visit this is the same as what i want to make ...the question is how to make the website fullscreen resizable like that
dynamic text problem with multiline   (110 Views)
ActionScript Code: _root.setdtext("This is line 1 blablabla line 2 shoud show.. but it don't."); I have multiline enabled I have htmlText enabled I have made room for both lines by pressing enter in the textbox. Anything after is just erased.
preloaders messing with other preloaders problem   (114 Views)
, back again with another problem i'm afraid. I seem to be getting a funny problem whenever people click a bit too early on another link whilst a movieclip file is loading the prime example is here, you click to enter the site, then a .swf loads within a MC to give you the "homepage" content (in this case some rather pretty girls wearing some t-shirts) the problem comes when the user gets bored of waiting too long and decides to click else where, for example, the user clicks on events. This then begins loading the events.swf file into the loader_MC I have, and once loaded begins mass playing the file constantly ( warning, it does flash very quickly, so if that sort of thing set you off, dont click it =O!) This is what my preloader code looks like in the loading files (such as home.swf, events.swf, etc) ActionScript Code: mycallback = setInterval(preloader, 10); //function to be called to test for download function preloader() { //test for total file download if (getBytesLoaded()>=getBytesTotal()) { // if file downloaded then play clearInterval(mycallback); play(); I can see why its happening, its that play function, when the user clicks too soon, the code gets a bit confused, and rather than doing as it should, it mass plays everything it can get its hands on. This is where my problem is, I dont have enough flash knowledge to figure out how to control it properly. This piece of code is on the main .swf file, where it tells the user how much has loaded, I've included it in case there is something I've missed here (but as far as I can see, I haven't) ActionScript Code: function loader_clip(str:String):Void { var myLoad:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadInit = function(target_mc:MovieClip) { // can put movieclip height and width here }; myListener.onLoadStart = function(target_mc:MovieClip) { _root.pimpfishloader_mc.loader_txt.text = "It's Beginning"; }; myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) { _root.pimpfishloader_mc.loader_txt.text = "One moment :"+Math.ceil((loadedBytes/totalBytes)*100)+"%"; }; myListener.onLoadComplete = function(target_mc:MovieClip) { _root.pimpfishloader_mc.loader_txt.text = "It's Done !"; }; myListener.onLoadError = function(target_mc:MovieClip, errorCode:String) { _root.pimpfishloader_mc.loader_txt.text = errorCode; }; myLoad.addListener(myListener); myLoad.loadClip(str,loader_mc); } loader_clip(""); , Grrrreat!
visibility problem movieclips   (142 Views)
all, im working on a little project and this is a part of the code which works but not how i want it to work. the case is that i want to toggle the invisibility from movieclips with handwritten names in it (so actually a picture). this code below will show how it works: Code: if (_level0.afzender3== "1") { henk._visible = true; } else { henk._visible = false; } if (_level0.afzender3== "2") { willem._visible = true; } else { willem._visible = false; } my problem... I need to do this for 19 people and since the number is static, it takes a lot of time to make it in the first place and hard the change lateron. So i'm wondering... can't i do something like this Code: if (_level0.afzender3== ["person"]) { ["person"]._visible = true; } else { ["person"]._visible = false; } this way i only need to declare ["person"] somewhere like: person = henk, willem, kees, etc Can anyone help me with this maybe with a array or while loop
Very simple problem for someone who knows flash! Please could you help   (182 Views)
I have attached a flash file, and all I want it to do is what ever you type to fill the box.... I have then set a print screen button on my file that will print frame and move back to frame one where it will reset and you will do it over again,..... This is for a touch screen aplication.... Also I dont even know how to make the text appear bigger in the box
external preloader problem   (146 Views)
I've got a preloader, which loads an external SWF into a movieclip. The problem is that the external SWF starts playing while de preloader is still loading. This is the code I use: Code: var mcl:MovieClipLoader = new MovieClipLoader(); var mclL:Object = new Object(); mclL.onLoadProgress = function(target,loaded,total) { myprogress._xscale = Math.round((loaded/total) * 100); } mclL.onLoadComplete = function() { myprogress._visible = false; base._visible = false; } mcl.addListener(mclL); mcl.loadClip("V:/movie.swf",holder); any ideas
mp3 player problems   (160 Views)
hi im not that gd with flash or xml. im trying to build an mp3 player. i didnt know where to start so i looked on some online tutorials and i found this 1 which was kind of what i wanted heres the link to it i had a play about with it and i get how the xml works with it. i can get it to add new songs but it puts them under the 6th song box and i wanted them in a proper list and i dont get how to do it. im guessing its sumit easy but i aint a clue with this stuff cheers damo
Flash newbie, stuck with problem   (144 Views)
hi, i'm very new with flash and know pretty much nothing about making it. However, I wanted to do my uni project using flash as other tools did not really appeal to me, and i have an idea of it's limitations from past experience with games and apps etc. anyway, my project uses the "escape game" idea for the first part of it: i've been following the guide on here. i'm up to page 3 on the tutorial. I'm basically trying to make a learning package where there is some information and then "clickable" keywords within, which need to be picked up and stored in the word box for later use in a fill in the blank assessment. so instead of having objects in typical escape games, i'm having keywords. I've been able to sort out my navigation no problem, but implementing the keyword part is causing me a lot of trouble. First off the guide i'm using misses a part (i think) and so i'm clueless as to what to do exactly. i managed to find someone's file based off the same tutorial, but i've not been able to figure out what they've done. so far what i've done is made the box and put in the key words. but its all gone to hell from there i'm using... CS4 i think, AS3 If anyone is kind enough to offer any help, that would be most appreciated. thank you in advanced martin I've attached my files on: the first one is pure navigation with no problems the 2nd one is the problem one, one that keeps having 1119
[RESOLVED] Exporting/Previewing problem   (74 Views)
Hi everybody. Quick problem here. I'm working with a Flash document (1280 x 720 pixels), and I have an image covering the background canvas in every frame of the animation I'm working on. However, when I go to Test Movie or Test Scene, the left-hand side of the animation is cut off in the test window. Even worse, when I export the movie under default settings, there's some empty white space at the top of the animation, as if I had left the top of the canvas with nothing on it. This doesn't happen when I test the movie, and exporting it shows the stuff on the left-hand side that gets cut off during testing. Is there any setting I should be checking to make sure Flash is exporting everything on the canvas, and only what's on the canvas And how can I get the Test Movie function to show me everything it should be showing me Or what's going on here
CS4 problems   (133 Views)
I have 2 computers, one at work and one at home. I have some .fla files that I created at home that I need to use at work. Eventually they will be part of a SCORM file for an e-learning application. Both computers have flash CS4 Professional. When I save the .fla to my flash drive, and try to open it on my work computer, it wont play. Well, technically it does, but just the main timeline. the code refuses to run. I am sure that I am just doing something retarded, but I just don't get it. When the .swf gets imported into 'Articulate' (the presentation creator) it does the same thing, just plays the main timeline. If you launch the .swf it plays fine in a browser or flash. Halp.
Dynamic text problem   (101 Views)
Hi. I am new to flash and am trying to use dynamic text in a web page i am making. I am trying to use an action script to change the text when the page runs. The code I am using is this: b1.link_mc.MyText_txt.text="About"; The problem is that when it runs the text is not there. On the stage the text says Home but when it runs the text just disappears. Has anyone got any idea what im doing wrong
Smooth tween problem   (129 Views)
I dont understand why a simple vector mc TWEEN ANIMATION isnt smooth. Here is an example. I use 30 FPS and I dont want to use 40 FPS or higher. What should I do
Help please - grayed out problem   (113 Views)
I dont know whats up with this .. but all of a sudden today, in my Flash cs4 - (MAC) and (PC) versions... i work on both mac and pc and have tried both to resolve and now both are the same. When i open an fla in flash to work on it, select a text box... in the properties window under position and size now HIEGHT value is grayed out. it now occures on any file i open... I am using Palatino Roman Text in a simple text box... now i have to ability to change the height value. I am in the middle of a long project and must resolve this asap. Please anyone out there with a clue... PLEASE help me. I even rebooted and restarted everything, I even opened files in cs3... now it has the same problem. PLEASE ADVISE.