ActionScript 2.0 :: Make A Function That Will Not Lose The Values Of The Variable Before Calling It And Will Not Lose Them After It Is Finished

Dec 2, 2004

how to make a function that will not lose the values of the variable before calling it and will not lose them after it is finished. example.

[Code]...

View 4 Replies


Similar Posts:


Lose My Stops In My SWF

Sep 18, 2009

I have made a preloader, yet when i bring my SWF in that i want to load, it loses all the stops that have been put int it? So it just plays all the way through?

View 1 Replies

Professional :: How Much Lose Saving CS5 File As CS4

Apr 4, 2011

I have a presentation to do using Flash on Wednesday and have been warned by my university that files MUST be in CS4 format. So, having used CS5 to create the whole site/presentation how much will I lose back-saving it to CS4? I'm worried I'm going to have to do a lot of the same work twice.

View 2 Replies

ActionScript 3.0 :: When I Publish Swf I Lose The Music?

Nov 20, 2009

when working in flash i use the below code and it works fine.However when i publish the file on the web using visual studio i lose the music? is there something I'm missing do i need to move the mp3 file somewhere so that is accessible to the swf file?

Code:
var soundReq:URLRequest = new URLRequest("matrix.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();[code].....

View 7 Replies

ActionScript 3.0 :: Lose MouseEvent After Creating New Class?

Apr 10, 2009

I have a main class that generates three clickable textfields (lessons). Clicking a specific lesson starts the appropriate lesson.  However, once the lesson starts, I am unable to detect any mouseevents.  I do not use any mouseevents in any of the lessons so I am baffled about what happened to my mouse eventlisteners. Even though I can see the nextLesson button, nothing happens when clicked. If I click it before starting my lesson, my trace indicates that I have clicked it. Do I need my lessons to somehow self-terminate when done and if so, how would I go about this. I currently use the browsers back arrow to terminate the complete session. 

View 3 Replies

Lose Control Of Video In Fullscreen Mode

Apr 22, 2010

I'm having an issue with an FLV video playback in a scene. When I go to fullscreen mode, I seem to lose the ability to adjust the video object.

I am loading a new video via FLVPlayerback(). Since the video is being loaded into the scene on top of everything else, I use swapChildren() to put my button back on top of the video. When the video is done playing, I removeChild() the video.

This works in the normal playstate.

However, if I am in fullscreen mode, swapChildren() and removeChild both do not work. If I exit fullscreen mode, they are indeed working.

View 1 Replies

ActionScript 2.0 :: Lose The Cursor Image Completely?

Aug 17, 2010

I have made a game, using a new cursor image,But for some reason it's showing both? The cursor and the image? How do i lose the cursor image completely?

View 1 Replies

ActionScript 3.0 :: Lose The Informations Of The 'shopping' Bag Of Customer?

Feb 20, 2012

I have a strange problem with LocalConnection.Situation: A sample e-shop. I have a parent .swf who load 3-4 external swf.In a external swf (let's name it "X") u can order items u want.

Because i don't want to lose the informations of the 'shopping' bag of customer when the parent swf unload the 'X' and load something another (for example "contact us"), i use localconnection with both duplex between parent swf and 'X'.

Problem: In the swf "X" i have an array "Bag" which holds the id of items the customer clicked to buy. When change the external swf, i send via localconnection to the parent .swf this array (done, i tried with trace).

[Code]...

View 3 Replies

ActionScript 2.0 :: Buttons Lose Focus Passing Data

Jun 7, 2006

Very strange. I'm using the following function to pass characters to 2 text input components, but sometimes (and much more often with the "Password" field), after I click a button, the button loses focus and I have to move the mouse to regain the rollover state and be able to click the button again. When I've lost focus, if I click the mouse, it just changes the button to the rollover state but doesn't pass the value...

Here's the code:
var Focus:String = "";
function KeyPadButtonClick(_id:Number) {
// default the focus to the UserID
if (this.Focus == "") {
this.Focus = "UserID";
[Code] .....

View 3 Replies

ActionScript 2.0 :: All By Buttons Lose Their OnRollover Focus After Using GetURL?

Jul 7, 2007

After a user clicks a button the getURL passes some variables to a js function that displays an html lightbox type effect. After closing the lightbox and returning to the page underneath all of the buttons are now no longer clickable

View 2 Replies

Flash :: Lose Control Android's Webview When Resuming The Application?

Dec 27, 2010

basically, what am doing is that am running a flash file (playing music) in the background of the app using webview, and when I want to stop the music , I just load "about:blank".I want to keep the flash file running (music) when my app gets paused (which works fine so far) the problem is when the app resumes, pressing on pause button launches a new webview instead of changing the link in the previous one and the sound doesn't stop.the only solution I found was to kill the process and restart the app, but that's not practical, any idea of how to still be able to use the same webview when resuming the app ?

Update: guess I wasn't clear enough, I have a webview widget stated as "gone" , I only need the audio form the flash file I'm running in the webview so the "play" button loads a URL that contains the flash file (so the user only hears music, and doesn't notice that I'm using a webview), when I press the back/home button the music doesn't stop (I like it that way) but when I go back and press on play again it loads another url in a new page, you get double music

View 1 Replies

Javascript :: Lose Focus On Embedded/Flash Element/tab In Firefox?

Mar 20, 2011

Without AutoHotkey and Firefox -unfocus since it's involved in operating another program and it doesn't work on linux and without Restore Window Focus After Flash addon since doesn't give you control over flash tabs.implementing this gBrowser.selectedTab.unfocus(); method and bind it to a keystroke in Firefox v3.6 ?I've also tried (based on the addon above)

if (document.getElementsByTagName("EMBED").length == 0) {
return;
}
if (document.activeElement.tagName == "EMBED") {

[code]....

View 1 Replies

ActionScript 2.0 :: Detect Flash Lose Focus (mouse Rollout Swf)?

Jul 29, 2005

I want my flash movie to go to a specific frame when the user moves the cursor away from the actual swf file (rollout) in the html page.
I tried different things, for instance having a big transparent movieclip in the background and use hitTest:

//this code is in the root level
this.createEmptyMovieClip('penCheck', 100000);
this.penCheck.ref = this;
this.penCheck.onEnterFrame = function() {

[code].....

This doesn't work until the user clicks outside the flash (flash loses focus).

PS: No Javascript allowed. Just AS.

View 1 Replies

ActionScript 2.0 :: Dynamic Loaded Smooth Bitmaps Lose Transparency

May 26, 2009

I am loading some bitmaps(transparent pngs) that I want to scale and remain smooth. We all know the problems with flash player 8+ anti-aliasing the images and not allowing the images to be forced to be smoothed. I want the png to retain its transparency. I use flash8 actionscript 2.

Here is the PHP Code:
var mclis:Object = new Object();
//An object that listens for a callback notification from the MovieClip Loader event handlers.
mclis.onLoadInit = function(target_mc:MovieClip) {
thisHeightInit = target_mc._height;
thisWidthInit = target_mc._width;
[Code] .....

View 2 Replies

ActionScript 3.0 :: Force Flash Player To Lose Focus (probably By A Hack) Without Using ExternalInterface?

May 21, 2010

I need to be able to make the flash player lose focus to the browser by actionscript alone (when the user clicks a button) or whatever, but from within the flash player, not from the user actually clicking outside of the flash player.These are embedded flash files with allowScriptAccess="never", so I can not use ExternalInterface at all to call browser js to window.focus or whatever.

View 0 Replies

Actionscript 3.0 :: LocalConnection - Lose The Informations Of The 'shopping' Bag Of Customer When The Parent Swf Unload The 'X'

Feb 20, 2012

I have a parent .swf who load 3-4 external swf. In a external swf (let's name it "X") u can order items u want. Because i don't want to lose the informations of the 'shopping' bag of customer when the parent swf unload the 'X' and load something another (for example "contact us"), i use localconnection with both duplex between parent swf and 'X'.

Problem: In the swf "X" i have an array "Bag" which holds the id of items the customer clicked to buy. When change the external swf, i send via localconnection to the parent .swf this array (done, i tried with trace). And when the parent loads again the external .swf "X" , it send again the same array via localconnection to "X". The "X" receives it right (done, i verified it with trace). The strange is.. when the customer clicks another item, the array resets to zero!!!

[Code]...

View 2 Replies

ActionScript 3.0 :: Dynamic Sprites With Perspective Lose Mouse Event Functionality?

Oct 20, 2009

I really don't need happening after spending a week figuring out why some code didn't work, only to rewrite it and have it suddenly start working. I guess it's the classic case of running into more, more serious problems right after making an extremely good breakthrough!.Anyways, my problem is that my dynamically drawn sprites with the PerspectiveProjection property set on each, all of which are contained in a movieclip (which is at stage-level), no longer have MouseEvent functionality - at this point, I think anything past regular Events no longer work, but my stack of important issues eats up all time I have to test.

Before I started having issues, I was using just a scale effect to simulate the 3D-ness of the movie. After figuring out why past attempts at using Z axis on these sprites failed, I decided to add the perspective part to the transforming of each of these sprites. Ever since then, Mouse functionality just simply does not work. No errors are thrown, no runtime errors are displayed, yet the trace function does NOT work within the functions (meaning it isn't the content of the function not working) - simply does not want to do anything!Other animations and such work perfectly fine - i.e. tweening the X, and Y values, etc

View 1 Replies

Professional :: Exporting Flash With Transparent PNG As Background-SWF Appears To Lose Quality/faded?

Jan 17, 2012

I cut up parts of a web page background to do some menu animating in Fireworks on the left side, and the right side to have a slideshow on top of a transparent PNG background.  Then I bring both together in a Dreamweaver file, within a DIV so it looks seamless.  This has worked fine before, and it exports okay, but I noticed that putting the two "parts" back together side by side that the SWF background is somewhat faded compoared to the Fireworks HTML.  I've tried changing the Publish Settings and I've tried changing the PNG file property in the library to both "enable smoothing" and "Lossless Compression", but nothing seems to fix it.  My next option is to make the PNG the background image of the page when I bring it all in to Dreamweaver, but I'd like to know if this can be fixed for future reference.

View 1 Replies

ActionScript 3.0 :: ButtonMode = True - Roll Over The Number Area Lose The Hand Pointer

May 25, 2010

i have an mc on stage and im creating some buttons into this holder. the button is just a white square with a text field for a number above it. If i remove the number I get the hand pointer, but if I dont whenever you roll over the number area you lose the hand pointer. i

[Code]...

View 2 Replies

ActionScript 2.0 :: Flash And Javascript Variables - Lose The "document.write('0');"?

Jan 13, 2005

I have a text file at a remote URL which is populated by a javascript statement. The text file looks like this:

[Code]....

myFile.load("[URl]"); This loads in the txt file just fine, but it loads in everything. Is there a way for me to lose the "document.write(' 0 ');"and just send the "92" to the dynamic text box?

View 1 Replies

Professional :: Flash CS4 Can't Open .fla Files Or Lose Files/graphics?

Mar 20, 2010

I installed Flash CS4 Professional trial version for school use.  It wouldn't install successfully.  I deleted the font files the troubleshooting guide said to, tried again, but gave up. (I'm afraid to run regedit and mess up everything else I have loaded.)  (I previously had the Fireworks CS4 trial version loaded, then uninstalled it.)  My problem is this- I have it running, but it saves files and then they can't be opened, even if I use the save function often- it's worse when I create the file, test the movie and then save.If I try to open it again, it says "cannot open file."  Once it opened a copy I had saved, and it appeared blank, even though it was 544 kb file size.  I only need it for a few more days, one more assignment and I'm afraid my previous files are corrupt.  I have Windows Vista Home Edition.

View 4 Replies

Actionscript 3 :: Return Values From Calling A Function Using Lua Alchemy?

Jan 17, 2011

Im calling a function in lua from actionscript using callstack : Array =

luaAlchemyInstance.doString("luafunction");

my function should return some values

function luafunction()
return true, 125
end

When i look at the callstack array returned by the function in as3,I recieve only the success/fail part.The array length is 1, true, and contains none of my return values.

View 3 Replies

ActionScript 3.0 :: Calling Variable In One Function From Another

Dec 6, 2011

I have a function that has a For Loop inside it. Inside that For Loop I am defining a button and calling to another function if clicked. The issue is (since I shouldn't put functions inside other functions) how do I get the variable being processed in the For Loop to be considered in the function that was just activated by pressing the button.

Here's the code. All variable are defined elsewhere in the code.
function populateBox(DataInput:XML) {
linkAmount = DataInput.country[boxPartNum - 1].link.length();
/// defines amount of links being made
for (k=0; k<linkAmount; k++) {
myLink = new LinkClass();
[Code] .....
I need to trace the "K" used in the For Loop.

View 3 Replies

ActionScript 2.0 :: Basics Of Calling A Function With A Variable?

May 27, 2011

I'm trying to get to grips with having a function that can accept an input that is passed to it as it is called, and then use that input in its workings.As I'm writing more code, it's becoming clear that this is something that I need to pick up, but despite reading and playing about with it, I'm still a little confused.The code is designed for a character's "level up" screen. When the button next to a stat is pressed, I want it to pass the name of that stat to the statUp function, which will increase the selected stat by one.In my main file I have this code, to call the function when the button is pressed. (In this example, it is the Strength button)

ActionScript Code:
_root.buttonStr.onPress = function()
{

[code]........

View 6 Replies

ActionScript 2.0 :: Calling A Function Based On Variable's Value?

Feb 16, 2005

say I want to declare a global variable in my main movie on a mouse event (button) and give it a value "functionA".

then I want to load an external .swf into a clip (with the same mouse event)

then I want some code in the loaded .swf to execute a function of the same name "functionA"

how would I code this?

this way I could load the same .swf but execute different functions depending on which button triggered the load... comprende?

View 5 Replies

ActionScript 2.0 :: Pass A Variable To Function When Calling It With Interval?

Jan 30, 2009

How do I pass a variable to function when calling it with interval.

This:

Code:
doFlip(1);
to something like this:

Code:
myInterval = setInterval(doFlip(1),2000);

View 2 Replies

ActionScript 3.0 :: Make A Function Change The Values Of Its Own Parameters?

May 5, 2011

How can i make a function that changes the value of variables that are passed into it. For example:

[Code]....

I want the example above to add 5 to the variable pie1 (or whatever variable is passed in) and change pie2 to the cosine of pie3. Hope this makes sense :P

View 5 Replies

ActionScript 2.0 :: Make A Function Which Randomly Calculates Values?

Mar 2, 2004

I would like to make a function which randomly calculates values which I later use in the setTransform thingie.If I hardcode the random script (see the commented lines) it works ok.But the function won't work the values don't transfer.Below is the whole script of the enterFrame:

onClipEvent (enterFrame) {
if (something) {
function alco(arg) {[code]....

View 3 Replies

ActionScript 3.0 :: Calling FLV / F4V Clips In Main Timeline And Checking If One Has Finished Playing

Mar 30, 2011

I'm working on a campaign website and I need to catch the deadline by tomorrow! I'm stuck. I hope somebody here could help me. Here's how I want to do it:Everything will happen in the main timeline / main Stage.

1. I have F4V clips that I want to load into the FLV Playback, placed in the main timeline (stage), every time the corresponding buttons are clicked. The buttons with questions and their actions are each placed in their corresponding MC. (is it possible? And is it possible to load different flv clips in one FLV Playback?)

2. The user is asked a question, they will have to answer yes or no before they can continue. So if they answer yes, "yes.f4v" will play, no then "no.f4v" will play. Then the corresponding clip will play and the next question will have to appear ONLY after the clip is done playing. How do you check if an f4v is finished playing? Does it matter whether you use FLV or F4V? (I have this one worked, see the code below)

I have made 2 setups:

- Setup 1 is I place an FLV Playback Component in the main timeline and I am planning to load all F4Vs in it when a corresponding button is clicked.

- Setup 2 is I create swf's of all the F4Vs and load the swf in the main timeline on certain frame into a blank MC.

View 2 Replies

ActionScript 2.0 :: Calling A Function With An Array Variable As Arguments Is Resetting Array?

Oct 12, 2006

I'm going to post the full code of the two functions, disregard the "fluff" unrelated to the two functions as it is all working flawless, I've tested this HEAVILY and cannot understand why it keeps setting the entire array to undefined!

Code:
// processReplace Function
function processReplace(transferFiles) {
var processArray:Array = transferFiles.slice();

[Code]....

Basically it's supposed to check to see if the file exists and return as true if it does and add it to a replace array, then the replace array is processed into a single string and put into a dialog box through the flash wrapper prompting them to "replace the files or not".

It makes the replace array just fine, it actually even has the right "count" in it but it's setting all the "filenames" to undefined because of the exists = processSearch function.

I even tried to make a new array and run the search just from that one and set the values from the old one and it's still failing.

Is it because of the "break" or can anyone figure it out? Iknow it's hard because you can't use the code

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved