ActionScript 3.0 :: Having Flex To Do Function Everytime It Appears
May 6, 2009
I've noticed if I use initialize="myfunction()". Once "myfunction" has ran it will never be ran again if i use initialize. I need to reset a form basically. Or anything else I can use instead of initialize that will run the function every time.
View 1 Replies
Similar Posts:
Sep 20, 2011
I am currently working on a picture slide show tutorial and i fully understand whats going on, except when a variable that gets placed outside a "for" loop that gets used within the "for" loop to create multiple loaders. Secondly, i would of though the newLoader function would of needed a different variable everytime the loop increments? I know i'm so incorrect but I was hoping someone would straighten me out on it here is the code too
[Code]...
View 3 Replies
Sep 1, 2006
I have a blank container mc into which I am loading JPGs after you click on a button. There are 10 buttons in the movie, each associated with a different JPG.This container_mc is part of a function called on the main Timeline.The Flash movie is 1 frame on the main Timeline. This code works correctly on the first JPG when I click on a button for the first time), but then when you click on a different button I believe it just uses the dimensions and coordinates of the first JPG. How can I reset or refresh (unload, reload) this function so it works correctly every time I load a new JPG?
//after full size image loads into detailthumb_mc,
//resize image so that neither width nor height is > 150, tben recenter
onClipEvent(load) {
var maxWidth = 150;
[code]....
View 2 Replies
Jul 20, 2009
The problem i am facing right now is a filename.php generates filename.xml.... and this filename.xml is called in my Flex Tree.Now everytime i update my DB, the values are not getting reflected into filename.xml unless i call the filename.phpNow how would i call filename.php from flex which will make the update of xml
View 1 Replies
Dec 19, 2011
I have a component A in my flex project where people can vote for their favourite artist. Someone "likes" an artist, it get's updated in my database. There is also a component B that shows a chart of the most liked artists. I call the data from the database on creationcomplete in Flex. The problem is that when a person first votes on an artist, it will not be visible in the datagrid untill the user reloads the main page (?) or reopens the entire application. So i was wondering how i can update the datagrid everytime someone adds a vote to my database. I'm now using an update button, but that's not very user friendly of course.
View 4 Replies
Aug 10, 2011
Maybe the title is not self explanatory but in most iphone games eg you click the correct example and you see a +100 points mc appear and rise and alpha out. I did this with a png done in photoshop BUT not all goes well - it doesn't work.
[Code]...
It seens perfct but I can't see it work. The funny thing is that the custom currentBubble - with a dot after you see the code hints but a dot after pb100 - you see no code hints. Well not normal.
View 2 Replies
Feb 15, 2011
I have encountered somthing a little strange in flex, possibly somthing im doing wrong but im not sure. In two cases which i have noticed, when there is only 1 item in a s:List or s:DropDownList for some reason when using list.selectedItem it appears as null. Using requireSelection="true"i know this isnt the case.
[code]...
View 1 Replies
Aug 11, 2011
I'm working on a spherical movie viewer in Away3D & am having a problem when I apply a VideoMaterial texture to a 3D primitive. The video appears heavily pixellated, like it's being scaled or hugely compressed. When I apply a BitmapMaterial of a single still image from the video it appears fine, so I don't think the resolution of the video is the problem.
I found [this discussion][1] suggesting a solution by specifying the "fixedHeight" & "fixedWidth" when I call the constructor, but those arguements seem to have no effect, and I can't find them in the API either. I do see something called "lockH" & "lockW," [in the API][3], but I they don't seem to have any effect either.
[Code]...
View 2 Replies
Jan 29, 2011
Searching for "8kHz" yielded two results but doesn't show the search result titles or the links to get to the post, though it does show links to the forum itself and the user who posted the result. Same results no matter what I searched for, though if I initiate the search initially from the top level Forum, the search results work as expected.
View 1 Replies
Nov 25, 2010
I am using an mx:DataGrid with a dataProvider to display Rows. I have checked the no of rows in my array ( which is 8 ) and the no of rows in the dataGrid. They both match, however I always get an extra blank row at the end of my data grid. How can I remove this row?
View 2 Replies
Jan 26, 2011
Is there a way to reverse the order of the items in a comboBox? I'd like to use index numbers to refer to items in the arrayCollection below. I want the newest content to appear first in the comboBox. But, if I add something above the first item then all of the index numbers will be off by one. If I could add a new item to the end of the arrayCollection, but have it appear first in the comboBox drop down that would solve a lot of problems.
[Code]...
View 1 Replies
Nov 21, 2011
After changing the Flex SDK to 3.6 (from 4.5.1) so as to target Flash player 9.0.124, the project no longer compiles, producing spurious errors such as XML does not have matching begin and end tags leading me to believe that the compilation process is 'borked'.
This is a pure AS project, and so should have no dependency on the Flex SDK, howver, it seeems to be inextricably linked to the Flex 4.x SDK and Flash Player 10+. I have tried swf-version and -target-player-version in the compiler arguments, but there is still something I am missing to get this to compile for Flash player 9.
View 1 Replies
Jul 21, 2011
We have a small flash application that has an text box.
under OSX Lion, with flash < 10.3.. it works fine
with OSX Lion and Flash 10.3.. every character typed to it, appears twice.
View 3 Replies
Mar 21, 2010
ive created an animation sequence in flash but for some reason everytime i drag across frame 426 it hangs and i see the rainbow circle thing. the animation includes graphic symbols of charecters. im pretty sure it has to do with a certan symbol that has a lot of keyframes on motion tweens. is there anything i can do to clean it up?
View 6 Replies
Feb 17, 2009
I have a var defined and that is colour var colour = 0; and I want to increase var everytime you press space so I have an invisible button with this code in it
on (keyPress "<Space>") {
colour+1;
}
This is so that I can advance in a movieclip. I have the code for that here:
onEnterFrame; {
if (colour == 1) {
head.gotoAndStop(1);
}
[Code].....
View 5 Replies
Apr 28, 2011
I am using for a project. My problem is when I trace the stageRef.width in the constructor and in the function both of them output different values. My stage is 980 x 700 pixels but whenever I trace something related to dimension such as x,y,width or height I got corrupt results.[code]
View 2 Replies
Dec 20, 2004
i made an animation for my preloader.it's 5 boxes and i want it to change color one by one everytime when the load percent reached like 20%,40% and so on..can i use if(Math.floor(perc) == loaded percent) function or there's some other solution for this??
View 1 Replies
Dec 9, 2009
I have a Flash movie that I need to jump to a one of 6 chosen frames when say a user hits the back button or home in the site. I just dont want the same user seeing the flash movie replay in the same spot everytime they go back to home.
Here is what I have scripted:
var numbers:Array = [2,114,415,687,960,1195,1485];
_root.firstTime = true;
if(firstTime) {
firstTime = false;
[code]....
But this keep jumping to frame 1 each time i hit back or refresh.
View 7 Replies
Aug 18, 2010
I have a Flash movie that I need to jump to a one of 6 chosen frames when say a user hits the back button or home in the site. I just dont want the same user seeing the flash movie replay in the same spot everytime they go back to home.Here is what I have scripted:
var numbers:Array = [2,114,415,687,960,1195,1485];
_root.firstTime = true;
if(firstTime) {
firstTime = false;
[code]...
But this keep jumping to frame 1 each time i hit back or refresh.
View 2 Replies
Feb 10, 2012
I use movie clip as a button. Inside movie clip there are two movie clip, each one for a separated condition. On mouse over it goes on white one.On mouse out it returns on blue one.If it is pressed it stays white.Mouse out doesn't fire every time. It is placed on the white movie clip. It fires in 90 percent.Movie clip contains shape and two images inside.
View 5 Replies
Feb 17, 2004
i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.
I.E Score is displayed in a dynamic text box and everytime the enemy is hit the:
[Code]...
View 2 Replies
Jan 17, 2006
I am new to flash programming. I have to create a flash card game for a client.There are 52 cards with back showing in 52 rectangles. Each time the swf loads the position of the cards has to be different (randomly placed) in those 52 rectangles. Click on the card and the face of the card shows. Also an option for shuffle. When the user clicks on shuffle, the cards are randomly placed.
View 1 Replies
May 21, 2007
I am loading in externals swfs and everytime i load the same swf (click a different button than go back to it) its speed increases
View 2 Replies
Jun 22, 2009
I have file with attachMovieClip repeated via setInterval. Even after I do removeMovieClip, the interval becomes faster everytime I press load button. Already did a search on the forum and found something, but to no avail. Following is code, and i have attached files.
[Code]....
View 1 Replies
Feb 2, 2010
I have created buttons with this Actionscript. They load in the external swf's fine, but when I click on them again they load them in again, and again, and again... What do I need to write in the code so it loads in fresh everytime you click on the button? (or in other words, cleans up the load in page before it loads in new files).
[Code]...
View 1 Replies
Jan 24, 2009
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.I have about 20 layers with images transitioning into each other.URL...Anyone have any actionscript that could generate such an effect?
View 6 Replies
Mar 2, 2011
I'm trying to create a scoreboard. Lets say 4 persons are playing, I made 4 textfields on the stage, named them scoreOne, scoreTwo, etc. Now I want to add 1 point to this textfield everytime I press a numpad. So, when player 1 earns a point, I'll press NUMPAD 1 and this point will be added to the textfield. Well, I wrote this code, but it only works once. I can use it for every player, but it's not possible to give them more then 1 point. What's wrong in the code?
I also tried to create a var, which stores the score. Isn't it easier to use a code that shows the var in the textfield, and if, how to do this? So far as I wrote the code the var isn't used yet, the only thing visible on stage is the (scoreOne.text = "" + 1;) part.
[Code]...
View 2 Replies
Apr 6, 2006
Right now I'm in the process of building a drum machine in Flash. The interface is based off of combo boxes and data that I load into the combo boxes. Depending on what you choose in the combo box, a sound should play at a certain interval. I have that part working perfectly. When you click the element of the combo box, the sound plays, and my set interval function calls.
Now the problem I am having is actually clearing the setInterval everytime you change the element in the combo box. I am using a listener set up to find when the combo box changes, I know it has something to do with when I clear the interval, but for the life of me I can't figure out how to clear it when the listener is called.
Here is the listener function I am using to call setInterval:
[Code]...
outside of the listener, and then took away the 'var', from in front of dbInt1 = setInterval..... and it works perfectly. It seems like a really weird way to do that though, and doesn't seem like it would be in good coding practice to do that.
View 2 Replies
Apr 20, 2010
Is there a way to avoid this? I import A LOT of bitmaps all the time and it's really really annoying to have to delete the graphic symbol flash creates with it.
Couldn't find a way to toggle this "feature" off in preferences.
View 1 Replies
Jun 16, 2004
im using the following code for my main four buttons.[code]it also gets removed due to a slide down menu refresh everytime a button is pressed.
View 4 Replies