02-16-2007, 01:16 PM | #1 (permalink) |
Location: up north
|
[Flash] a few questions that i cannot find in the help.
I got this code
Code:
if (songmax.text == uvr_max.text) { songmax.text = 1; } else if (songmax.text !== uvr_max.text ) { songmax.text = Number(songmax.text) + 1; } } ================================== added questions: using: Code:
loadMovie(); let's say this swf has 10frames, and with 1 button i need to stop when i want. how would i do this?! i also need to find the file when it's loaded: I have to find out how many frames there are. is that possible? basically i need to know how to control a loaded movie in every way possible. and if you don't know, can you tell me what would i do to find this in the help?
__________________
Last edited by MexicanOnABike; 02-19-2007 at 05:35 PM.. Reason: added question and changed title. |
02-16-2007, 01:21 PM | #2 (permalink) |
Please touch this.
Owner/Admin
Location: Manhattan
|
Correct me if I'm wrong, but isn't the correct syntax for "not equal" != or <>
At first glance, it just appears you have an extra = in your Else If
__________________
You have found this post informative. -The Administrator [Don't Feed The Animals] |
02-16-2007, 01:45 PM | #3 (permalink) |
Location: up north
|
well macromedia doesn't like the <> anymore but it does the same as !=.
and this is what the help says on these 2. <> inequality operator != inequality operator !== strict inequality operator with 2=, and 1= it does the same. I don't get it. ------------- more info if it helps: songmax is a Dynamic text that starts at 2. uvr_max is a dynamic text that starts from a loaded text file so it's random which is why it needs to check songmax with uvr_max. right now, it's set to 5. before i click: songmax=2 so when i click the button: songmax=3 again: songmax=4 again: songmax=5 At this point, the next click should recognize it's at 5 and go back to 1. but it keeps going.
__________________
Last edited by MexicanOnABike; 02-16-2007 at 01:49 PM.. Reason: added info. |
02-16-2007, 02:19 PM | #4 (permalink) |
Lover - Protector - Teacher
Location: Seattle, WA
|
You gotta let me see this flash app after you're done.. after that last post.
That said, why do you need an if / else if? I know they recommend checking all your conditions so you don't accidentally fall into an else, but why even check the condition? The else implies that they're not equal simply by the fact that it didn't go into the if; If they're equal, do this. Else (it's implied they're not equal) Also, have you tracing your uvr_max ? I know you're watching songmax, but are you sure uvr_max is being set correctly from the file?
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel |
02-16-2007, 08:33 PM | #5 (permalink) |
Location: up north
|
well i tried with an else but that wasnt working so i tried a "else if" but it's still not working. I know it's working because they're dynamic text fields that are there visible. i'll try tracing them which i shoulda done in the 1st place...
and yes, i will post what I'm making once it works! haha off to try more things! .:::EDIT:::. ok, i'm an idiot. I was loading from a text file right? well i thought the text file would work like a normal flash script so i added some comments // after my uvr_max variable so when i tried doing your trace idea, it gave me: Code:
3 //
__________________
Last edited by MexicanOnABike; 02-16-2007 at 08:49 PM.. Reason: Automerged Doublepost |
02-19-2007, 11:19 AM | #6 (permalink) |
Location: up north
|
added questions:
using: Code:
loadMovie(); let's say this swf has 10frames, and with 1 button i need to stop when I want. how would I do this?! I also need to find the file when it's loaded: I have to find out how many frames there are. is that possible? basically i need to know how to control a loaded movie in every way possible. and if you don't know, can you tell me what would i do to find this in the help?
__________________
|
02-22-2007, 12:32 PM | #7 (permalink) |
Lover - Protector - Teacher
Location: Seattle, WA
|
Sorry I took so long to reply.
No, not to the best of my knowledge, not easily. Extracting the number of frames in a SWF requires reading the file header itself, which there is no standard library for, as far as I can see.
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel |
02-22-2007, 02:49 PM | #8 (permalink) | |
Location: up north
|
Quote:
knowing the frame # isn't a big deal anymore. now i just need to PAUSE the movie. is that even possible? someone mentionned levels but I have no ideas how to work with them . and flash isn't any help. typing LEVEL in the help brings nothing at all. edit: oh someone replied to me. http://board.flashkit.com/board/show...98#post3815598 now the impossible task to figure out how to know when the movie is done playing.
__________________
Last edited by MexicanOnABike; 02-22-2007 at 02:51 PM.. Reason: Automerged Doublepost |
|
Tags |
elseif, flash, if, work |
|
|