Killing The FocusManager In AS3
Hello there,In AS2/AS1 I can kill the focusManager of the components by using this trick: _root.createEmptyMovieClip("killFocusManager", focusManager.getDepth()); How can I accomplish the same thing in AS3?Thanks in advance BTW: if you are interested, here it is a "long" explanation why I need to do so. I work for a web-agency and we are trying to move (little by little) to AS3.Nice... but there are some real-work problems.For example a lot of coworkers of mine, graphicians, found it hard because they are used to put code on the timeline or over movieclips or buttons and so on... So, one solution is to develop the main container and every dynamic sections in AS3 and to leave statics sections in AS2 (static animations o semi-static clips programmed for example with "lmc_tween.as").Then I can load in AS3, the swf made in AS2.If, for some reason, they have to talk each other they can do it with the local connection.In fact it is exactly what I've done and all worked well. Problems arise when I use the components. Here there are two scenarios. Scenario 1 - solved- as3.swf doesn't contain any component but contains a normal input textfield - as2.swf contains a component (an inputText component) When I click on the inputText (in as2.swf) and then I click on the normal textfield (in as3.swf), the focus automatically switches back to the inputText... To solve this, after some tries, I decided to kill focusManager in as2.swf (using that trick above) and magically everythings worked! Scenario 2 - the real problem- as3.swf contains a component (an inputText component)- as2.swf contains a component (an inputText component) or as2.swf doesn't contain any component but contains a normal input textfield In this case I end up checkmated.It's nearly impossible to target the textfield or the input text in as2.swf after targetting the input text in as3.swf. I suspect that also in this case the FocusManager plays a role... so I think that disabling or killing it in as3.swf can solve the problem in the same way it is solved in scenario 1.However, how to do it is unknown to me.This is why I posted here.Any idea? P.S. if you want to try, here you can find the zip files containing the 2 scenarioshttp://www.genereavventura.com/hosted/Scenario1.ziphttp://www.genereavventura.com/hosted/Scenario2.zip
KirupaForum > Flash > ActionScript 3.0
Posted on: 11-30-2007, 07:35 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
FocusManager
got a form where each field is contained in its own clip (has to be this way).
i'm using focus manager to control the tab order of the input text fields within the clips. this works great until I load the movie containing my form movieclip into an empty container clip on the _root level. (feel like such a noob with a "it worked fine until i loaded into another level" question).
somehow the way the focusManager interprets focus has gotten screwy. I've been using _root.focusManager the entire time and assuming that if _root changes, the focusManager will still return a focused object with a correct path from level0 down to that object. But, I'm getting undefined now.
code:
Code:
keyListener = new Object();
keyListener.onKeyDown = function()
{
var keyCode = Key.getCode();
if(keyCode == 9)
{
trace("keyCode: "+keyCode);
clipHit = _root.focusManager.getFocus();
trace("clipHit: "+clipHit);
trace("clipHit._parent.ind: "+clipHit._parent.ind);
if(clipHit._parent.ind == laLength-1)
{
_root.focusManager.setFocus(inp0.inputText);
}else{
When standing alone, 'clipHit' traces out something like "_level0.myClip.anotherClip", but as I said earlier, when loaded into an empty clip on _root, I get undefined.
help!
FocusManager AGAIN
I have built a login window in a Flash application. The MC that is the content for the popup had two text field components and a button component. Initially, the button is disabled and the text fields have a listener that enables the button when both have some kinda text in them. The startup of the MC sets the tab indexes of the two fields to 1 and 2 and the button's to 3. It also sets the button as the defaultButton for the FocusManager. At the end of the startup code, it call a setup() function that enables and disables everything and is supposed to set the focus to the first text field. But, after weeks for ... [explative removed]... tinkering, I STILL cannot get the focusing to work properly or reliably. WTF?
I've attached the code. I'm at my wit's end. I'm so frustrated with focus capabilities in Flash.
Any help anyone could lend would be so greatly appreciated.
Attach Code
_root.focusManager.enabled = true;
txtUsername.tabIndex = 1;
txtPassword.tabIndex = 2;
btnLogin.tabIndex = 3;
txtUsername.enabled = true;
txtPassword.enabled = true;
_root.focusManager.defaultPushButton = "btnLogin";
_root.focusManager.defaultPushButtonEnabled = true;
btnLogin.enabled = false; // event listeners enable this once there is text in both text fields
_root.focusManager.setFocus( txtUsername );
FocusManager
I have an application where I have 5 textFields in a row that the user will enter numbers in sequentially. Each textField has an onKillFocus function that checks the number for validity and removes it if the number is not valid. I would like the cursor to remain in a textField where the number was deemed invalid and then removed rather than tabbing to the next textField. I haven't been able to figure out how to do that. I can't seem to get Selection.setFocus or FocusManager.setFocus to send the text field back to the previous textField where the number was erased. It would be nice if there was a way to completely intercept the TAB function and then programmatically determine where Tab should send the cursor. Does anyone know a way to do this?
I hope this explanation makes sense. Thanks for any ideas you might have.
FocusManager
i was using focus manager fine when my movie was standalone, now that it's loaded into a container on _root, i get undefined when i try to trace out the current focus.
this codes worked originally:
Code:
keyListener = new Object();
keyListener.onKeyDown = function()
{
var keyCode = Key.getCode();
if(keyCode == 9)
{
trace("keyCode: "+keyCode);
clipHit = _root.focusManager.getFocus();
trace("clipHit: "+clipHit);
trace("clipHit._parent.ind: "+clipHit._parent.ind);
if(clipHit._parent.ind == laLength-1)
{
_root.focusManager.setFocus(inp0.inputText);
}else{
in that you could trace out "clipHit" from _root.focusManager.getFocus(); I guess i assumed that focusManager would not be affected by scope, but obviously it is! I tried changing _root.focusManager to _root.myContainerClip.focusManager, but to no avail! help!!!
FocusManager From Within A Class
AS2 framework.
The documentation says:
Note: If you call FocusManager.setFocus() to set focus to a component when an application loads, the focus ring does not appear around that component. The component has focus, but the indicator is not present.
But I can't get it to set focus on my text input field. The code sits in a class where a series of animations fire to build the form. After all fields are present I'm trying to set focus to the first input field with:
Code:
target.login1.fName.text = "First Name";
target.focusManager.setFocus(target.login1.fName);
[target being a ref to a clip passed into the class...in my tests i'm just passing _root]
FocusManager.defaultPushButton
What should I do to enable FocusManager.defaultPushButton get all the Enter keypresses? As for now it receives "click" event only when focus is set on TextInput component instance. When focus is on ComboBox component instance or on RadioButton component instance nothing happens. Thanks you in advance.
FocusManager Error
I'm using this line in my class:
import fl.managers.FocusManager;
but I'm getting this error message:
1172: Definition fl.managers:FocusManager could not be found.
I know when this error happens for fl.controls.etc... you have to add an instance of the control to your library.
How does this work for "managers"?
I searched here and googled but nothing that discusses the FocusManager.
Regards,
Brent
FocusManager Question
Hey all,
I've got an issue with the usage of the FocusManager that hopefully someone can help me with. I have a class made up for a Login window, and I want to set focus on a username comboBox, and then set the defaultButton property of the FocusManager to the login button.
When I do this though, the login button appears to already have focus when the window first appears (as does the combo box). I've set the showFocusIndicator to false, but it seemingly has no effect.
Here's the code:
Code:
public function setFocusManager():void{
fm = new FocusManager(this);
fm.showFocusIndicator = false;
fm.setFocus(cbUsername);
fm.defaultButton = btnLogin;
}
Also, when a button is set as the default button, what type of event is received when the user presses the Enter key. I'm guessing it's a KeyboardEvent, but I just wanted to clarify.
Thank in advance,
FocusManager.setFocus
I have made one loging screen in Flash there I am setting focus for the Email Field first when the page loads.
Following are the lines of code I have used
Selection.setFocus("emailBox");
Now the problem I am facing is it works fine Flash Authoring environment but it does not works in the Browser unless user clicks on the swf object anywhere.
http://beta.thescoutingedge.com/index.php/clogon1
Please help me out and also let me know your comments about the site look and feel.
FocusManager And RadioButton
I drag and drop 3 radioButtons on stage and test movie, I press TAB and the focus goes from one to another in looping. Works fine.
But when I instantiate using new RadioButton it doesn't works.
The focus stop on the first and nothing more happens.
import fl.controls.*;
import fl.managers.*;
var fm:FocusManager=new FocusManager(this);
for(var i=0;i<3;i++){
var rd:RadioButton=new RadioButton();
rd.name="a"+i;
rd.tabEnabled=true;
rd.tabIndex=i+1;
rd.x=100;
rd.y=i*20;
addChild(rd);
}
Any idea???
FocusManager Not Working
Hello,
I have some code and what it is doing is making both text fields wider. I would like the first one to be wider but only the second one to get wider when focused on...
PHP Code:
focusManager.setFocus(clientIDtxt)
onEnterFrame = function () {
if (focusManager.getFocus() == clientIDtxt) {
clientID._width = 130;
}
if (focusManager.getFocus() == clientPSWtxt) {
clientPSW._width = 130;
}
};
ive tried MM tut's and searched kirupa/google.. no luck.
Anyone have any suggestions?
~ Lacuna aka Seretha
Fl.managers.FocusManager;
hi,
I made myClass and write
import fl.managers.FocusManager;
but came error 1172
why is that? How can be fixed?
FocusManager Not Working
Hello,
I have some code and what it is doing is making both text fields wider. I would like the first one to be wider but only the second one to get wider when focused on...
PHP Code:
focusManager.setFocus(clientIDtxt)
onEnterFrame = function () {
if (focusManager.getFocus() == clientIDtxt) {
clientID._width = 130;
}
if (focusManager.getFocus() == clientPSWtxt) {
clientPSW._width = 130;
}
};
ive tried MM tut's and searched kirupa/google.. no luck.
Anyone have any suggestions?
~ Lacuna aka Seretha
AS2 - FocusManager On Different Windows
Hi All,
I have one form which has got some text inputs. When it first starts, the top text input A is set to be focused. On the form it also has got a button which will open another window when it is clicked.
The problem is when the second window is open, text input A is still focused and i wanted it to focus on the text input on the second window.
I am trying to use FocusManager to set focus on the second window, but it seem not to be working. Here is some of the codes:
this.focusManager = new FocusManager(this);
this.focusManager.setFocus(this.inputBusName);//it doesnt focus on the textInput for some reason
Can anyone help me with it? it will be good to provide some code. Appreciate it.
Cheers
FocusManager Not In The Reference Library
Anyone knows why focusManager cant be found in the flash reference library? and also when i used it, the word "focusManager" is not highlited as the rest of the reserved words in flash (for example focusManager.defaultPushButton=addURL_btn). Is it something new??
will really appreciate it if someone can reply
cheers
Custom Tabbing Without FocusManager
What I want to do is, to write my custom FocusManager. I have written my custom lightweight form components, but when it comes to tabbing, when used in multiple forms, I just can't control them without using flash's focusManager.
What I want to do is simply this:
When user tabs in a form, focus must stay in the focused component's _parent clip. I have attached an example fla. There are two instances of a form clip on the stage. When user tabs, the focus must travel in the active form clip, but it jumps from one clip to another.
I tried to manage this with a key listener, capturing the tab key. When user presses tab, I send the focus to the component where it should be (by typing Selection.setFocus(...)) But this does not work. When I send the focus to the component, but flash sends it again to the next component in its tab order.
Any clues how this can be done or How flash's FocusManager work? By dynamically changing tabIndex properties of the components on every focus change?
Thanks.
FocusManager And Reserved MovieClips
Hi
I noticed that when I start the debugger that there's a focusManager and a reserved MovieClip on my root. I was wondering what their purposes are. I dont remember naming any movieclips like that.
Anyone know?
thanks
stephan
TabIndex And FocusManager Confusion
I’ve got an app with about 10 input text boxes on each of 5 frames and a handful of nav buttons. I want the tab key to cycle between the text input boxes on a given screen and leave the nav buttons alone. According to the docs, if any on-screen element has a tabIndex set, auto-tabing is disabled. OK, I set the tabIndex properties on the first screen from 0 to 9 , tested and everything worked fine. I then added tabIndex properties to each of my text input boxes on the other screens starting from 0 on each screen. I tested and suddenly the tab order was Z order and included the nav buttons (ie it looks like auto-tabing was back on). On the off chance that every tabIndex had to be unique, I tried setting the tabIndex properties from 0 on the first element to 50 on the last screen, last element, still behaves like auto-tabing is on.
I see I can create focus loops to exert greater control over the tab sequencing but the meager example in the help docs isn’t much help. Am I doing something wrong with the simple setting of the tabIndex prop? Does anyone have a simple example of using the FocusManager?
Thanks.
[AS2][Components] Wheres The FocusManager ?
Been having a lot of problems with tab order using tabIndex on different form elements.
What I have discovered is that if I use an MXPro component on the stage with my other form input fields, that tabIndex on all other movieclips simply stops working.
Has anyone experienced this?
Here is a link to an example:
http://64.207.177.164/test.htm
and two links to the .fla's in the example-
The one that works -(no components):
http://64.207.177.164/flash/test_noMM.fla
..and the one that doesnt:
http://64.207.177.164/flash/test_MM.fla
How Does Alert Component Affect FocusManager?
Hi,
We had some problems to make focus works properly in our application and it was looking alright. But now the Alert component seems to break something (I don't know what yet).
The problem is that after we show an Alert on the screen the focus on components doesn't work as previously.
How can we save the "focus state" before an Alert window and then restore it when closing the Alert? (I don't know if there is such an object to control focus).
I tried to debug through the code in order to figure out what is going on, but due my lack of knowledge about Flash/AS I didn't succeed.
Thanks in advance
AS2 - Using Mx.managers.FocusManager Inside A Class
Hi all.
I've developed a RIA using AS2 & v2 components.
I need to use the mx.transitions.FocusManager class to set the focus of the components.
I need to call the focusManager instance using:
Code:
_level0.focusManager.setFocus(instanceName);
It's the right usage?
Thanks to all
Problem Getting TextField Focus (using FocusManager Class)
I have to use the FocusManager class to direct the focus to the TextFields. stage.setFocus() doesn't activate the caret (aka the text cursor).
I'm having a problem getting the current focus though. I think I've got it very wrong. I can't find anything of use in the Adobe Docs and I'm stumped.
Any help will be greatly appreciated.
ActionScript Code:
function gotoNextTextField():void {
currentInputTextField = _focusManager.getFocus();
nextInputTextField = _focusManager.getNextFocusManagerComponent();
trace(currentInputTextField); // returns null
trace(nextInputTextField.name); // returns the TextField name
_focusManager.setFocus(nextInputTextField);
}
This Is Killing Me....
i just don't know what's happening...
I think i do everything allright. The problem is if you don't have the font i used installed, than you will see it all messed up.
But i didn't use dynamic fields, or device fonts, i did all the right things with this pixel font, the size, the position.... everything.
The problem is this.. if you don't have it, you won't see it.. but i've saw a lot of flash sites with fonts i don't have so the problem can't be very big, right?
Can some of you please be kind to solve this problem please?
Thanks in advance!
Alexandre Silva
MX Is Killing Me... Ugh
I've tried giving a button the old:
on (release) {
gotoAndPlay(2,1);
}
You know, like I used to - before MX... but it won't work! What on earth do I have to do now just to get my button to go to another scene, once its clicked?
Please Help!
~Vik
This Is Killing Me
Hi,
I have a feeling this is going to be a long email, forgive me. Any help is going to help me sleep at night. I'll try and explain as clearly as possible.
I am create a navigation system. It is just a number of square blocks, which are the buttons.
As you move over a block it extends horizontally to reveal the button's 'name' (just text). It will push any of the blocks to its right along with it
Obviously, this can simply be achieved by creating a movie clip with 5 different 'labels'.
Then onRollover a specific button, lets say the third block, I can tell the playhead to goto and play the specific label 'Extend block 3'.
When I roll out of the button the playhead to go back to the start (just the blocks nothing extended).
This looks unprofessional and not very smooth because it flicks from label to label.
I have assigned the following ActionScript to the first frame.
code: myBoolean=false;
Block1.onRollOver=function(){
myBoolean = true;
}
Block1.onRollOut=function(){
myBoolean = false;
}
Navigation_mc.onEnterFrame=function(){
if(myBoolean){
this.play("Button1_open");
}
else{
this.prevFrame();
}
if(Navigation_mc._currentframe>=37){
this.stop();
//do something here
//this.loadMovie('someMovie.swf",1);
}
}
Basically, this tells the movie clip to play on the label of block 1 extending. It 'rewinds' the movie clip to give a smoother collapse. (See attachment)
This is all very well FOR BLOCK 1. You will see I have used a 'transparent' movie clip as the 'hit area' for the action. When the movie clips plays and the block extends the hit area obviously stays the same. So from a visual point of view you can still be on the button but you can move your mouse off the hit area collapsing the blocks.
Again, if the user rolls over the second block and I apply a True bolean. It's just going to play the first block moving out.
I thought maybe setting a varible which was a number. If you rolled over block one the varible would be set as '1', and if you rolled over 2 the varible would be '2' etc. If any of the blocks where rolled out of the varible would be '0'. and the playhead would reverse until I worked out how to stop it at a specific point?
I've not tried this but I can't see it doing what I want it to.
How would I be able to make the play head stop at a specific keyframe, if there are more than 1 varible?
Is that all hurting your heads? It gets worse...
...I would then like the same flowing motion to happen after a block is extended.
For example, if you have rolled over block 2 and not rolled off, so it has stopped fully extended and you then move over block 3 straight away then the movie clips would play extending block 3 smoothly as block 2 retracts to it's original state. This motion could rewind to it's start point as well.
It would create a smooth wave of expanding and retracting buttons.
My headhurts now - does anyone know what I mean, I don't think I do anymore.
Anyone?
IE Is Killing Me
like xesz, i am having problems with IE too. My preloader works great in Mozilla, but with IE, it will not load the numbers which are counting to 100%....ideas? tried already to embed the font
IE Is Killing Me
like xesz, i am having problems with IE too. My preloader works great in Mozilla, but with IE, it will not load the numbers which are counting to 100%....ideas? tried already to embed the font
I'm Killing Myself With This NAV BAR Any Help?
hey guys Anyway I've been asking for help alot on this and I guess Im still not getting the picture. Basically I'm trying to replicate the TAZO TEA script from there web site.... www.tazo.com ... i'm trying to get that nav bar that they have i was using this script but Its not working or i guess i have the elements in the wrong place? Also At one point I had got it to work and didnt save it BUT* I couldnt figure out of to make a button in one movie clip call up another movie clip behind it. Hmm if you want check out my fla file ... thnx alot guys
menu.but.onRollOver = function()
{
_root.onEnterFrame = function()
{
menu._rotation +=1;
if(this._parent._y >= 100)
{
_root.onEnterFrame = null;
}
}
}
Ok This Is REALLY Killing Me PLZ HELP
I'm using Flash MX....Ok so this is a simple example of what I'm trying to do...I have my main time line and I added a circle...I converted the circle to a movie clip...I double clicked it. In the movie clip I double clicked the same circle and converted it into a button....Ok so in the movie clip I click actions for the button that i've created and did a on release goto and stop on frame one of scene two script....I added a scene 2 to the file with a stop action in frame one....when I load up the movie and click the button it DOESN'T goto scene 2. I believe it's because I don't know how to script nested things can someone PLEEEASE help me? What is the syntax for nexted things like this????
[F8] This Is Killing Me...please Help
hi guys,
i am working with cs3 and im trying to do somthing ive done a bunch of times in mx and cant figure it out and im going nuts...
i have a photo gallery that has nice transitions saved as "header.swf"
and a movie clip instance in my flash cs3 movie called empty
and ive tried hours of code substitutions with a whole lot of dumb error messages:
empty.loadMovie("header.swf");
yields
TypeError: Error #1006: loadMovie is not a function.
at dynamicsite_fla::MainTimeline/dynamicsite_fla::frame1()
loadMovie("header.swf", "empty");
yields
1180: Call to a possibly undefined method loadMovie.
Oh My God This Is Killing Me...
Hey Flashers.
I am having a total nightmare trying to code the script to close a movie clip. I must have spent about 3 hours trying to do it but as I'm rubbish as AS I'm really struggling : (
My new site is one main .swf that pulls in all the other .swfs with code. so far so good. however some of the .swfs that are pulled in need to be closeable (if thats a word).
What should work is a close button with the code:
on (release) {
page_mc.removeMovieClip("page.swf");
}
but sadly it doesn't
I have made a really simple version of my site to explain the problem as its kinda hard to explain and uploaded it.
http://www.digital-farm.co.uk/flashfiles.zip
If one of you really nice people could take a couple of minutes to look at it I would be sooooooo grateful. For anyone who knows AS it will be super simple but as I'm still in early learning stages its super hard for me.
Thanks so much for reading this.
Regards,
Stef.
p.s. the file you need to open is 'mainpage.swf'
This XML Is Killing Me
I have an XML file that I need to read and display the results, I am able to read and load the xml in to the action script with out a hitch. My problem is the results is boolean and I'm not sure how to parse through that.
XML snipet: (cleaned up version)
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CheckStoppingRuleResponse xmlns="TrialIVBuMel">
<aSubGroupContinueIndicators>
<boolean>false</boolean>
<boolean>true</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>true</boolean>
</aSubGroupContinueIndicators>
<sErrors />
</CheckStoppingRuleResponse>
</soap:Body>
</soap:Envelope>
My Actionscript:
trialXML = new XML();
trialXML.ignorWhite = true;
trialXML.load("results.xml");
trialXML.onLoad=function(success){
if(success){
trace(this.firstChild.firstChild.firstChild.childN odes[0]);
function subGroups(trialXML){
for (var n=0; n<trialXML.firstChild.firstChild.firstChild.childN odes.length; n++) {
trace(trialXML.firstChild.firstChild.firstChild.ch ildNodes[n].firstChild.nodeValue);
}
}
}else{
output.text + "XML Loading Error!";
}
};
PLEASE Help Me Out This Is Killing Me
i have buttons in my library. I try to put the code
Code:
getURL("http://www.blahblah.com", "_blank");
into it when i edit it from the library but it always says "current selections can't have actions applied to it". How do i get to it so i can have a link pop up when i click the button? does the "getURL" also work for files on my computer? for instance i want to click a button and have a movie pop up from one of my folders on the c drive. what would i code to do that? thanks SOOOOOO much to whoever can help me out, i have been trying to do this for days...
Buttons In MC Are Killing Me
Hi there!
Need some more help..
I made a movieclip containing 4 buttons, each for going to a different scene.
The first button works, I did:
on (release) {
tellTarget ("_level0") {
gotoAndPlay ("scene 3", 1);
If I do the same for the other buttons, but gotoandplay scene4 and so on, they still go to scene3?
What do I do wrong??
Please help!
thnx
Hierarchy Is Killing Me
i need help with the path of my grid of boxes.
the problem is i have created a grid of boxes looking something like this
# # # # #
# # # # #
# # # # #
# # # # #
each boxes has a unquie instance name.
Scene 1
posX = 5;
posY = 20;
var myLife = new Array();
for (i=1; i<=300; i++) {
_root.attachMovie("blokk", "blokk"+i, i);
_root["blokk"+i]._x = posX;
_root["blokk"+i]._y = posY;
posX += 12;
live[i] = "alive";
if (i%15 == 0) {
posX = 5;
posY += 12;
}
}
then i want to be able to change the color of each of the boxes and then use a button and antoher for loop to check the color of each box.
Any ideas out there?
thanks
This Actionscript Is Killing Me...
I have a movie clip that has a button inside it. This movie clip is
placed on my normal scene (scene 1).
Upon pressing the button in the MC, I wish to go to a different frame
on my normal scene (scene 1) the solution I am told is
_root.MyClip.gotoAndStop(2)
However I have music playing in the background in another MC.
This sends my music crazy! I think they are interfering with each
other!
Does anybody have any solutions?
Thanks!
DuplicateMovieClip Is Killing Me
Hello everybody.
I write here because I REALLY need help now.
I have a button that, on Rollover, makes a duplicateMC, then goes to a frame and finally it puts the new MC on same position of mouse (x and y)... or this is what's suposed to do!!
Code for button:
---------------------------------
on (rollOver) {
duplicateMovieClip (kick, newkick, 3);
kick.gotoAndPlay("bomb");
call("reset");
}
---"reset" is a frame with some AC to stop counters on the
video game and so... and the instruction to go to the "frame"
Code for the "frame" i'm going to:
----------------------------------
newkick._x=_xmouse;
newkick._y=_ymouse;
trace(_xmouse+ "-" + newkick._x);
stop();
The trace command is set to give me the real position of the new MC, but its in blank!!! So it doesn't make any duplicate!??!?!?!?!?
Something else...
if I use setProperty(newkick, _x, _xmouse); ......
THE WHOLE STAGE MOVES TO THE MOUSE POSITION!!!
INCREDIBLE!! ISN'T???
Please... heeeeeeeeeeeelp.
Thanks
GetTimer() - This Is Killing Me.
[size="small"]This is gonna cost me my every last nerve, I swear ...
Here's what I'm trying to get done:
User comes to my "work" page (= subhome of my portfolio area)
While the user reads some text, I want to present a looping slide show that consists of 10 mc's ("container01" ... "container10"), with an image in each container
"container01" is supposed to be visible for 3 seconds then fade out (_alpha to 0) within one second to reveal "container02" beneath it. "container02" remains visible for 3 seconds then fades out within one second etc. etc. ...
The images within each container are going to be changed frequently, so sticking all the container mc's in one "monster mc" with
a "gotoAndPlay(1)" isn't really an option
What I have so far is:A slide show container mc (slideshow_mc) with one frame and ten levels
"container01" to "container10", each on one level in slideshow_mc
"container01" contains an mc with a jpg in it (jpg01_mc), "jpg01_mc" fades out in one second
The first frame of each container has the following code attached to it:[/size]
stop();
this.onEnterFrame = function(){
if(getTimer() >2999){
play();
this.onEnterFrame = null;
}
}
[size="small"]for the subsequent containers, I simply increased the time by 4000 each - and bingo, I have a beautiful (or so I thought) slide show ...
Everything works just fine until the last image has faded out ... since there doesn't seem to be a way to reset/restart the timer, I simply have no clue how to get the sucker to loop back to the first image and start over ...
Is this approach a dead end? I'm increasingly getting the feeling that I can't "see the forest for all the trees", I've been sitting over this for way too long and my brain feels like jello ... is there an easier way to accomplish this?
Any help/hints/tips/code snippets you guys can provide would be wonderful!!
kubik
p.s. if it's of any help, I'll gladly post a test .fla[/size]
This Is Killing My Brain
What the crapping hell does flash think it's doing? i have a preloader clip that is called perfectly fine from all root buttons in the main movie, the code being _root.preloader.play(): . So why oh why is it not playing when I use exactly the same command from within this if statement that is in an external swf, loaded into a blank movieclip??? all the other commands are being executed except the _root.preloader
if (numberclip.pin == 0000) {
content = "staff";
_root.status = "loading so+so clip";
gotoAndPlay("accepted");
_root.preloader.play():
} else {
tellTarget ("invalid") {
gotoAndPlay("open");
}
}
anyone? PLEASE. feel like smashing something up if this doesn't work soon.
(version 5 by the way!)
Killing OnEnterFrame
i trying to make this kirupa preloader tutorial complitly dynamic
but something is killing my ONENTERFRAME event
fla-file is attached, please HELP!
notice that this line39
trace("pleas dont stop");
stops executing as soon as the trans-mc timeline reach the 9th-frame
if u omit this line 30 from maintimeline
attachMovie("tr", "transition", 20);
enterFrame suddenly keep going
so far, something inside of trans-mc is rapeing my onEnterFrame
bu i cant figure out what, specialy couse ther is very simple stuf inside of trans-mc, like:
_root.section = "profile.swf";//frame1
_root.content.loadMovie(_root.section);stop();//frame9
stop();//frame 24
so what is it????????????????????????
Killing SetInterval
Hi Guys,
Need a hand here with my setInterval. on the first frame of oh my nav movie I have this code;
Code:
function getNews() {
loadMovie("news.swf", target="_root.clips");
clearInterval(getNews);
}
and on my button I have the following
Code:
on (release) {
_root.clips.alfa(0, 5);
setInterval(getNews, 3000);
setProperty("_root.clips", _x, 420);
setProperty("_root.clips", _y, 183);
}
}
everything works fine except that the setInterval just wont die! even though I have tried many variations of the clearInterval code.
Could someone please explain or help in anyway.
Thank you!
I Need Some Serious Help W/ Javascript (it's Killing Me)
I have a movie, which is not used within html. This movie will have many links, which will open html files. Now, what I need is to specify in the button code the size of the browser and what html file it will open. For example:
Button1 (in flash movie) - will open http://www.whatever.com/a.htm in new broswer with a width=500 and height=300 and NO scrollbars, statusbars, addressbars or anything else for that matter.
So, when Button1 is pressed, the code will basically open a.htm file in a new broswer, which is 500 by 300. It should do nothing else, meaning it should not open a third popup window or anything else (I've seen many codes that do that). I've also seen many codes that require to place a code in an html file and then in the flash code, what's all that about?
Can someone provide me with some basic steps that will enable me to achieve this???
Thanks in advance!
Fscommand Is Killing Me
Hello all,
This seems like it would be easy to do, but I've had no luck figuring it out. I want to send a command from a JavaScript that tells my flash movie to go to a frameLable. I know this involves fscommands and/or functions. I'm not sure how to pass the command or where to put the function in the flash movie. I've been able to find lots of information on how to pass commands Flash to JavaScript but nothing going the other directions. Any help would be greatly appreciated.
Thanks
-Len
OnClipEvent(s) Killing My CPU
Anybody have a remedy for this?
I have a menu.swf that sits in _level0, with an onClipEvent loading animated header images, matching the content page loaded.
That's OK, but after I load another content swf in _level1 which also has an onClipEvent to check something, the two running together bump my processor up to 100% and all the animation speed suffers considerably.
Are there workarounds for this?
Killing Enemies
Say I had my hero walk into an enemy. I want to show my enemy "dead". So instead of it moving around and whatever, i want it to change to it's dead version. Can anyone point me in the right direction, I know its something to do with hittest.
I hope I've explained well enough.
Thank you.
Virum Killing Me...help Me Out
Hi All
Everytime when I start my computer the desktop goes white....
it`s a html site on top of desktop filling the whole screen
I have installed several ad remover tool but it can`t clean it.
the properties on desktop
file://C:WINDOWSWebdesktop.html
how do I remove it...please help
many thanks
pilotX
This Animation Is Killing Me
i am making an animation to a voice over. it will be exported to an projector and distributed on cd, so everytime i test it i export it as one.
everytime i play it it goes at a different speed!!!
its giving me the heebie jeebies because the images are supposed to match up to the voice.
i know there is a way of creating markers in director to slow down the animation or speed it up to match with chosen points in the sound, but does such a thing exist in flash?
if it doesnt, whats the closest thing to it?
how can i fix it to make sure it plays the same speed everytime on all computers?
im using flash mx 2004 pro
cheers.
Flash Is Killing Me
I'm having major problems.
I'm creating a portfolio site. In the "portfolio" section, the movie loads scene by scene, instead of following the commands of the buttons. Why?
I have two separate swf files, one for my preloader, and another for my main site. After about a minute, the entire site reloads and resets to the splash, then all the buttons work correctly.
This is driving me crazy!!!!!
Any help would be monumentally helpful.
www.saucedesign.com
LoadVariables Killing Me
Hi,
I dont think I've ever been so frustrated by something that seems so simple.
I'm trying to import a value from a txt file, which I want to use in a condition, and for the life of me I can't understand why it isn't working. The condition never results true!! Should the syntax be different in the txt file or do I need to convert the variable to a string or something?
TXT FILE contains:
registration = registered
catchClip(Movieclip used to catch the data):
onClipEvent(data){
_parent.play();
}
TRIGGER:
on (release) {
loadVariables("demo.txt", "catchClip");
}
CONDITION WITH COMPARISON:
if (catchClip.registration == "registered") {
trace("condition is true");
}
|