ActionScript 3.0 :: Specific URL Blocking - Access Restricted
Mar 22, 2012
This is specific url blocking.
function pageDomainCheckInit(event:Event):void {
var url:String=stage.loaderInfo.url;
var urlBeginninng:Number=url.indexOf(://)+3;
var urlTermination:Number=url.indexOf(/,urlBeginninng);
var pageDomain:String=url.substring(urlBeginninng,urlTermination);
[Code] .....
Does anybody know how to make a folder inaccessible by direct address yet accessible to a flash file within that domain? Consider the following scenario.[URL]
Here is the thing : I have a several frames on which I have several MCs. logical. On some frames, I have MCs that have the same name that on other frames. Right now, I access the frames by a gotoAndStop() and then access the MCs of the frame in the very frame. What I want to do : I want to be able to access the MCs of all the frames from the first one to initiate them (loading purpose). But since I have MCs with the same name, I can't juste do "MCName.whatever()" because as wouldn't know which one to chose. So here's my question : is there a way to use the object-like syntax to prefix the MC Name by it's frame ? ie : frame is "Frame2"
I have a several frames on which I have several MCs. logical. On some frames, I have MCs that have the same name that on other frames. Right now, I access the frames by a gotoAndStop() and then access the MCs of the frame in the very frame.
What I want to do : I want to be able to access the MCs of all the frames from the first one to initiate them (loading purpose). But since I have MCs with the same name, I can't juste do "MCName.whatever()" because as wouldn't know which one to chose.
is there a way to use the object-like syntax to prefix the MC Name by it's frame ?
ie : frame is "Frame2" mc is "myMC" => do Frame2.myMC.whatever()
I have 2 moveclip called view_mc and restricted and button called btn_scale.
When the user click and drag btn_scale, it resizes the view_mc where the width and height of view_mc dosen't exceed the width and height/2 of restricted area.
I made that. But when view_mc reaches the width and height/2 of restricted area, I can't resize view_mc to be samller. (The btn_scale looks like it's disables and can't use it)
I think some logic is missing. I highlighted the code that is missing some logic.
var clickedX:Number; var clickedY:Number; var newScale:Number;
I want to be able to pause and resume downloads in my flex application, but I get a RTE when trying to set the Range header.
Error #2096: The HTTP request header Range cannot be set via ActionScript.
I imagine there isn't going to be a work around client side, but expect there is a way you can get a server to change the name for the range header to something else...
I need to make a flash applet that automatically grabs a specific file on a user's system (iTunes XML file) and auto uploads it to my server. So far I have only been able to accomplish this with a user selecting the file, how to upload a specific file without the user having to go and find it.
I have 4 arrays named array1 to array4, is there any way to reference them dynamically? What I mean is if I have for example
var currentValue:int = 3;
and I want to be able to access a specific array depending on that value, is there an easy way to do that in AS3?In as2 you could do something along the lines of
I've written a function that restricts user input to just numbers (0-9,.) and stores the input in the associative array, userInput[]. It works but seems inefficient looping through the entire input text string to scrub out invalid characters. Anyone have suggestions for a more efficient approach? Note that a working solution must correctly process mouse or cursor key movements/edits within the input box.
Also, you can see I'm using the KeyboardEvent.KEY_UP event to trigger the processing. The docs seem to indicate TextEvent.TEXT_INPUT is really the proper event for this purpose. I started with TextEvent.TEXT_INPUT but found the event is triggered before the last key pressed is actually added to the instance. The result is that the function was always one characterbehind. Is there an easy way to get the current text in the input box, including the last key pressed, when processing TextEvent.TEXT_INPUT?
Looking for any help you might be able to give me with this one. Recently upgraded from Flash CS3 to Flash CS5 Pro. When I publish a movie produced exclusively with CS5, the resulting SWF will work everywhere but inside my company's highly restricted/locked down network. When I attempt to load the SWF in a browser from within the network, all I get is what appears to be the standard Flash preloader - the 5 little dots that crawl across the middle of the screen.
I've confirmed there's no IE version error, the machines have the newest version of Flash Player; the only difference is the network. What could be preventing the SWF from reaching the browser? Is there any esoteric publishing setting I can use in CS5 pro that I should try?
I have a restricted editable textfield in flash like this:
oField.restrict = "0-9";
To capture changes I attach this listener:
oField.onChanged = function(){ trace(1); };
Is there a listener to capture the event when a restricted character is entered (e.g. the event when the key "a" is pressed - the field does not change, so onChanged does not fire).
How can i access an object (movieclip) at a specific frame which is located inside another movieclip. It's something like this : first movieclip - and inside it, on frame 10 i have the second movieclip. I want to access that second movieclip ont that 10th frame.
I would like to edit a cell by the row and column indexes so essentially do the following:
advDataGrid[2][3] = "Dogs"
so that I am setting the data grid row 2 and column 3 to Dogs. I cannot for the life of me figure out how to do this!
Side note: I need this because I am trying to allow the user to copy a section of an excel file to a section of an AdvancedDataGrid like Google Docs does. I am using this idea to do it: [URL]
Flash cross-domain policy files only allow you to specify allow-domain-from tags.I'd like to know if there is a way to limit access as if the tag read allow-domain-to. In other words:[URL]...
Is it possible to achieve this without resorting to creating a special sub domain for flash callbacks?
I'm trying to build a system where users (restricted to a very few admins) can publish news articles. The form is simple enough: an input field for "Headline" (single line) an input field for "article" (multiple line) and a file reference field to include a picture.
The idea is that you can EITHER write a headline and some text and then publish | OR | write a headline, some text then choose a picture and publish.No check boxes - no "would you like to include a picture" - just an idiot proof system where you can wither publish text - or text and a picture on the click of ONE button.
The picture is placed (via php) into the file system on the server, the text for headline and article are pumped into an SQL database (via php). I know php well and can do that bit with no probs but I'm having trouble with the function to pump the vars to the php if the user HASN'T chosen to include a picture.
1) has anyone done this before and if so do you have a "boilerplate" fla / php I could copy and paste into my project ?
2) can anyone see any problems in the code (posted below) which would explain why the upload of pictures always works but the sql insert never works ? On the stage are two input fields and two buttons (obvious names in the code are 'head_txt' and 'art_txt' )
CODE: import flash.net.FileReference; var progressBar:MovieClip; var reference:FileReference = new FileReference();
Is flash (actionscript 2.0) secure enough to use for a website that holds personal info, password, restricted areas, ect. How can I make it secure enough if it's possible.
I've got a strange thing in attached fla: my gotoAndStop command won't go past a photo?First I've got the 'background' layer. On it is a red rectangle on frame 1 and 2. Frame 3 changes it into a jpg.
On the actions layer I've got a gotoAndStop(4), which should show the photo and trace a command. But it won't get past the red square? It's like the jpg photo blocks the gotoandStop(or Play for that matter) command. It doesn't trace to prove that the gotoAndStop command is executed on frame 4 and it keeps showing the red square on frame 1 and 2. Where it should show the photo which has already been placed on frame 3. when I replace the photo with a normal Flash shape (rectangle e.g.) it works fine.
I am creating a very simple interaction. I have a symbol as a moviclip which I can move around the screen using the arrow keys. I want to block certain parts of the stage so that the movieclip cannot pass into them. For example if I have a fence on the stage I don't want the movieclip to move over the fence I want it to stop when it reaches it. This will keep the user moving in the directions that i want, lead them toward another area of interaction.
I have an animation, when i preview it looks fine, but when i use the timeline to scroll through the animation (and when i export as .avi) - there's this strange white bar over the text! I have tried to remove the object from the library, but then the text disappears (also when i preview)
If you wonna check it out, the .fla file is here (5mb) : [URL]
I'm working on a simple website for A level ICT and am having some difficulties. My site has a javascript based drop down menu, as well as two .swf files embedded. When the drop down buttons in the menu are scrolled over, the .swf files disappear.index1.jpg is a screenshot of the page normally, index2.jpg is a screenshot when the menu link is scrolled over.I am also having difficulties with flash working with java on another page, the same .swf files do not fade into the background like the rest of the page when images are enlarged in a javascript gallery within the page. gallery.jpg shows this.
I've been creating a calculator as part of an assignment. I've created button instances in actionscript and then putting a text field over it. The problem is the text field blocks my button so it is difficult to press.exaple code:
var equals_btn:equals = new equals();equals_btn.x = 247;equals_btn.y = 369.9;equals_btn.width = 115;equals_btn.height = 45;this.addChild(equals_btn); var equalText = new TextField();equalText.x = 276.1;equalText.y = 349.9;equalText.width =
I have various buttons on stage that will initiate a popup box upon hover. But some of the pop up boxes are too big and covers some buttons which disables the button.Is there anyway around this? Logically, when a button isn't hovered, its popup box shouldn't cover what's underneath it. I have tried moving the layers around, although this works, but now the buttons are on top of the pop-up boxes which is no good.
I have a first SWF, the interface, which loads external SWFs, the pages, throughattachMovie. The pages themselves contain clickable buttons. What I am trying to do is enable and disable the buttons on the pages, without altering the code of the pages. I can only change the contents of the interface.I have tried using a blocker, a movieclip with :
I'm trying to use PNGEncoder to encode a bitmapData object into a png ByteArray so I can send the data to the server. Everything would be peachy except the bitmapData is 4000x4000px and when I run the PNGEncoder.encode function on it the whole app stops (UI is blocked) for 5-8 seconds while it runs. Does anybody have any suggestions on how to not make it block so bad, I read about chunking up the process (since you can't multithread in AS3) but can't find any sample code on chunking up the process.