Using if(_currentframe=="frameLablel")
_currentframe returns a number
so that I can use it like this in a conditional statement
if(_currentframe==2)
However
if(_currentframe=="frameLablel")
does not work.
Is is possible to use frame label for this purpose?
But my FLASH-8 publishing setting allows only AS1 and AS2
Doed this matter?
"kglad" <[email protected]> wrote in message
news:f5c3he$sel$[email protected]..
> as3 = actionscript 3.0 which is supported by flash
player 9. among other
programs, you can use flash cs3 and flex 2 to write as3 code.
Similar Messages
-
Frame names and how to invoke them
What would you have to do to have something happen once a
movieclip reaches a particular frame?
I already got the answer to that question in a
previous
topic in case that something has to happen when the movieclip
ends, but say you want to have something happen when the playhead
reaches frame called, say, _now?
I can think of a way (involving the clculation of the ratio
between _currentframe and _totalframes) but, isn't there a simpler
-and more precise- way, namely, invoking the frame by its name? How
would that be done (if possible)?
NOTE: I am assuming that adding code to the movieclip's
timeline (instead of adding it to the main timeline) is a bad
practice and should be avoided. Am I right at that?You can only target frame labels using the gotoAndPlay or
gotoAndStop commands. If you want to detect whether a movieclip is
on a certain frame, you could use the _currentframe to detect the
frame number (no strings), or you could set a variable on the
movieclip timeline, i.e. frameName = "_now", and then check for
movieclip.frameName.
Cheers,
FlashTastic -
External SWF currentframe : Problem
I have a movieclip that loads and plays an external SWF into it.
Is there anyway to know the current frame number of the external swf so that I can use it to drag the movie progress bar.
Note: I cannot edit the external swf's. They are just simple and static movies.
It's urgent, please help.
Thanksyou can determine the current frame of any timeline in the external swf. for example, if you want to know the current frame of the main timeline and you're using as2, use:
targetMC._currentframe; // where targetMC is the movieclip into which your external swf was loaded.
in as3:
MovieClip(ldr.content).currrentFrame; // where ldr is the loader that loaded your external swf. -
I'm creating a page-turning module. Throughout the module
there is a progress bar that updates both visually and by
percentage how much of the module has been completed. I'm not sure
how to program this and help is appreciated. As you can see by the
mockup I have so far ( below) I've got the progress bar drawn and
the percentage completed as well as a dynamic text f ield. What I'm
wondering is how to make it update as the user goes forward (the
only direction they can go) through the frames.
http://distance.uaf.edu/mockup/FERPA-mockup-1.html
thanks!
sagewell, you could get the percentage by dividing current pages
they have been through by the total quantity of pages in the doc
and multiply by 100. And if this is more dynamic (pages get added
or taken out) but it's based on 'one frame per page' then you could
use the _currentframe and _totalframes, within the same type of
formula to derive the progress percentage.
you can then advance the 'bar' by: first drawing a bar that
fills the whole area, at 100%, make it a moive clip, then using the
calculation you decide on to obtain the percentage, you can use the
_xscale property, on the 'bar' to scale it to the current
percentage of progress (set it to 0 at the start). -
Can't figure out the AC to use for my "Previous" and "Next" buttons
Hi guys,
I have a slidshow that stretches over 280 frames which can be
seen here:
http://www.paragon-nj.com/newslideshow.html
or the fla:
http://www.paragon-nj.com/newslideshow.fla
There are fade ins and outs and I made buttons numbered 1-5
where you can skip to each new slide. At present I am trying to
create the "previous" and "next" buttons but I'm hitting a snag of
how you make something like this work. The entire AC I have is
this:
a.onRelease=function(){
gotoAndPlay(1);
b.onRelease=function(){
gotoAndPlay(55);
c.onRelease=function(){
gotoAndPlay(110);
d.onRelease=function(){
gotoAndPlay(165);
e.onRelease=function(){
gotoAndPlay(220);
next_btn.onRelease = function () {
(not sure what to put here) ;
previous_btn.onRelease = function () {
(not sure what to put here) ;
Thanks in advance for all the input
Wiluse the _currentframe+55 for your next button and
_currentframe-55 for your previous button unless the current frame
is 1 or 55 when you were inconsistant used 54 frames between slide
transitions. -
Using PHP with Flash (contact form)
I am trying to get a contact form on a flash site to work and
for some reason the PHP isn't forwarding the message to my email.
Below is the flash code I have used as well as the document I have
saved as contact.php. Thank you so much for the help. This is the
last thing I need to complete for the site and I just can't seem to
get it right. Thanks.
Flash Code For the Submit Button:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe<this._totalframes) {
this.nextFrame();
} else {
if (this._currentframe>1) {
this.prevFrame();
on (release) {
this._parent.getURL ("contact.php","_blank","GET");
this._parent.name = "Your Name:";
this._parent.email = "Your Email:";
this._parent.phone = "Your Phone Number:";
this._parent.text4 = "e-mail:";
this._parent.message = "Your Message:";
Here is what I have for Contact.php:
<?php
$your_name = $_GET['name'];
$your_email = $_GET['email'];
$your_phone = $_GET['phone'];
$your_message = $_GET['message'];
$recipient_email = "[email protected]";
$subject = "from " . $your_email;
$headers = "From: " . $your_name . "<" . $your_email .
">\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Contact
letter</title></head><body><br>";
$content .= "Name: <b>" . $your_name .
"</b><br>";
$content .= "E-mail: <b>" . $your_email .
"</b><br><hr><br>";
$content .= "Phone: <b>" . $your_phone .
"</b><br>";
$content .= $your_message;
$content .= "<br></body></html>";
mail($recipient,$subject,$content,$headers);
?>
<html>
<body bgcolor="#282E2C">
<div align="center"
style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
Your message was sent. Thank you.
</div>
</body>
</html>
<script>resizeTo(300, 300)</script>well...that's true..I wanted "name" to be cleared when
clicked...this version I found doesn't clear "name" when clicked,
but it needs selected and erased manually...anyway..it's better
then nothing...
Reason I want this is because I'm using a design that is not
giving me much space and I have to trick the low space with this
option.
If you want I can send you the fla to get a better
picture...I believe you deserve it :) -
Motion tween using actionscript
I'm pretty sure there has to be a way to do this. I want an
object to move to certain coordinates when certain objects are
moused over. Any help?Bryan,
> Thank you so muck...honestly. I hate to ask for more
help,
> but i need to ask ONE more thing.
's okay. :)
> I got the movement working but the thing i need now is
for
> the puck to stay under the button when i mouse off.
Well ... okay, I looked at your code. Honestly, bro, it's a
complete
hodge-podge of new and old style coding. I know it's because
you're on
unfamiliar territory, and I'm not slammin' ya ... but really
-- really,
really, really -- your life will be soooo much easier if you
step back and
look at the big picture. Sooner or later, this will all gel
for you, and it
suddenly becomes very easy.
Forget that tellTarget() business. That's old; like, Flash 3
old. In
fact, it was deprecated in Flash 5. If you want to path to an
object, you
use its instance name. Of course, first, that means you need
to give your
relevant assets instance names. You've already done with with
the revolving
"police" lights -- but make sure you're consistent. Name them
light1,
light2, light3, and so on (yours were a bit dissheveled).
An instance name is just a "handle" that lets ActionScript
"talk" to a
given object. That light exists as a single movie clip symbol
in your
Library, but you want to talk to each one individually, so
each one gets its
own instance name.
Do the same thing with your "net" instance (the tab/button
movie clips).
Rather than this ...
tellTarget(this._parent.light4) {
gotoandplay(this._currentframe+70);
... just refer to objects by instance name.
light1.gotoAndPlay();
Much cleaner code. Now, this isn't relevant in your case,
but if that
"light" symbol had another movie clip inside it, you could
give *that*
symbol an instance name, too. For example, you might name the
bulb "bulb".
If you needed to instruct that bulb movie clip, you could
react it inside
each instance of light like this ...
light1.bulb.gotoAndPlay();
light2.bulb.gotoAndPlay();
// etc.
It's just like folders and subfolders on your hard drive.
Next, you've GOT to make sure you use the correct case.
gotoandplay
doesn't exist in ActionScript, but gotoAndPlay does.
Thankfully, the
ActionScript 2.0 Language Reference is only a click away, and
besides,
script code changes color to indicate when you've spelled
something
correctly.
Next, while it's perfectly legal to use the on() event
handler, it's
also pretty old. It was deprecated as of Flash MX (aka Flash
6), so use the
approach I showed you in previous posts. Just use the clip's
instance name
and assign a function to its event.
You want those instances of "net" to respond to mouse
events. I gave
each movie clip an instance name ... mcHome, mcCalendar,
mcRecord, and so
on.
This allows you to neatly put all your code into frame 1 of
the main
timeline. No more hunting and pecking, having to click on
each movie clip
separately, etc.
mcHome.onRollOver = function() {
// instructions here
That also means you don't have to keep repeating the import
statements
for each button. It's just much cleaner and more efficient.
Give yourself
a Scripts layer dedicated to scripts only, and put all your
code there.
Just remove all the on() stuff.
Now here's the part that should make a halogen bulb go BOOM
in your
head. I'll repeat what you were asking:
> I got the movement working but the thing i need now is
for
> the puck to stay under the button when i mouse off.
Okay. That means you want the puck not to start from its
original
position every time. (In your Tween instantiation, you were
always starting
from 66.3 -- which of course means that's where the puck will
start from
every time.) So, how are you going to know where the puck is?
Well, the puck is a movie clip -- so look up the MovieClip
class. The
MovieClip class lists a bunch of properties, which refer to
characteristics
of the object at hand. In other words, the MovieClip class
TELLS YOU what
properties are available to any movie clip out there --
because classes
define objects, and this is a movie clip object.
So if you need to know where the puck is horizontally, look
up its
MovieClip._x property. Badda bing.
mcHome.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 58, .5,
true);
light1.gotoAndPlay(2);
That puts the current _x value of the puck instance as the
fourth
parameter of that Tween constructor. Make sense? Here's
working code for
your Flash banner ...
import mx.transitions.Tween;
import mx.transitions.easing.*;
mcHome.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 58, .5,
true);
light1.gotoAndPlay(2);
mcHome.onRollOut = function() {
light1.gotoAndPlay(this._currentframe + 70);
mcHome.onRelease = function() {
getURL("site.php?page=press&links=home");
mcCalendar.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 215, .5,
true);
light2.gotoAndPlay(2);
mcCalendar.onRollOut = function() {
light2.gotoAndPlay(this._currentframe + 70);
mcCalendar.onRelease = function() {
getURL("site.php?page=press&links=home");
mcRecord.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 373, .5,
true);
light3.gotoAndPlay(2);
mcRecord.onRollOut = function() {
light3.gotoAndPlay(this._currentframe + 70);
mcRecord.onRelease = function() {
getURL("site.php?page=press&links=home");
mcTitans.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 533, .5,
true);
light4.gotoAndPlay(2);
mcTitans.onRollOut = function() {
light4.gotoAndPlay(this._currentframe + 70);
mcTitans.onRelease = function() {
getURL("site.php?page=press&links=home");
mcPressBox.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 688, .5,
true);
light5.gotoAndPlay(2);
mcPressBox.onRollOut = function() {
light5.gotoAndPlay(this._currentframe + 70);
mcPressBox.onRelease = function() {
getURL("site.php?page=press&links=home");
... keeping in mind, of course, that each instance of the
"net" movie clip
needs the relevant instance name, and that each instance of
the "light"
movie clip should be named as shown from left to right. NO
CODE exists as
attached to any movie clips. It's all in frame 1 of a new
layer named,
arbitrarily, scripts. The correct case is in use --
Elastic.easeOut, rather
than elastic.easeOut (or easeIn, whatever you prefer). And
make sure to
correc the getURL() parameter as needed.
> I owe you big time!
If you really feel that way, I do have an Amazon Wish List.
;) Write
me off line, if you're so inclined. I'll reply with your FLA.
You're under
NO obligation to buy me anything. I mean that. If the spirit
moves you, I
won't complain -- but write me so I know where to send you
your FLA. I
think seeing it will help you out.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Increasing the speed for a certian frames in Flash Cs5 using Action Script 3
I have 60 frames I want to increase the fps value for frames from 20 to 30, and the remaining frames fps value should remain the same
Using Action Script 3 or Action Script 2
Thank you and regardsI have found a script online
Q: How can I speed the frame rate or slow it down when the movie is playing? For example, I would like to slow the frame rate from the default of 20 fps to 15 fps from frame #80 to frame #150. Then frame rate should speed back up to 20 fps after frame #151, (fps = frames per second).
A: One way is to use “interval”. An example of changing the speed of the movie from frame #80 to frame #150 is shown below.
Create a key frame at frame #80 and place this script:
var fps:Number = 80;
var intervalID:Number = setInterval(this, “advanceFrame”, 1000/fps);
stop();
function advanceFrame() {
clearInterval(intervalID);
gotoAndStop(_currentframe+1);
if (_currentframe<151) {
intervalID = setInterval(this, “advanceFrame”, 1000/fps);
} else {
play();
I have changed the values from 80 to 20 and currentframe value to 30
I get syntax error
at :
intervalID = setInterval(this, “advanceFrame”, 1000/fps);
and
var intervalID:Number = setInterval(this, “advanceFrame”, 1000/fps);
In flash cs5 -
Using an array to record button click order
I am working on a demo of a UI for a handheld device. I am
trying to make a back button that can track the users actions back
several steps.
I started by putting this line of code in my frame 1 actions
layer:
var wherefrom:Array = new Array();
then i placed this follwing code on several different
buttons:
on(release){
wherefrom.push("frame_name1");
gotoAndStop("frame_name2");
then on the back button i added this following code:
on(release){
gotoAndStop(wherefrom.pop());
it doesnt seem to be working. I was wondering if this type of
action is possible using AS2.0? any suggestions would be greatly
appreciated.I believe scene names (and also scenes) only exist at
authoring time and are converted to frame numbers when the swf is
compiled (I may be wrong because I don't use them). You might have
more success if you tried using frame numbers.
Try using
wherefrom.push(_currentframe); -
Loading Captivate files using loadMovieNum
I have a swf that was supplied to me from a client that
exported it from Captivate
I am loading it into another swf using loadMovieNum –
loadMovieNum("file.swf", 10);
When I try to do basic stuff with it such as –
_level10.stop(); or
if (_level10._currentframe==_level10._totalframes){– I
am unable to communicate with the loaded capitvate swf.
Why do they not act like regular loaded swfs, and is there
another way I can communicate with it to find out when the swf is
complete.A SWF is not necessarily a SWF, if you get my drift. It's
possible that what you want to do can't be done, but are you aware
that Captivate has it's own little set of control and navigation
variables (all left over from RoboDemo days).
The
link is right here, though the same page isw found in your
Captivate Help. This URL is linked directly to that document.
Like I said, it may not help, but FWIW . . .
. -
Sometimes _currentframe returns "undefined"
Here's an example of how I am using this..
I am calling a function "nearestOctet()" that begins with the
following two lines:
quote:
currentFrame = theMovie_mc._currentframe;
trace("On entering nearestOctet, the currentFrame is:
"+currentFrame);
Sometimes I call it and it returns a number, other times it
does not.
Can anybody please tell me what might cause this?
Thanks."Timothy Hall" <[email protected]> wrote in
message
news:ej05ms$p49$[email protected]..
> Here's an example of how I am using this..
> I am calling a function "nearestOctet()" that begins
with the following
> two
> lines:
>
quote:
currentFrame = theMovie_mc._currentframe;
> trace("On entering nearestOctet, the currentFrame is:
"+currentFrame);
>
> Sometimes I call it and it returns a number, other times
it does not.
>
> Can anybody please tell me what might cause this?
>
> Thanks.
>
What action is causing the nearestOctet() function to be
fired off? -
How do I use Edge Web Fonts with Muse?
How do I use Edge Web Fonts with Muse - is it an update to load, a stand alone, how does it interface with Muse? I've updated to CC but have no info on this.
Hello,
Is there a reason why you want to use Edge Web Fonts with Adobe Muse?
Assuming you wish to improve typography of your web pages, you should know that Muse is fully integrated with Typekit. This allows you to access and apply over 500 web fonts from within Muse. Here's how you do it:
Select a text component within Muse, and click the Text drop-down.
Select Add Web Fonts option, to pop-open the Add Web Fonts dialog.
Browse and apply fonts per your design needs.
Muse also allows you to create paragraph styles that you can save and apply to chunks of text, a la InDesign. Watch this video for more information: http://tv.adobe.com/watch/muse-feature-tour/using-typekit-with-adobe-muse/
Also take a look at these help files to see if they help you:
http://helpx.adobe.com/muse/tutorials/typography-muse-part-1.html
http://helpx.adobe.com/muse/tutorials/typography-muse-part-2.html
http://helpx.adobe.com/muse/tutorials/typography-muse-part-3.html
Hope this helps!
Regards,
Suhas Yogin -
How can multiple family members use one account?
My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data. My Husband just added his iphone to the account and got all of my daughters contacts. I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice. Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?
My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data. My Husband just added his iphone to the account and got all of my daughters contacts. I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice. Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?
-
Iphoto crashing after using mini-dvi to video adapter
Hi, IPhoto on my Macbook is crashing. I can open it, then as soon as I scroll down it locks up and I have to force quit.
This started happening right after I used a Mini-DVI to Video Adapter cable to hook my macbook up to my TV. The adapter/s-video connection worked and I was able to see the video on the tv. But iphoto immediately locked up the computer when I went to slide show and now it locks every time I open it.
Any ideas?
Thank you:)
DorothyIt means that the issue resides in your existing Library.
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
Regards
TD -
How do multiple family members use iTunes.? One account or multiple?
How do multiple family members use iTunes. One account right now but apps gets added to all devices and iTunes messages go to all devices. Can multiple accounts be setup and still have ability to share purchased items?
Hey Ajtt!
I have an article for you that can help inform you about using Apple IDs in a variety of ways:
Using your Apple ID for Apple services
http://support.apple.com/kb/ht4895
Using one Apple ID for iCloud and a different Apple ID for Store Purchases
You can use different Apple IDs for iCloud and Store purchases and still get all of the benefits of iCloud. Just follow these steps:
iPhone, iPad, or iPod touch:
When you first set up your device with iOS 5 or later, enter the Apple ID you want to use with iCloud. If you skipped the setup assistant, sign in to Settings > iCloud and enter the Apple ID you’d like to use with iCloud.
In Settings > iTunes and App Stores, sign in with the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match). You may need to sign out first to change the Apple ID.
Mac:
Enter the Apple ID you want to use for iCloud in Apple () menu > System Preferences > iCloud.
Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in Store > Sign In. In iTunes 11, you can also click iTunes Store > Quick Links: Account.
PC (Windows 8):
Enter the Apple ID you want to use for iCloud in the Control Panel. To access the iCloud Control Panel, move the pointer to the upper-right corner of the screen to show the Charms bar, click the Search charm, and then click the iCloud Control Panel on the left.
Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in iTunes. In iTunes 10, select Store > Sign In. In iTunes 11, click iTunes Store > Quick Links: Account.
PC (Windows 7 and Vista):
Enter the Apple ID you want to use for iCloud in Control Panel > Network and Internet > iCloud.
Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in iTunes 10 in Store > Sign In. In iTunes 11, click iTunes Store > Quick Links: Account.
Note: Once a device or computer is associated with your Apple ID for your iTunes Store account, you cannot associate that device or computer with another Apple ID for 90 days. Learn more about associating a device or computer to your Apple ID.
Thanks for using the Apple Support Communities!
Cheers,
Braden
Maybe you are looking for
-
DL DVD: REPORT_KEY failed : ASC = 0x6f, ASCQ = 0x04
Hi, trying to rip Monsters Inc (Pixair, Ha!), DL DVD in the latest 15" PB gives up with "REPORT_KEY failed : ASC = 0x6f, ASCQ = 0x04" error. Log files also states "SAM Multimedia: READ or WRITE failed, ASC = 0x6f, ASCQ = 0x04", but I am pretty sure i
-
Thinkpas X220 Wi Fi connectivity issue
Hi everyone, I have a problem with the wi fi connection in my laptop, the computer doesent read the wirelees divise. when I click Fn F5 all I can see is the bluetooth adapter, no wifi adapter to turn on or off, this have been happening reacently, ye
-
Wrong language after update!!!
You don't understand, after I updated itunes the language was changed to either dutch or finnish (not english, as is listed between dutch and finnish during the setup in the installation). This does not effect the itunes store, just the language of t
-
Select_List_from_Lov
Team, Here is the SQL select htmldb_item.hidden(1,pr_id) Prod, htmldb_item.hidden(2,pr_vsn_id) Vsn, htmldb_item.text(3,pr_vsn_no,5) VsnNo, htmldb_item.select_list_from_lov(4,pr_useg_in,'USEG_LOV') Usg, htmldb_item.text(5,PR_VSN_FTR_TX,25) FTR_TX, htm
-
License Status Check in Non-Subscription Country
1.) If Adobe Muse (or Creative Cloud) is purchased in the U.S. and the user travels to a country where an Adobe Muse (or Creative Cloud) subscription can NOT be purchased, such as India, will the monthly license status check still work while in that