Foo = Bar (but Not Permanently)
I thought I was getting good at AS - somehow I missed something really fundemental.
It boils down to something like this:
Code: bar = "Hello World"; foo = bar; bar = "Goodbye World"; trace(foo); Where my output is "Goodbye World"
Somehow foo = bar makes foo an alias of bar rather than inheriting the property of bar.
Now I know that if you run this script, "Hello World" is in the output, but what I am actually doing is using LoadVars (via dataLoad) and setting:
Code: textField.text = dataLoad.foo; dataLoad.foo = bar //although this happens through a sendAndLoad PHP call trace(textField.text); --Output: value of bar
When I change the value of foo inside dataLoad, the value for textField.text changes. So what do I do if I want the text field to retain foo's original value?
Thanks in advance!
FlashKit > Flash Help > Flash Newbies
Posted on: 12-08-2003, 06:46 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Substituting Permanently
This drives me crazy. I open a file; get warned about missing fonts, so I remap to something else. Then I SAVE AS in hopes the remapped fonts will stay spec'd but, I open the file later and though the previously remapped fonts show in the window, the file is still looking for the original fonts.
Isn't there some way to tell Flash, "hey numb-nuts, I chose new fonts and I want to keep these?"
Permanently Move A MC
I have a problem to permanently move a MC across the screen. Here is the code so far:
var mousex = _xmouse
var mousey = _ymouse
var speed = 20
onEnterFrame
if ((mousex > 10) && (mousex < 210)) {
_root.mc_test._x += speed;
}
It works... after a fashion. The moment my mouse comes between 10 and 210 pixels the MC does move 20 pixels to the right. The problem is that when my mouse goes out of its locations the MC goes back to its original location.
The idea is that a) the MC keeps moving 20 spaces for as long as the mouse is between the coordinations and stay at the location when i leave them.
Any help is apreciated.
Turn Off ALL Music Permanently?
does anyone know of a simple script that will allow the user to turn off the background music from anywhere in the site?
i have it set so that different sections each have their own "soundtracks", and there are 'music off' buttons built throughout ... but each must be triggered individually to shut off the music in that section.
i am curious to know if there is a way to create, say, a keyboard shortcut that will turn off the music permanently from anywhere, for the entire site?
thx
viggaz
Delete Movieclip Permanently
Hi,
I have a problem with deleting a movieclip permanently from Flash. I have used removeMovieClip() functions that does clear the stage nicely but Flash somehow leaves some infromation to the player.
Is there anyway to delete (garbage collect) the movieClip permanently?
Thanks
FC
How To Make A Textbox Permanently Focused?
I want to build a search function in my flash movie, so that when you type 1 character the searchbox pops up and is focused. But the problem is that when i use this code:
Code:
listen = new Object();
listen.onKeyDown = function() {
if (!uit) {
Selection.setFocus(zoekvak);
uit = true;
}
};
Key.addListener(listen);
only the second character i type appears. How can i manage that the textbox is allways in focus, even when i click in other places in the movie?
Permanently Duplicate Dynamic Image
hello guys, i need help again. i've created one flash banner with xml driven to pull the image from the folder. the xml file included with the list of the images name and path,then i'm created the banner using the .loadMovie() function. now,the problem is, i need the banner hold the image from the folder even when the source image was removed, so,the banner just need one time to read the image information, without need to read again the xml and doing the loadMovie again while its run for the 2nd time.can anyone help me?thanks.
Load Image To Library Permanently
Hi Guys,
at the moment im creating simple application from flex to flash, main goal is to create a new swf with some images loaded on run time.
so far i manage to make the swf work, by linking the image with loader/addchild method, however this method its not good for several reason, cause it need another external file to display correctly(the image), and when u move the file u need to move the other file as well, u cant play the file only with a single swf
now i want to make the image is attached inside the swf, so it doesn't need to call the image whenever the swf is played.
my idea, is to load the image (at first run/build) into library, and display it by calling it from library, but needed to be flagged since on the second run it will do the same routine and load the image again.
i hope im making any sense here
and my million dollar question is......is it possibble to do?
rgrds'
zack
Replacing Substituted Fonts Permanently
So I forget to activate a font in Suitcase before opening Flash. I choose a substitute font.
The font is actually removed off the server and no longer available for me to even activate.
So, upon opening the Flash document again, I get the message about a font not found. I choose to replace (through the Edit/Find/Search but it doesn't get saved with the Flash document because next time I open the doc, it says the same thing.
Isn't there a way to globally replace a font for good instead of having to select each element and re-apply the new font?
Making A Button Disappear Permanently
Any help on this would be appreciated. What I'm doing is trying to make buttons disappear permanently once clicked. I tried using the
ActionScript Code:
on (release) {
button1._visible = false;
gotoAndPlay (2)
}
code but at the same time Im making the button invisible, I'm also attempting to make a jump to a different frame. Now when you get back to the frame with the button on it, it is visible again. How would I go about making the button invisible permanently after it has been clicked? I appreciate any help you guys could give me.
Change RGB Color To A Button Permanently.
Hi. I've got a small but probably very simple problem.
I've got 5 images that appear in order when I click
for example image nr 2:s button "b2"
The thing is. The buttons are just simple grey shapes with no names on them, so I want the button clicked to change it's RGB color to a darker grey and to stay that way until I click another button.
How can I do this?
Yours sincerely Marcus Brunström
Permanently Duplicate Dynamic Image
hello guys, i need help again. i've created one flash banner with xml driven to pull the image from the folder. the xml file included with the list of the images name and path,then i'm created the banner using the .loadMovie() function. now,the problem is, i need the banner hold the image from the folder even when the source image was removed, so,the banner just need one time to read the image information, without need to read again the xml and doing the loadMovie again while its run for the 2nd time.can anyone help me?thanks.
Secret....Eliminate This Problem Permanently..Enjoy
Hi,
Having problems with Margins....I've seen a lot of queries on this issue here.
This is the easiest way to do it. It will solve your problem forever.
Just go to the macromedia site & go to the extensions section. You will find extensions for various applications.
Download MX 139558_noMargins.mxp.
Then install this extension on your comp. What this will do is to put another option in your publish window ( HTML template ). This will say Flash only ( No Margins )
Just choose this option whenever you publish your files.
This will stay in your comp as long as you want it to.
I know this will solve your problem. It permanantly solved
mine.
KEEP FLASHING....& ...DESIGN THE FUTURE.......ENJOY......
Raj
Permanently Storing Variables In Flash Movie Possible?
is it possible to permanently store variables in a flash movie, so even though someone writes them, everyone that goes on the page will be able to see then? I'm trying to create an updatable news section in my flash movie.
Permanently Highlighting Items Inside A Listbox?
Hey guys,
Came across yet another obstacle today and was wondering. How would i permanently highlight specific items stored within a list box (flash component) if, say an error occured. Moreover, how would i highlight them red instead of green?
How To: Click Each Button, Text In Other Place Appears Permanently
How can I create a button, that when clicked, causes text to appear in another place, like to fill a cell of a table?
While that text stays in that cell as the user moves the cursor away, the user then clicks another button and then second text appears in another cell of a table? In this way as they click 5 buttons, five cells are subsequently populated with text?
I know how to do a rollover, but this is different. Once the text invoked appears from clicking the button, it stays.
ANOTHER POSSIBILITY:
accomplish the same thing so that when the user clicks button 1, a disjointed rollover occurs but the rollover stays stuck in displaying the text in the cell of a table.
Then, while that text stays there, someone clicks the second button and the associated rollover text appears and sticks...
and so on...
Saving External Data Internally (permanently) On Publish?
Let's say that I have a FLA that references an external text file somehow (whether through LoadVars() or through some other construct that I'm unaware of). Is there a way so that, on publishing to SWF, it can permanently store the data from the text file in itself (let's say inside a set of variables) without needing to further reference an external file? Or am I just S.O.L. in this department and need to either keep the text internal (hand-coded in) or external (via PHP/ASP, etc)?
|