I built this incredibly brilliant scrolling thumbnail image viewer for a client in flash actionscript 3. (Basically it just scrolls up or down depending on the mouse position). It works so so, (I can never get the percentages right so that it shows the top most image) but, that's beside the point. What is REALLY irking me is when I have the browser window open with my .swf loaded and I click on another app on my desktop, the stupid scrolling thumbnail area in the browser window starts to freak out.
"Where is my mouseY?" I assume it is thinking.
Is there a stage.Unfocus event I can tell my scrolling thumbnail area to STFU with?
I'd even consider writing some javascript to call a flash function, if that's a preferred technique.
function checkMousePos(e:Event):void
{
if(mouseX < 145){
try{
I have a class listening for key presses attached to the stage, works fine until...a menu item that when clicked removes the menu from the display list. This seems to cause the stage to lose focus & I need to click the mouse on the SWF to get the keys to register again.
Does anyone know if there's a workaround to the fact that when you escape fullscreen mode in a browser, the swf seems to lose focus? I'm doing fullscreen video and I have to press the pause button twice when returning from fullscreen. I noticed the same problem with YouTube videos.
i have a button that clears the entire TextField but clicking the button makes me lose focus from the TextField. Right now I'm just putting the focus back with stage.focus = textField; as the event occurs.
Is it possible to somehow not lose focus from a TextField when pressing a button?
In my Flex Project using Cairngorm, I have a model that stores a bindable ArrayCollection displayed by a DataGrid. My problem occurs when the model is updated by the responder (from a Java service, after an "update" event), because the focus located in a cell of the DataGrid is lost (the scroll position il also lost). So, I retrieve the position before the update, with DataGridEvent.ITEM_FOCUS_IN event :
I ran into an interesting problem while constructing an interactive applet today. It requires reaction to keyboard presses/releases, so I set up the appropriate listener to the stage. It also involves transitioning between different screens and I handle this by adding/removing instances of the sub-screens to the DisplayList of the stage. Now, here comes the interesting part: from my Control class in reaction to a SWITCH_SCREENS Event:
I am new to AS3 and trying to figure out how to set a focus to a textfield on the stage. I found out that if I use stage.focus = tf; then the tf get the focus and it does, when I type letters they go directly to this textfield.Problems are, I don't have a blinking cursor in the textfield. I added event listener to catch up when the user press the ENTER key but it catches the ENTER key ONLY after I click the textfield with the mouse and having a blinking cursor in that textfield.
My app has a datagrid as well as many other UIComponents (buttons, menus, etc). I have a general stage KeyDown handler as well as a specific one for the datagrid. The behavior I'm trying to implement is turning out to be trickier than I thought: basically, when using the keyboard arrows I would like the datagrid to always hear about such commands, even if it's not in focus.
Possible approaches I thought of:have the DG be in focus at all times: seems stupid / tricky - basically would need to remember to give focus back to DG after any interaction with the rest of the UI, which obviously doesn't scale.try to set the DG in focus from stage KeyDown handler: seems like the timing doesn't work since the DG gets focus too late to "hear" the event.from the stage keydown handler, check if the DG is not in focus, and if so pass it the event. This seems to make sense in theory, but I'm not sure how to do this properly since my stage keyDown handler uses capture, and thus seems to catch the same event over and over.
Is there any reliable way to give the stage focus when you first open it in a browser window WITHOUT first clicking on the stage? By reliable, I mean something that works across different browsers and on both PCs and Macs.I've seen numerous threads on this subject, and I've read the Adobe tech note, and it seems there is no reliable way.How in the world can Adobe ask people to use Flash and not provide a reliable way to give the stage focus on startup.
I want to have it so that when text is entered into an input text field, the cursor advances automatically to the next text field. The text fields are nameed box1, box2 and so on, and are custom classes called Box. So far I have:
[Code]....
How do I get from a string variable to the stage.focus?
stage.focus = txt_firstnameEdit; I need to make the blinking cursor at the txt_firstnameEdit when I enter the stage. but the blinking cursor appeared infront of string_0. string_0 is pre-entered in the textbox in my code.
For example this is what I see in the textbox... INameless I = The blinking cursor. How do I make the blinking cursor go behind like this? NamelessI
It successfully gives the TextField "txt" focus because when I type, the characters appear in the input textfield, however the familiar blinking text cursor/beam does not appear in the textfield. This makes you think it does not have focus, so you click the textfield to give it focus -- completely defeating the purpose.
I have created a container in Flash Professional CS5 for my project's CBT. I've been able to script many of the features we require using AS3, but there are a couple of things I'm still trying to work out. I would like the swf presently playing in one tab to pause and go silent when another swf is opened in a new tab (the sound is inside this externally loaded swf which is loaded inside a movie clip from buttons nested a movie clip down). I've tried :
var originalFrameRate:uint = stage.frameRate; var standbyFrameRate:uint = 0; addEventListener(Event.ACTIVATE, onActivate); addEventListener(Event.DEACTIVATE, onDeactivate);
[Code].....
This function is present when I publish the CBT with Captivate, so obviously there must be code available. You can set the Captivate button to open url in new window and pause movie. Is there something I can add to the html file that is similar to the "has Priority" for mobile devices or is there javascript that can be added to the flash itself?
i've a problem with my setFocus. i will use [n] to identfy the line in the code. this is a MouseEvent.CLICK - function from an other dynamic,non-selectable textfield. the textfield in work is one with an embeded font and some text in it.if i use line [3], i'll get the no blinking courser and no possibility to enter some words. also if i mark some other and click after that in the input-textfield directly there will no courser anymore.but this only happens in the first time using the swf. if i first click into the input-textfield, then set the focus to something else and trying the steps i wrote over here, everything works fine.
I've noticed recently (the last week) that when I open Flash CS4, the Tools panel and the Actions/Timeline/Compiler Errors/Output panel group are not automatically open, like they always were before. Does anyone know of anything I could have changed by accident?
At the same time this started happening, I have a file that has a moving hot spot that is set with keyframes (depending where the active button is on the bitmaped screen capture behind the button). Even though the button's onRelease handlers are advancing the timeline correctly, my button is not in the right place in the runtime version. If's still fine in the development environment. It's like the layers are out of sync with each other.
I'm using Flash uploader(uploadify, swfupload) with CodeIgniter, want to get the session data. I have found out that the flash does not send the session data, so I have set $config['sess_match_useragent'] = FALSE;
Now for example i have set session value myname in session and I can get it on my backend PHP script using Internet Explorer.[code]...
I have a logo which I have created in photoshop, it is made up of 4 layers, some of which I want to animate. I create my movie, I do so by opening my PSD file and then animating the layers. However I have a problem in that when I view my movie the image quality is poor, and there is what I would describe as noise around some of the image.
I've created a globe in Flash CS3 and published it (no compression) as a swf The globe has a couple of layers with gradients used as highlights. When I import the file into another Flash document the gradients seem to disappear
I have a flash file in a div. This div is set to visible (display:block;). The div has two sister divs. All three divs are controlled by custom built jQuery tabs, so when another tab is clicked, the currently visible div turns display:none;. When the tab is reclicked to set the flashes div to display:block, the flash file loses all its values that are stored (for example in a textarea, all the text gets reset, and where a element stores a path to the image, that gets reset).
I have tried other methods like width:0; height:0;, which sort of works, but as the flash file is larger than the other two divs, it is still visible underneath. So then I tried overflow:hidden; but the same issue still occurs as above (losing values).
visibility:hidden isn't applicable as there is a large white space where the flash file should be.
I just completed a task for someones website and it is basically an animated banner. Well, I made it at 1350px wide, and they now want it resized to 900px. When I resize it in html, it loses a lot of the quality.
when i have this line active(the red one) it gives me automatic focus, so no clicking to be able to detect key input so i got that going for me which is nice BUT when i have it active(not commented out) i get this big yellow line which goes away when i click it(seeBelow)
I have a higher resolution .flv file and I'm trying to replace an older version within my Flash file. However once replace (by use of the "swap video" feature when right clicking video), it blows the video up way bigger. When trying to scale down the video, it become fuzzy/pixelated upon output to .swf. Any proper way to resize this higher-res video without loosing picture quality?
I've been having this really annoying thing happen the past few days, that has happened before but not as frequently. I create a project in Flash Builder, import some classes, and then on occasion it keeps erasing those classes. So then I get errors in a lot of my datatypes, have to go back through my document and retype the datatype so that it reimports the class.
I have a parent movie that can load various "overlays", which are externally loaded swf's. For several of these overlays now, when the overlay is loaded into the parent movie, any components it was using seem to disappear, or more precisely, use the parent movie's component (so if the parent movie doesn't have an instance of whatever component it is in it's library, then the child won't display anything.) I have been able to (sort of) solve the problem by creating an instance of whatever component it is in the parent, but this is undesirable, especially since different overlays may use different versions of the same component (i.e., skinned UIScrollbars.)
So, code in the parent:
Code: public function drawOverlay (rID:String, payload:String, x1:Number, y1:Number, w:Number, h:Number, o:Number, bg:String, bc:String, bw:Number) : void { trace("SKIN - "+rID,x1,y1,w,h,o,bg,bc,bw);
[code]....
The child runs perfectly standalone (of course), and everything except components work fine when loaded. Everything is CS4/AS3. It seems like I have a rooting issue, where the root of the loaded swf is being linked to the root of the parent, but I don't know what to check out...
there was that update that made it so you cleared flash saves out whenever you cleared your browser's... what was it, cookies or cache? I'm looking it up but Google is being shockingly unhelpful, only giving me advice from the Flash 8 days. The thing is, I would far prefer to manage my flash saves manually. I know that's not the universal preference, but it prevents me from losing saves when developing, and prevents me from losing game saves for that matter.
But I would really like to clear my browser cookies and cache! It's really getting gummed up in here. So my question is: is there a user-friendly way to manage flash saves directly? Is there a way to empty my cache and cookies without losing every flash save I have?
I've a simple flash application that does counting on button click. I load it in a page and a javaScript code does some DOM manipulation to move it from one div tag to another. Problem: the state of the count is not preserved as the swf node is moved from one node to another. What I did:
I simply get the node using javascript getElementbyId function and then once I get the source and destination div nodes then I use destinationNode.appendChild(sourceNode); //javascript This works well in Internet explorer, but it doesn't work in Chrome and Firefox. So then I tried prototype library.
Possible Duplicate: losing extension when use FileReference download I'm having an issue that looks common when using the FileReference class in FP10 when saving a file. The whole thing works fine as long as I don't change the default filename. If I do, then I loose the extension of the file... which is annoying >_< I haven't found any "acceptable" workaround, but the posts I've seen are from a couple of months already. So I'm inquiring hoping that something's been done regarding this issue since then =)
i'm building an projector application in AS3, as a slide show.When the right and left keys are pressed on the keyboard, the slides change.the code to change the slide:
Code: function setup() { stage.addEventListener(KeyboardEvent.KEY_DOWN, displayKey); } setup();
[code]....
Some slides have button on it, that change the slide, jumping to a chapter the user whant to see.the problem i'm having is that when the button at a slide is clicked, the key press detection does not work anymore. To make it work, I have to click somewhere on the stage.