ActionScript 3.0 :: Dealing With Positioning In FULL_SCREEN?
Apr 23, 2009
I have an app that has a fullscreen button that goes into fullscreen NO_SCALE. Keeps everything looking sharp. However, all of my movieclip positions aren't correct. To fix this, I need to use:
Code:
stage.addEventListener(Event.RESIZE, stageResize);
Then, in my stageResize function, I duplicate all my movieclips' x and y and (if necessary) widths. This seems wrong and cumbersome.
Here's an example of what I'm talking about. Full Screen - Doesn't Work Clicking on fullscreen brings you to fullscreen but the mc positions stay put. Here's the code for this one:
Code:
var btn_fullScreen:btnFullScreen = new btnFullScreen();
var btn_normalScreen:btnNormalScreen = new btnNormalScreen();
var bar_bg:barbg = new barbg();
[Code].....
View 3 Replies
Similar Posts:
Dec 22, 2009
I have a projector file in CS4 AS3.I used this code to go full screen.Quote:stage.displayState=StageDisplayState.FULL_SCREEN;Now in CS5 the same code appears to disable my keyboard. I have no keyboard input unless I leave fullscreen. This wasn't an issue for me in CS4.
View 1 Replies
Mar 5, 2009
I have a movie clip button with a dynamic text field inside.I am loading dynamically to the stage while a video is running in the background.I also have a fullscreen button (Flash component)on the stage. After clicking the fullscreen button and in Full_Screen mode the static buttons including the full screen button work without a problem, but the dynamic button seems not to work at all. Basically the dynamic button when clicked should change its message to "You have clicked button 1".This works in normal mode, but not in Full screen.I tried btn_cuePt_1.enabled= true; but without success.Does it have something to do with not using the fullscreen events?
exp. stage.addEventListener(FullScreenEvent.FULL_SCREEN,
fullScreenRedraw)
View 17 Replies
Oct 26, 2011
There are lot of posts with regards to Security problems when trying to use draw("file"); method on external file, however I've got this problem trying to use draw(stage) in FullScreen Mode.Is this a case that using draw() on stage in FullScreen mode is impossible?Is there any workaround to do that?
Code:
package {
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;
[Code]...
View 1 Replies
Mar 6, 2009
I have a movie clip button with a dynamic text field inside. I am loading the mc dynamically to the stage. In Full_Screen mode static buttons including the full screen button work without a problem, but the dynamic button event does not trigger when clicked. In this simplified code belwo the dynamic button when clicked should change its message to "You have clicked button 1". This works in normal mode, but not in Full screen.I tried btn_cuePt_1.enabled= true; but without success.
Does it have something to do with not using the fullscreen events?
exp. stage.addEventListener(FullScreenEvent.FULL_SCREEN, s_function)
Structure of my button is: Think of it as three layers inside a movie_clip. I used an empty button on the top layer so I would get a pointer cursor, I used a dynamic textfield the one that should change after the event to "You have clicked button 1", and last but not least the button graphic.
as3 Code
PHP Code:
//global variables
var btn_cuePt_1;
//file definitions
[code].....
View 14 Replies
Mar 5, 2009
I have a movie clip button with a dynamic text field inside. I am loading dynamically to the stage while a video is running in the background. I also have a fullscreen button (Flash component) on the stage. After clicking the fullscreen button and in Full_Screen mode the static buttons including the full screen button work without a problem, but the dynamic button seems not to work at all. Basically the dynamic button when clicked should change its message to "You have clicked button 1". This works in normal mode, but not in Full screen.
[Code]...
View 6 Replies
Dec 14, 2011
I'm trying to get data from a namespaced xml file in a flex app. There is a root namespace (xmlns="blah") and another namespace (xmlns:i="blah"), and I'm able to access most tags using the following:
var ns:Namespace = doc.namespace();
var result:XMLList = doc.ns::element;
However, there are several tags that are subject to change in the application, and i'd like to not hardcode them, possibly using the elements method:
var result:XMLList = doc.elements(configuredField);
Is there a way to get elements with namespaces using the elements method, or a similar way to get XML elements in flex using a parameter?
View 1 Replies
Mar 2, 2012
I am making a strategy game and came across a kind of problem. Basically, I don't know how to deal with the dynamic creation of the units I need. Should I use some big switch statement or is there a more ideal solution?
View 3 Replies
Dec 7, 2009
I'm making a small memory game that is XML driven (users can upload images into the game). I've come to the point where I need to check if the user has filled out certain nodes or not, and if so; check that the input is valid - int when int is expected and whatnot.
What are the ways to check this, and which is best? So far I've only tried checking if a node is == "" or not, but I imagine there must be better ways. I will include lots of switches for the user which should all be optional. This calls for a neat way to validate it.
View 1 Replies
Aug 14, 2011
I would like to send and receive OpenSoundControl in an AIR application, on the opensoundcontrol.org website I have found existing libraries for many languages, but none for Action Script so far, do you know of one that could be readily used?
View 1 Replies
Jul 1, 2009
Everything dealing with sharedObjects in the first frame is this:
[AS]
var PlannerData:SharedObject = SharedObject.getLocal("PlannerData");
SubjectChoices = PlannerData.data.subjectChoices;
if (SubjectChoices == undefined) {[code]....
Going to the second frame from the first frame, the data is perfect. Going back to the first frame from the second, I'll trace the data many times throughout the code without an onEnterFrame, and it'll tell me that the Array is good...But when I trace the onEnterFrame, it shows the Array is [undefined, undefined, ...] like..undefined 17 times.
View 1 Replies
Jul 28, 2011
I'm using Flash CS5.5. I had some unfinished work on flash 8 and I'm running actionScript 2.0 In one of my scenes I had come up with a good button set up I wanted to use in all of my scenes. So I duplicated the scene, and proceeded to re-name my layers on the new scene according to the new content in the form of bitmaps. Well, on the output I got warnings such as: "duplicated label on layers". My SWF is still showing normally but I don't know what to do with the warnings. Is there something I should have done other than double clicking directly on the old labels on the layers and chaging their name?
View 1 Replies
Mar 9, 2010
I have a Flash web app which displays user submitted PNG files. Files are uploaded to the server via some API prior to being displayed. I'd like to make sure no "bad" files are served to Flash, where "bad" is entirely unspecific. Is there a way to validate PNG files against the PNG specs (this would catch corrupted files)? Or any best pratice on dealing with untrusted image files? I only need to handle PNG, so JPG, GIF etc. support is necessary. Language mostly does not matter, though I'd prefer Python solutions. This is on a Unix webserver.
View 1 Replies
Sep 3, 2010
I'm creating a container and it's content at runtime. Here's a rough structure:
--VBox
----Form
-------FormItem
[Code]...
I've tried also validateNowand other similar methods. What I have here:
1. The HScrollBar is being added.
2. We increase a bit the width of container, so it disappears.
3. When it disappears, the validating throws the null-pointer exception when it tries to measure the non-existing scrollbar. I've also tried to add validateProperties before validation, but it didn't worked either.
View 1 Replies
Jun 25, 2011
I want to have a series of functions that execute one after another instead of one within another.
here's what I mean
[Code]...
View 2 Replies
Oct 3, 2011
I think there are 2 different practices with dealing with display object on the stage.You draw all the objects on the stage and then manipulate the "visible" attribute to show or hide them.You use addChild and removeChild to manipulate the visiblity.How do you think what is the best method for this?
View 3 Replies
Oct 5, 2011
In my project, there is a frame(png files) placed on the top of all symbols. After that, I apply mouse click event to the symbols that place underneath the frame symbol, but when I run the the game, I cannot click to the below symbols but only the frame symbol, although the frame is transparent.
The problem is, although the png picture has some transparent area, the mouse click cannot pass through it. Is there solution? Is there anyway I can disable a symbol from being clicked and mouse click event can recognize the symbol placed under it?
View 1 Replies
Mar 19, 2007
How do professional programmers deal with preferences for their application?when there are options to be chosen in an application, does the program is full of "if" to detect what option has been chosen?Let's say that there is a call to 30 functions in the program.But the user has got to choose between an option A or B that would modify the way those 30 functions work.Would you have to write 60 functions and then place an "if" condition each time to go to the needed one...
Or would it be possible to write at run time (after the program has read the preferences) the corresponding functions? So that it wouldn't be necessary to check conditions each time?The goal being to gain total speed in critical functions preventing their run to be slowed down by condition requests.
View 2 Replies
Jul 16, 2011
I have an associative array of values called definitionsArray which I use as references to instantiate classes in a run time shared library.I instantiate and push the object into a new array. The problem is when I try to access or do anything basically with that new array.As they are objects they don't seem to like being in a display list for example.
HTML Code:
var definitionsArray:Array;
var bubblesArray:Array;
var currentBubble:*;[code]...
View 11 Replies
Dec 21, 2010
I need to adapt it so that instead of looping all the way back to the beginning, it instead goes to points further into the animation (such as say 10 seconds in) rather than all the way back to the start.[code]Now, I'm thinking that what needs to be changed is the autoRewind = true section, but being a complete novice, I don't even know where to begin. I've seen online sections dealing with a goto command, but my attempts to alter the code haven't worked correctly
View 4 Replies
Dec 29, 2010
I can find in the Adobe's help that masks dont function when dealing with 3d (properties). In this case I stuck on big obstacle in my project,where I wanted to deal with masks, and .z property. I wanted to tween mainMovieClip via TweenLite to make it going away from view.mainMovieClip has mask inside it ( added by the code), and certainly after tween is done mask is unaplied anymore, what is more disgusting functionality for eventListeners (clicks) attached to movieClips behind the mask gone far away. So in the end mask does not work, and everything behind it doesnt too..I need some specialist if my approach to the problem could be somehow a solution. I tried by it doesnt seem to work:I thought that if before tween I would disable the mask, by just setting
mainMovieClip.someMaskHolderMc.mask = null;
and then after tween is done, I could re-set it:
mainMovieClip.someMaskHolderMc.mask = someMasker;
but I end with nothing though, apart of that after tweening I can click once of the areas I had eventListeners before the tween, and then
all functionality disappear. Masks do not work too .
View 2 Replies
Apr 18, 2011
With continued help from this forum I am getting closer to having a working program. I look forward to being able to help others like myself once I finish learning the AS3 ropes.I have created a 12 x 9 random number grid that populates each cell with a corresponding image based on each cell's numeric value. I have also created a shuffle button that randomizes the numbers in the grid. The problem I am running into is getting my button-click event to clear the current images off the grid in order to assign new ones (i.e. deleting the display stack objects in order to place news ones in the same locations).My question is this: what is the best way to handle an implicit coercion from an array to a sprite? I have pasted my entire code below so that you can see how the functions are supposed to work together. My trouble apparently lies with not being able to use an array value with a sprite (the sprite represents the actual arrangement of the grid on the display stack while the array starts out as a number than gets assigned an image which should be passed to the sprite).
View 10 Replies
Aug 5, 2010
I'm trying to deal with an error that happens when an XML files is "loaded" that doesn't exist.Line that causes the error:
Code:
loader.load(new URLRequest(url));
I've tried putting a try catch(e:Error) around it, I'm tried an event listener for IOErrorEvent:IOError, but I can't seem to deal with the error.
Error message:Quote: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: [File Name] at blah blah.....
View 4 Replies
Apr 17, 2010
After a not inconsiderable effort I've managed to get a touch sensor attached to a microprocessor talking to flash. It gives a constant analog input giving a value between 0 and around 300. When it reads 0, the sensor is being pushed hard enough, and my aim is to get an object to appear on the screen every time the sensor is pressed so that it reads 0.[code]Which works, when the sensor reads 0 it traces "zero", except it does it every time it reads the sensor, so there's huge great list of "zero"s generated.What i want is for it to trace "zero" only the first time it detects a zero, and not do it again until the value rises past zero and back down again.Is there a conditional way to do this? Something like "If previous value was greater than zero and this value is equal to zero, trace zero. if not, do nothing"?
View 2 Replies
Oct 12, 2010
I need to load in a large CSV file (>1MB) and parse it. Generally this is quite easy to do by splitting first on linebreaks and then commas. The problem is though that some entries contain Strings that include their own commas. When this spreadsheet is converted to CSV, the lines containing commas are wrapped in quotes.
I've written a parser that first escapes all the commas in these strings, then splits it on linebreaks and then commas, and then unescapes the values again.
This is quite a slow process for such a long string, as I need to iterate through the whole string. Does anyone know a faster or more optimised method of dealing with this?
View 3 Replies
Jul 12, 2010
Seeing as I don't have too much formal education Flash/OOP in general, this is just one of those thing I can't seem to quite deal with gracefully. All I'm trying to do is to be able to load/reset my an instance of my game's main class (not the first class that gets pulled up by Flash, but the one that actually has games logic in it), which of course extends MovieClip. It took me a while before I could even make an instance in it, because it would silently crashed when I would try to do so, and what didn't help was that the output window stopped working, and I had to completely reinstall flash. As far as I remember I simply fixed it by taking out the "stage." from any of the lines of codes that had it.
[Code]...
View 6 Replies
Feb 13, 2009
I'm looking to create something like the link below, [URL].. however I need it to work on both x and y,I've been trying for days to figure out a way to pull this off,
can anyone point me to a tutorial or an example of something along those lines?
View 5 Replies
Mar 9, 2009
I am trying to position my loader for an external swf. Can anyone help me. Here is the code that I currently have to load the swf. These are the positions that I need x=0, y=180.
Code:
stop();
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete);
function swfLoadComplete(loadEvent:Event)
[code]...
View 2 Replies
Jul 12, 2010
I'm using action script v2 to load a .jpg from a button.I'm using the command 'loadMovieNum("photo.jpg",4)'What script could I add in to resize the jpg to specific dimensions and position it at a particular x,y coordinate?
View 2 Replies
Aug 24, 2010
I need to create the attached jpg, but i'm not sure of the best way to tackle it. The news posts are loaded from XML and will vary in height so they need to somehow be sorted so that if one is going to come off the page, then it's put into the next page - where the user will click the scroll buttons to view.
1/ Load article from XML
2/ Create a postMC_0 and add article bits to it (date, title, body)
3/ Record height
4/ Create a newsColumn_0 and add postMC_0 to it
Then a loop:
5/ Load next article
6/ Create a postMC_1 and add article bits to it
7/ If difference between postMC_0 height and newsColumn_0 height is greater than the height of postMC_1, then add postMC_1 to newsColumn_0.
8/ If not, then create newsColumn_1 and add postMC_1 to it.
9/ Loop back to 5 (increasing the numbers each time, so postMC_2, etc) Then just make the scroll buttons function according to how many columns have been created..
View 21 Replies