flash actionscript:
highlander_1, [quoted text, click to view] > Not, it was not the logical operator. For a moment I was > lucky that you maybe have identified the problem.
Can you explain why not? The bitwise OR operator | returns a 32-bit integer, but your if() statement is looking for an expression that evaluates to a Boolean. When it doesn't find a Boolean, I believe it will assume false every time. David stiller (at) quip (dot) net "Luck is the residue of good design."
[quoted text, click to view] > Interesting - I?ll be back
Elementary. ;) It's all in the ActionScript Language Reference. David stiller (at) quip (dot) net "Luck is the residue of good design."
[quoted text, click to view] > Ok, I skip the if-statement with "or".
Uhhm. Okay. :) [quoted text, click to view] > if(_parent.kund4Down == true){ > trace("check if Kund4Down is true"); > _parent.mcKund4.gotoAndStop("Hit2"); > _parent.mcKund4._alpha = 38; > } > > Why is the line with the trace action been executed, if the rest of > lines > not been exexuted?
How do you know they aren't being executed? If you see the trace in your Output panel, but you don't see the gotoAndStop() or _alpha changes, I could guess that your path to mcKund4 is incorrect. The lines are executing if you see the trace() statement, but you're sending them to the wrong place. David stiller (at) quip (dot) net "Luck is the residue of good design."
What?s wrong in this if - statement? Sometimes - mostly the second time the following statement runs and the trace action says this - "check if Kund4Down is true". But the statement _parent.mcKund4.gotoAndStop("Hit2"); never runs. I?ve checked the debugger in detail and the variable kund4Down is always true. (Not the first time, but the second time and so on..) What could possible be wrong? Here?s the code: _parent.mcKund1.onRelease = function(){ if((_parent.kund4Down == true)|(_parent.kund4Rollover == true)){ trace("check if Kund4Down is true"); _parent.mcKund4.gotoAndStop("Hit2"); _parent.mcKund4._alpha = 38; _parent.kund4Rollover = false; } I appreciate if someone could say something :)
By the way, why do you use _parent. if front of everything? If you're already setting a button's actions using my_btn.onRelease = function(), why don't you just put that in the main timeline so you don't need to use _parent. everywhere?
Not, it was not the logical operator. For a moment I was lucky that you maybe have identified the problem. But thanks anyway!!
Thanks - yes it seems weird to like I do. But It is simplier to run the debbuger and get a complete and clear overview and keep the variables in order, if these variables is showing up in level0 in the debbuger. :)
[quoted text, click to view] >Can you explain why not? The bitwise OR operator | returns a 32-bit >integer, but your if() statement is looking for an expression that evaluates >to a Boolean. When it doesn't find a Boolean, I believe it will assume >false every time.
Interesting - I?ll be back :)
Ok, I skip the if-statement with "or". I?m just write another line of code with that if statement. So let us focus on the following: _parent.mcKund1.onRelease = function(){ if(_parent.kund4Down == true){ trace("check if Kund4Down is true"); _parent.mcKund4.gotoAndStop("Hit2"); _parent.mcKund4._alpha = 38; } }; Why is the line with the trace action been executed, if the rest of lines not been exexuted? :confused;
Ok, thanks for your answer! But I?ve placed some "trace action" at label "Hit2" in mcKund4 - where another mckund4Hit2 is. (a short closing animation) The timeline seems always go to that frame (label - Hit2) and sometimes to frame 7 or frame 8 in "mckund4Hit2" timeline. But "mckund4Hit2" is not playing all the frames - thats one of the problem. (I?ve soon placed trace action in every frames in my movie and viewed the alpha value and so on in the Debugger) That?s facts. (But maybe I missed something that?s obviously , because I?m tired of struggling with the same problem over and over) Once I shorted the animation in that timeline - "mcKund4Hit2" to max 7 frames. (It is now 15 frames) But the problems comes back - it seems to me that Flash "go nuts" if there?s to much "going on" I hope my answer is wrong. :confused;:(
Short question - MX 2004 debbuger - ist it reliable?
highlander_1, [quoted text, click to view] > Short question - MX 2004 debbuger - ist it reliable?
Reliable, yes. But it can get to be annoyingly slow, depending on the complexity of your app. David stiller (at) quip (dot) net "Luck is the residue of good design."
Now, I have find the problem. It was a component which was placed in each 6 mc:s (buttons). The name of the components is or was - Sticky and Zoomer. But now I have come to the next problem: - How do I keep ( or retain) these effects without any problems. - I would be happy if there are a some as.class or similar that could "create" the same effect like Sticky and Zommer did. ( a sort of bounce effect, and zooming)
[quoted text, click to view] > - How do I keep ( or retain) these effects without any problems.
I'm afraid you simply haven't provided enough information for people here to help you. I've never heard of components named Sticky and Zoomer, so I don't know what affects they provide. Even with your code sample, I cannot see the full context of your project in my mind. [quoted text, click to view] > - I would be happy if there are a some as.class or similar > that could "create" the same effect like Sticky and Zommer > did. ( a sort of bounce effect, and zooming)
Components *are* classes -- or, more specifically, they are classes that have been packaged up as MXP files to be easily distributed. When written well, components often provide features configurable via user-friendly UI, so who knows ... maybe an AS file version of what you're after would be harder? In any event, it sounds like you would benefit from an all-around, general study of ActionScript before you tinker too much further with components and classes. The difference between logical OR and bitwise OR is a case in point. I sat this to encourage you, not discourage you. :) David stiller (at) quip (dot) net "Luck is the residue of good design."
Would you like to see my 3d gallery .fla-file? - without saying "Oh my God!" - twice!
highlander_1, [quoted text, click to view] > Would you like to see my 3d gallery .fla-file? > - without saying "Oh my God!" - twice!
Sure. If I misjudged your skills, I'll be happy to put my foot in my mouth. I really mean that. :) David stiller (at) quip (dot) net "Luck is the residue of good design."
Click on "Gallery" As you can see, only 2 buttons out of 6 is working - these are under "production" Bugs: 1 Slideshow - The content doesn?t play (loadMovie.swf) automaticly 2. Buttons - Does not close, somethimes, before rotating the menu 3. One button is left visible, sometimes, before rotating the menu :)
highlander_1, [quoted text, click to view] >>> Would you like to see my 3d gallery .fla-file?
The link you showed is nice work. :) Kudos on the design and programming in progress. Now, if you're able to program such geometric patterns, how is it you had trouble with the difference between || and | ? I'm not mocking you, I promise; I'm just curious. David stiller (at) quip (dot) net "Luck is the residue of good design."
[quoted text, click to view] >Now, if you're able to program such geometric >patterns, how is it you had trouble with the difference between || and | ? >I'm not mocking you, I promise; I'm just curious.
Because I?m reading and learning all the time, listen and learn from other peoples problem, and learning from the great programmers here on this forum. (and of my own misstakes) I don?t focus on details as "difference between || and | ?", only if there is a faster way of solving the problem. But you can learn me a lot - like the "difference between || and | ?" .That?s another thing, and you are good at what you?re doing. My own homesite was and is still a living nightmare and I?m not good at programming geometric shapes and 3d rotating. But here is one person who?s really good at that, and I have learned a lot from his homesite. http://www.bit-101.com. Here in Sweden its raining, the temparture is 10 degree and I think I might see a horror movie to night so I forget the horrible "Bugs" on my homesite. ;)
highlander_1, [quoted text, click to view] > Because I?m reading and learning all the time, listen and > learn from other peoples problem, and learning from the > great programmers here on this forum.
There are plenty here. It's good that you continually desire to learn. [quoted text, click to view] > I don?t focus on details as "difference between || and | ?", > only if there is a faster way of solving the problem.
It may sound like a contradiction, but I believe the more time you spend focusing on details, the faster you'll solve *all* your problems. [quoted text, click to view] > But here is one person who?s really good at that, and I > have learned a lot from his homesite. > http://www.bit-101.com. Yes, Keith Peters is quite an inspiration. [quoted text, click to view] > I think I might see a horror movie to night so I forget the > horrible "Bugs" on my homesite.
Ha! Enjoy. David stiller (at) quip (dot) net "Luck is the residue of good design."
[quoted text, click to view] >It may sound like a contradiction, but I believe the more time you spend >focusing on details, the faster you'll solve *all* your problems.
Ok! - with all my respect to your opinion.
<here: < http://www.goodwill.se/peter I can see there are lots of visitors and thats nice, but it would be even nicer if someone has some suggestion of how to solvin the bugs. Just ask for the .fla-file. :)
Don't see what you're looking for? Try a search.
|