Not Seeing UI Element On Stage
Jun 4, 2010I put some UI component on the stage but i does not seen there but when i test the movie then i can see int the swf file
View 1 RepliesI put some UI component on the stage but i does not seen there but when i test the movie then i can see int the swf file
View 1 RepliesImagine a stage. Imagine a series of images (smaller than the stage and spread out evenly) that have been loaded into a bunch of "swfContainer" movieClips via the Loader Class. Is it possible to make one of these "swfContainer" movieClips go FullScreen and nothing else (i.e. not the entire stage, just the _mc that one of these images sits in)?
View 1 RepliesI'm doing a website for me, with flash... I want that the site is "full browser screen" but, I need that only the background is stretched for the size of the browser window, all the other elements (like nav bar, logo etc) will be in the same position, and MUST NOT be stretchet like the background...
How can I lock the position and dimension of the element of the website, but let the background stretch?
I am writing a program where the user can, in the simplest terms, drag and drop things on to the stage. I need the user to be able to save what they have done and when they come back choose to reload their previous project. My plan was to write all the information(object class, x and y values etc) to an xml file and when the user chooses to load a particular project, rebuild the stage with all objects in their correct locations. My problem is, how do you add an xml element with all of its attributes and child elements dynamically for each object added to the stage?I'm relatively new to XML, but I figured this would work:
ActionScript Code:
var test:XML = <test/>;
test.title = "Test XML";
for (var i=0; i<platform.numChildren; i++) {
[code]....
in a for loop as well. But, these give me a warning that says "adding an element with more than one item is not supported" or something like that.
I'm creating a website within which I would like to achieve a menu system at the bottom of the page with a white band behind similar to this site:
[URL]
I have created the menu buttons and band but I can't figure out how to maintain their relationship with the edges of the browser window if it is rezised at any point during a user's visit (same as the site above).
I have been setting the position of the buttons and all other elements using, for example :
myBtn.y = stage.stageHeight - 100;myBtn.x = stage.stageWidth - stage.stageWidth + 50;
For publishing I use noscale, 100x100 percent, top-left justification.
I have two boxes on the stage. These two boxes together are converted to graphic. Each of the box - lets called "A" consist of some kind of surrounding (the line around the box for which we set up[ stroke) which I will cal "B". And inside that box theres another box of different color - I will call it "C", with different surrounding - call it "D".
(It is inside the first one).The other box from that graphic looks the same, but has different names. "E","F","G",and"H" respectively. All of the elements "A","B","C",and "D" forms a button. I have some code to use it.(with event listeners) My question: If I would like to change the colour of the element "B" (which are a movie clip), how will I code it.
ActionScript Code:
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.utils.Timer;
var urlLoad:URLLoader=new URLLoader();
[Code] .....
And it tells me: Access of undefined property B...
The code works fine for whole button(A). A changes color, but I would like only the surrounding to change the color. I guess I have to put some path in there, but I am not really sure how to.
Here is the problem I have: after I change the index of one movieclip using this code
oldIndex=getChildIndex(DisplayObject(e.target));
setChildIndex(DisplayObject(e.target), numChildren - 1);
when I give the object its old index
setChildIndex(DisplayObject(e.target), oldIndex);
and go to another frame of the movie, this element I have changed the index of stays on top of all elements on the new frame. My question is am I doing something wrong and if not, what can I do so that this element stays only in the frame it is placed.
I'm working on a full browser flash site and it works great, its got a 1000x650 movie in the middle centred in the html and the background colour of the movie fills the rest of the stage, no margins, no mess!
Thing is, I need a black overlay to fade in (to put other content over the top) Thing is, the black box only resizes to the size of the stage not the full browser window! Heres the code at the moment:
// Stops the stage from scaling with the browser window.
[Code]...
it's possible to change the default key (space bar key) to execute the action of the focused element in the stage?If you ever worked with the Focus Manager you've possibly seen that when you press the space bar the focused item is "executed".Can you disable that "executor" or can you change the space key with the enter key?
View 2 RepliesI know that there is no such function as getElementByName in Flex but I also now that you can do this["object_id"] to get the element of the application u're in.What about getting an element inside another element?I've tried making element["id"] ? But in my try-catch it always runs the "catch" part..how do I get an element inside another element just having it's id in dynamically created string form?
View 2 RepliesI have flash where there is a link for song download. And, at the bottom of the flash I've a count, loaded thorugh flash vars which should increment everytime donload button is hit. Please let me know what approach should i take to do that. can i call a Java method on donload button which will insert a row in the table and and then get the count and render it to the count variable in my flash?
May be this extremely confusing. Here is a very similar example on how it is done. This is actually very similar to what i want to do. [URL] on this link there is count below which increments you hit the download button.
I've built a rather robust tooltip class recently that attaches and draws a single tooltip sprite to the root, then uses MOUSE_OVER to detect when it is over a tooltippable object, and shows the appropriate tooltip text. At the moment, I'm ensuring that any elements in my application which wants to take advantage of showing tooltips implement the ITooltippable interface, and expose a public getter, get tooltip().
[Code]...
Basically I have 14 text boxes, each box draws its content from an external txt file. Next to each text box is a button. I want the button to be either visible=true or visible=false depending on weather or not the text box has content or is "undefined" Here is what I have so far, and it's not working:[code] I would like a FOR loop to just run through the variables and check to see if any of them are undefined. if it is, then make the correct send button invisible.
View 8 Replies<root>
<function name="lala">
<metadata name="foo" />
[code].....
I am unable to access 2nd element and 3rd element (I can acces 1st element.[code]
View 1 Replieswhen I create an element with this method :
this["nodeValue"+i] = new TextField();
(surely in dynamic class )
then I want to change instance name of that element.when I trace this["nodeValue"+i].name.I got a different name for that element ! f ex : instance8 .how can I get "nodeValue"+i from my element and change that .is it read only ? I want to swap tow element's instance name !
for example :
this["nodeValue"+i] to this["nodeValue"+i+1]
I am having a problem with my drop traget. I have the ability to drop and duplicate multiple objects on a stage. I have a clip set up (canvas) which is used for if someone drops objects onto this it duplicates the dragged clip.
However the problem I am having is that if someone tries to drop an element on top of an already drop/duplicated element, it wont duplicate the new clip. Its like it thinks that the dragged clip is not over the canvas.
Is it possible to get the id of a swf's containing element? I'm pretty familiar with DOM scripting, so any kind of reference to the swf would be fine. I need to initialize registration of the swf to an array in javascript
View 3 RepliesI have a reference to a XML node which is part of a bigger XML tree. Is there a way to get that elements next/previous sibling without accessing the parent and looking for it? Something like DOM's nextSibling would be what I look for. edit: Given that there is no natural way to do this with E4X, I'll just stick to the following (except that in my case, I'll store the actual index somewhere instead):
[Code]..
i want to access an Element of an XML. But somehow. i get null as the Result and that does not make any sense to me.
View 1 RepliesI have an XML string, I can use this to get a value of an element, where i is a counter: trace(xml.player.child(i));
But how can I get the XML element?
I have several animated movies (counties in Ireland actually) that when clicked animated up in size and display some information. I then have a button to the left that I would like use to animate the movie back to its original size i.e. close it. Thing is that I would like to pass the name of the current movieclip to the button and use it in a function. I had thought of using a switch statement but id need 26 of them for this function alone. Solving this would reduce my code a lot. My attempt is as follows:
[Code]...
I know how to get one element from the array. But I don't know let's say how to take 3 elements ( position 0,1,2). I don't know how to trace all the three together. I am getting errors all the time.
var myArray:Array = [1,2,3,4,5];
trace(myArray[0]);
trace(myArray[0], ?,?);
I have an array like this
public var dataAL:Array=[
{Kiv:"cash", jan:26,janTarget:28,feb:27,febTarget:26,mar:30,marTarget:32,apr:31,aprTarget:32,may:28,mayTarget:29,jun:46,junTarget:32,jul:37,julTarget:39,aug:40,augTarget:42,sep:41,sepTarget:42,oct:48,octTarget:49,nov:40,novTarget:41,dec:38,decTarget:40},
[code]....
Now if i want to access febTarget for cash how will i do it?
No matter what values of z-index I try, I cannot overlay my html div (or img) element on top of this flash animation (see top left corner)[url]...
View 3 RepliesHow do you set a variable attribute of a xml element?This is what I expected to work:xmlElement.attribute(variableAttr) = "the variable attribute is set to this string";
However, I'm getting some error that this value can only be retrieved as a reference and not set.Ofcourse, the following does not work either as it will look for the attribute named "variableAttr" and not for the attribute named after the value of the variable variableAttr:
xmlElement.@variableAttr = "example";
When you do a "for... in" loop, it will iterate over a Dictionary for example. I was wondering how internally this is being tracked and how it could be accessed?
I think the Dictionary class stores a reference to the first item, but I would like to access it and check but I cannot figure out how.
I have a screen with a few components (textInput, textArea, checkBox). I want to check if there has been any changes to the components. Foe example if text has been entered or checkbox has been clicked. Is there a direct way to do this instead of checking value of each component and then setting a Boolean for this?
View 3 RepliesHow can add element to array in ActionScript3
If i have an array: var myArray:Array;
How can add element to this array "myArray", something like this:
myArray[] = value;
My second question is: How can compare if variable value exist in array element value?
Something like in_array function in php
I've got a spark list that gets dynamically filled.So far the new items appear at the bottom of the list. What I'd like to do is to add them at the top.The items in the list have a unique ID so some kind of sorting mechanism would probably do the trick as the new items have a greater ID than the old ones.What I'd like to avoid is some complex method behind this as I'm working on a mobile platform and the list can get quite big so I need this to be as efficient as possible.The list's data provider is an ArrayList that gets updated using binding.
View 1 Replies