Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash tricks? 3

Status
Not open for further replies.

candrid

IS-IT--Management
Aug 30, 2001
38
US
Hey folks!

How can I make a link highlight in a flash video when I mouse over it?

and how can I make a loading screen?

Sorry but I'm pretty new at flash.

Thanks.
--"Hello Microsoft? Yeah this is Mike again.. now it says: "Hit any key when ready..." My question is: "Where's the "any key"? Is my keyboard broken..?
 
That link would most probably be a button.
Change the over state of the button.
Once again if your new at Flash, maybe the best thing, is to start with the lessons (there's one on buttons!) under Help, and then maybe move on to the tutorial also under Help->Using Flash.
They're thousands of other tutorials out there, so once you've gotten the basics of Flash, you can then use a search engine to find help on more specific problems, such as preloaders or what you called a loading screen. As a matter of fact... A lot of tutorials and help in the FAQ section of this forum! Just hit the FAQ tab up there!

Not that I want to turn you away from this forum... Just trying to point you to some basic stuff, you should first look into!

Happy Flashing!
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Hi candrid :).
I haven't seen you in a while...
Nice seeing that you are here too.

//Daniel, Yahoo ID daniel_hozac
 
mouse over:
doble click the button, then there will be a 4-frame time line at the top. the first frame is how the button aperes normaly, the second is how it will look on mouse over, the third is how it will look on click, and the forth is the are that the mouse will have to be over in order to consider it "mouse over". hint:if the button is just text, you'll want to make the hit state a box the size of the text.


preloader (loading screen):
i'll give you one that i use for things. first make a new scene and put the following code in the first frame;

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100)+"%";
bar.gotoAndStop(percent_done);
ifFrameLoaded ("main", 121) {
gotoAndPlay (3);
}

in the second put this;

goToAndPlay(1)

with this you can do several thngs. if you just want test saying "loading" that disaperes when the movie is loaded, just put that text in both frames. if you look at the code you will see several variables (total_bytes, loaded_bytes remaining_bytes, percent_done) any of those things can be displayed by simply asigning that variable to a dynamic text field.
if you don't know how to do this, just make a text box like normal, but don't put anything in it. go to window>panels>text options. in the drop down menu, set it to dynamic text field. then where is sais "variable:" put the variable that you want displayed in the text field.

For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
note: i didn't explane the bar part. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
man i keep forgeting stuff.

make sure where it sais "ifFrameLoaded ("main", 121)" you change "main", 121 to the last scene and frame of your movie. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
ok, i have nothing to do so here goes the bar thing:

make a new movie clip. in it make what would look like a loading bar. make it go from nothing to full in exactly 100 frames. put stop() in both the first and last frames. and don't forget to give it the instance name "bar". it should go up as your movie loads. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
Why use the "main", 121 when you can use the _totalframes variable?
Just a thought :)
//Daniel
 
lol, that would be way to easy. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
i know why, bacause that is total_bytes not total frames. na dyou need to defign the scene as well as the frame, so that woulden't work For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
The variable is _totalframes .
And it have worked so far in all my preloaders.
//Daniel
 
Guys!

From the Help files:

Regarding ifFrameLoaded...

Player

Flash 3 or later. The ifFrameLoaded action is deprecated in Flash 5; use of the _framesloaded action is encouraged.

See also

_framesloaded


---------------------------------------------------------

_framesloaded

Syntax

instancename._framesloaded
Arguments

instancename The name of the movie clip instance to be evaluated.

Description

Property (read-only); the number of frames that have been loaded from a streaming movie. This property is useful for determining whether the contents of a specific frame, and all the frames before it, have loaded and are available locally in a user's browser. This property is useful for monitoring the download process of large movies. For example, you might want to display a message to users indicating that the movie is loading until a specified frame in the movie has finished loading.

Player

Flash 4 or later.

Example

The following is an example of using the _framesloaded property to coordinate the start of the movie to the number of frames loaded:

if (_framesloaded >= _totalframes) {
gotoAndPlay ("Scene 1", "start");
} else {
setProperty ("_root.loader", _xscale, (_framesloaded/_totalframes)*100);
}
mywink.gif
ldnewbie
Hope that this
was helpful!
 
whatever, do that if you want. don't matter much.

and danielhozac: sorry, i though you were talking about a variable i had defigned. sorry. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
whatever, do that if you want. don't matter much.

and danielhozac: sorry, i though you were talking about a variable i had defigned. For God so loved the world that he gave his one and only son, that whoever believes in him won't die but have everlasting life - Jesus - John 3:16 -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top