In Between Frame Alpha Transitions
hello all...... i am in need of your action scripting expertise.
i tried a search and the results came close but didnt really help me with my problem....
I am working on a campus map for a university. I have a box in which displays information about a building or facility once the user clicks on that button in the map frame. here is the breakdown...
i have a movieclip (infobox_mc), the first frame contains a list of each building in the map that if the user clicks on the name the map will zoom to the building. then the user can click on the building in the map and the list (frame 1) will be replaced by whatever frame the info for that building is located (e.g. frame 16). What i want to happen is there to be an alpha transition from one frame to the next. so one frame fades out as the next one is fading in. I first attempted to do this with tweening but i soon realized that this method would only work if the user was to click each building in the order that they are in the frames of the movieclip.
Im assuming that i need to create a function and place it on each button within the map that tells the infobox_mc to fade current frame and fade in next frame??? but i dont know how to make this happen.... can someone help me please... This is the only thing holding up this project from getting done....
your help is greatly appreciated.....
wheatleyweb
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-21-2004, 04:05 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Alpha Transitions
First I'd like to say hello to everybody here then we go to buissines.
Well Im preety new to flash and have limited knowledge to actionscript (which Im building up every day - so its not me being passive it's me lacking knowledge) but I need this done cause Im loosing my mind over it and there is no way Im giving up on the idea which I shall explain below.
I have a menu made of seven ovals whoms initial alpha is set to 15%. When hovering over the ovals alpha should start to rise with about 5% per second for the oval we are actually hovering, the first on the left and on the right should start gaining alpha also about two seconds later with 5% per second and then the second on the left and second on the right should start gaining on alpha about four second after we started hovering our chosen oval. The outer pair also gains 5% of transparency per second. The hovered oval should gain maximum of 60% alpha, the first pair 45% and the outer pair 30%. After we rool out with the mouse the ovals should start slowly loosing its alpha down to the strarting point of 15%.
I am aware of the fact its a bit complicated thing for a begginer to start munching on but Im always like that and projects with higher levels of difficulity usually bring more experience and you learn more from ther - at least I think so. Anyway to stop me from loosing it - I dont need a complete solution for all the ovals but I would appritiate if someone would write down an example of how I could pull this off with maybe an accompaniying line of AS 2.0 since my knowledge is currently limited.
Thanks in advance to all who can point out a solution, bring forth a link to a tutorial which decrypts this dark matters to me (cmon, you surely appritiate a little humor :P) or just loose their time on reading the nonsense written above.
With Respect,
Isó
// EDIT:
PS: Im using Macromedia Flash 8 Proffesional.
Advanced Alpha Transitions
hello people,
I need to find out how the alpha transition works in the flash site linked below. if you let the movie play past the intro or just skip it, the transition im talking about happens in the main pictures of the girls and fades from white. but it isnt jus a run of the mill alpha transistion as u will see. im hoping its done using actionscript.
hope someone can help. the transistion is also used in the new photoshop cs2 flash galleries u can build!
http://www.templatemonster.com/flash...&full_screen=1
cheers. any help is much appreciated.
Tween Alpha Transitions
I'm having trouble with fading an object. I have the following code which takes a county and shrinks it back and I'd like it's alpha to be at 100% until the last minute, then go to 0 when it lands. Right now it does a slow fade.
Picture Alpha Transitions Issues...
Hello everyone, I'm new to Flash and basically my problem is that in-between transtitions my pictures seem to "distort" or move at the middle of the screen when playing my pictures movie but only after bein published and not while being edited in Flash. Does any one have ever encounter that little but annoying problem. if so, how can it be fixed?? Thank you
Why Image Moves On Alpha Transitions?
Almost all the times, images on trasitions,
even on a simple alpha from 0 to 100,
the image move or distor a little (like a jump)
making the trasition "dirty"
I always use .jpg (standard encoding)
how to avoid this?
see the test attached file
Thanks
Help With Swf Transitions To A Specific Frame
Hi peeps
I am having a hard time getting my head round this problem.
I have a main swf that has 5 buttons. Each of these movies loads a new swf into a holder MC. Each of these section swf's has a MC which is loaded in via attachMovie with the content. There are transitions between sections and pages within sections. I can get all this to work except there are a couple of links that need to go to pages in other sections. SO what needs to happen is eg:
I am in section 1 page 2 (you will see brown triangular buttons on my sample structure). On that page is a button (3rd button down), that when pressed, needs to go to section 4 page 3. So when I press this, page 2, which is the page you are in, should outro, then section 1 should outro, section 4 should intro and then page 3 should intro. The confusing part for me is that I am not sure how to tell the playhead to jump to page 3 intro after section 4 has intro'd. I guess I need to use a variable at the end of section 4 intro that will know where to jump once it has established where it has come from. I have no idea of the syntax to use for the variables.
Does this make sense.
Any help would be greatly appreciated and you could stand a chance of jumping straight to the top of my Xmas card list..........WOW.
Frame / Slide Transitions
I am currently creating a kind of advanced powerPoint style flash stand alone exe. I have an invisible button apparent on each frame and when clicked on it goes to the next frame with nextFrame();
Now i was wondering if there is anything i can add to this code that will allow me to apply a transition during the frame change. Does anyone know if this is possible?
Help With Swf Transitions To A Specific Frame
Hi peeps
I am having a hard time getting my head round this problem.
I have a main swf that has 5 buttons. Each of these movies loads a new swf into a holder MC. Each of these section swf's has a MC which is loaded in via attachMovie with the content. There are transitions between sections and pages within sections. I can get all this to work except there are a couple of links that need to go to pages in other sections. SO what needs to happen is eg:
I am in section 1 page 2 (you will see brown triangular buttons on my sample structure). On that page is a button (3rd button down), that when pressed, needs to go to section 4 page 3. So when I press this, page 2, which is the page you are in, should outro, then section 1 should outro, section 4 should intro and then page 3 should intro. The confusing part for me is that I am not sure how to tell the playhead to jump to page 3 intro after section 4 has intro'd. I guess I need to use a variable at the end of section 4 intro that will know where to jump once it has established where it has come from. I have no idea of the syntax to use for the variables.
Does this make sense.
Any help would be greatly appreciated and you could stand a chance of jumping straight to the top of my Xmas card list..........WOW.
How To Create Smooth Page(Frame) Transitions
I'm using the timeline to store my web page content so the buttons take you to different frames for different pages. I drew my pages with hand and then scanned them so the web site looks like a real painting. I have 5 paintings(pages) in total 15 frames apart from each other on the same layer. When the user clicks a button i want one painting(page) to slide out to the left while the other one comes sliding in from the right side and settles in the middle. Now it is very simple to do this with two pages, i can just do a nice motion tween and boom done! But the problem is to do this for every possible page transition combination i need to make 5 x 5 = 25 + 5 x 5 = 25 for the reverse frames = 50 animations!!!!! and there must be a simpler way to tell the button to slide out something while bringing the other one in with actionscript without doing all this..
Tough one
Please help if you possess the knowledge...
Really Newb Question (stop Function/transitions To New Frame)
ok im brand new to flash and i have a little experience in director 7, flash looks as if its the same concept except i have no idea how to make the scroll stop when i want it to. i can do all my own graphix and stuff but when it comes to putting them in flash and getting them to do what i want im really stuck.
basically i have my first image on layer one and its intro page. what i want is for when i click on a button it will goto the next fram i want. ok i have frames basically 1-30 set for the first section. how do i get it to stop when i reaches the stop keyframe. i put in the action on the frame i wanted it to stop on but the bar just roles through and it just keeps flashing through the sections im trying to do. i know i sound like a total idiot and thanx for the help in advance.
Set Alpha From Frame
Does anyone know how to adjust the _alpha of a movie from a frame on the main timeline. As you enter a frame I want the alpha of a movieclip to 'fade' to 50%. I looked around and all I could find where instances of this using buttons. When I tried to adapt the code it didn't work and I'm tight on time. Thank
[F8] Set Alpha To Mc On Frame 10
Hi,
Let's say I have a movieclip (mc). Inside this movie there is another movieclip on frame 10 for example (mc_alpha). Until the 10th frame, where mc_alpha stays, there are only blank frames. How can I set the alpha to mc_alpha to 30 using actionscript? Obviously mc.mc_alpha._alpha=30 doesn't work. (nore _root..... or _parent......). I remember having this problem a long time ago, but decided to built things in other ways. Well. now I need this . Is there a way to do it?
Thank you
Alpha Fade Through One Frame
The code below is used to show bigger images of a thumbnail gallery. What I'm trying to do now is preload all of the images into containers, then fade them in when they're called. So this code is on the frame where this is supposed to happen, but for "sheart" it only barely fades in (gets to the first step) before stopping, and "gzilla" of course just pops in at full alpha. What I want is a smooth transition. Is this possible??
Thanks for any help.
Code:
if (art == "sheart"){
if (_root.container1._alpha < 100) {
_root.container1._alpha += 5;
}
} else if (art == "gzilla"){
_root.container2._alpha = 100;
}
Actionscript Frame Alpha Help
I have code to make an icon blink:
Code:
eval(idfbut).onEnterFrame = function() {
this._alpha = this._alpha+7;
if (this._alpha >= 92) {
this._alpha = 10;
}
When I switch frames I need it to stop blinking... something like:
Code:
eval(idfbut).onExitFrame = function() {
this._alpha = 100;
}
But I'm pretty sure onExitFrame is a figment of my imagination.
Any help would be greatly appreciated.
Thanks
Alpha 0% To A Button.. In One Frame :s
Hello people.
Well, I have a small problem with three buttons whose functionality depends on the on (press) and on (release) actions.
My buttons are snaped (startDrag) when the user clicks on them, but I need them to go from Alpha 100% to Alpha 0% just when they release them.
Anyway you can help me here?
Thank you very much.
Fade MC Alpha With Frame Script
I have an mc named 'loading' on my main movie timeline.
Through a framescript I'd like to fade the mc's alpha to 0 and then once it's at zero, move to the next frame. Can someone send me an actionscript example of this please?
Thanks
-Foochuck
Onenter Frame Alpha Fade
Hi FlashKit'ers, i have a quick question that seems very easy ,even for me. But i just can't seem to get it down.
My scenario:
I'm trying to make a transition effect here. a'la this tutorial Now, when the closing animation ends, i need the "container" movie clip to alpha fade so that the other movie can load into it. So basically, i just need to know how to have an emptymovieclip alpha fade when the movie enters a frame (say23).
This is what i have so far.
Code:
onClipEvent(enterFrame){
_root.content._alpha -= 1;
}
[EDIT]
Alright, i made a huge mistake that i just caught, i shouldn't even be using the onClipEvent, right?[/EDIT]
But, it isn't working for some reason. Any help? Thanks, take care.
Alpha Tween On Enter Frame
I am tying to get a movie clip to change alpha every time a frame is entered. I want the alpha to change gradually from 100% to 0%. Here is my attempt so far:
Code:
_root.fadeBox_mc.onEnterFrame = function() {
easeType = mx.transitions.easing.Bounce.easeOut;
var begin = 100;
var end = 0;
var time = 15;
var mc = fadeBox_mc;
startAlphaTween = new mx.transitions.Tween(mc, "_alpha", easeType, 0, 100, time, true);
};
I am using MX2004!
Alpha Tween On Enter Frame
I am tying to get a movie clip to change alpha every time a frame is entered. I want the alpha to change gradually from 100% to 0%. Here is my attempt so far:
Code:
_root.fadeBox_mc.onEnterFrame = function() {
easeType = mx.transitions.easing.Bounce.easeOut;
var begin = 100;
var end = 0;
var time = 15;
var mc = fadeBox_mc;
startAlphaTween = new mx.transitions.Tween(mc, "_alpha", easeType, 0, 100, time, true);
};
I am using MX2004
Make Graphic Alpha On Entering Frame
Hi,
Is it possible to change the code below to work as a timeline EnterFrame script as opposed to a button. E.g when the timeline reaches frame 50 within a movieclip called "field" it makes wheat2 graphic in the root timeline on frame 1 invisible?
on (press) {
(alphaStatus) ? _root.wheat2._alpha=100 : _root.wheat2._alpha=0;
alphaStatus = !alphaStatus;
}
Cheers
Transitions Between External SWFs W/ Symbol Transitions - HELP
So I've been pouring over this forum looking for a solution to my problem. (this is probably a little lengthy, so I apologize in advance).
I've been using the techniques in the tut: Transitioning between external SWFs
to create a little flash movie to be used for work. I've created files to mimic the tut, ALMOST to the T.
Somethings that I have changed... I'm using a transition on a symbol to fade in and out. I'm also using a gray gradient in the first 12 frames as a "woohoo, look at me" intro.
So my problem is that when I start the mainmovie.swf file it's supposed to pull in the first swf file (section1.swf) and go through the same actions as the above tut. But what is REALLY happening is that section1.swf starts, but it's only the gray gradient. When I click on button 2, I get the same gradient, only this one loops (which isn't supposed to happen). Same thing with section 3.
I've gone through the code (which should be right, because I cut/pasted into flash, changing only the file names), but also doesn't mean much, because this is my first dive into AS.
Yes, I have five buttons and only three external fla files, I figured, let me get these working first, and then do the other two buttons.
On top of this, I wanted to get the entire sequence to play and loop three times. But my main concern is to get the buttons working. I would attach the files, but they are too big, even zipped.
HELP PLEASE! Thank you in advance,
~V
Alpha Fade Image, Wait, Fade Out, Next Frame
Greeting,
After three hous of review I have now looked at so many scripts (here and elsewhere) of fading in/out that I am more confused instead of less confused, which seems odd I know.
Here is what I have and what I want to do. I am using MX.
I have twenty images, one one each frame of a movie clip, placed around the stage. I want the imges placed instead of loaded so that I can control where they appear on the stage. I would like each image to fade in, stay on the stage for 4 seconds, fade out, and then go to the next frame (and repeat with the image located on that frame). Does anybody have any scripts that already do this. I am a beginner and I am not that famaliar with action scripting. I think what I need to do is use an onEnterFrame, with an alpha fade in, some type of delay/counting script, and then a fade-out, and go to the next frame.
I know that you all have thousands of things you could be doing instead of helping me, so please know that I appreciate it.
BitmapData Alpha Breaks When Changing Alpha Of Container Sprite
Hi,
I posted this in Flash CS3 forum on Friday, but have had no replies, and am still stuck, sorry for cross-posting.
I have the following structure:
Code:
Pane:MovieClip
Content:Sprite
image:BitmapData
Pane is an asset in the Library, and is dynamically placed inside another Sprite. The Library asset Pane already contains the Content sprite which contains the image BitmapData.
The image is originally a 24-bit PNG, and it doesn't seem to matter to the problem whether I use Lossless or Photo compression.
My problem is when I change the alpha on the Content Sprite in the Pane class, the alpha transparency image on turns to a solid black.
Also, not sure if this is related, two textboxes in another Pane's Content Sprite get two horizontal white lines, above and below, them--while I am changing the alpha of the first Pane.
Anybody know how to fix this?
This is my first AS3 project, so apologies if I missed something obvious.
Scrllpane Comp Changing Alpha But Not Contents Alpha.
I've had a go at this a few times it seems the scrollpane component can change the _alpha of it but that changes the content mcs ect that is in the comp to the same alpha as well. I want to make the scrollbars of it alpha 50 and the mcs in it stil 100 normal. It involves loading many more mcs swf's into the scrollpane so just need it set to main content at 100 percent alpha and so be able to change the scrollbars to alpha 50 or whatever?
Couldn't Control Alpha Of The Children Mc After Set The Parent's Alpha
Hi,
I have 4 little thumbnails mc in a parent mc, and I set the alpha of the
parent mc to 0, then I want the child to appear one by one, but flash
won't respond to that unless I set the alpha of the children seperately
to 0, does anyone know how to solve that? thanks in advance.
-c
Changing Alpha Programatically - Alpha Values Not Whole Numbers
I'm doing alpha changes on an image programatically in an onEnterFrame method. My code is this simple:
trace(mc1_mc._alpha);
mc1_mc._alpha -= 2;
trace(mc1_mc._alpha);
The output is:
100
97.65625
My question is, how is 100 - 2 = 97.65625? What is going on here? It gives this answer even if I use Math.round() on it. Any ideas?
Advancing Alpha Counter...as In Alpha Numeric
Is there a way to get an advancing alpha counter, such as a, b, c, d, etc. instead of 1, 2, 3, 4, etc.
Other than creating an array of a, b, c, d
advancing = new Array("a", "b", "c", "d");
i++;
advancing[i];
Thanks.
_t
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
[jpeg Alpha Load] Loaing Jpg In To A Mc With Alpha
ok i am loading a jpeg into a empty MC and when it load in i would it to alpha from o to 100
please can you help
i have been trying with this
onClipEvent(data) {
_alpha == 0;
_parent.images = int(getBytesLoaded()/getBytesTotal()*100);
if (getBytesLoaded() != getBytesTotal()) {
isloaded = 1;
}
}
onClipEvent(enterFrame) {
if (isloaded) {
alpha ++;
if (_alpha == 99) {
isLoaded = !isLoaded;
}
}
but not get any luck
How Can I Make A Button Go From Alpha 0 To Alpha 100
i wanna create a rollover button
i made the before and after pngs in PS
and i want to put the image that will appear over the original image with an alpha of 0 and when i roll over it the alpha to turn to 100 so it looks like the fade in
how do i change a graphic alpha ?
how can i do this please help
Previous Frame Overlay..... Frame By Frame By Frame By Frame By Frame By.....
Hello there.
I am trying to create a small animation just as a little bit of fun. I would like to do it frame by frame.
I have a simple question to ask about frame by frame animation.
When drawing frame by frame, you would usually have a transparent overlay that you can compare with the next frame. Is there a way to do this in flash without having to copy the previous keyframe into a new keyframe on a new layer?
Thanks Emdiesse
Making Alpha 0 To Alpha 100
Dear All,
I was just wondering if anybody knows, how to change alpha 0 to 100 for a perticular layer ?? I would really appreciate for the help, Thanks !!
-Ankur
Alpha Changes In A Gradient With Alpha
Hi there I am having a bit of a problem.
I have a gradient which goes like this:
100% Black -----> 60% Black
This gradient is over an object. And the whole form a movieclip.
Now if I want to apply a tween effect to that movieclip, lets say, frame 1 mymc is 100% alpha and tweens to 0% alpha in frame 20, this makes the gradient dissapear wile tweening showing the object that was beneath it in the movieclip. The gradient is not a mask, and even if I convert it as a mask and tick the Use Runtime Bitmap caching, and I create it from AS3 it does the same.
I don't know if I explained myself properly, but I'd like some input from you guys
thanks!
Trying To Make Movie Play Frame X To Frame Y Then Switch To Frame Z..
Hello,
I was hoping someone could help me out with an issue I'm having. I have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.
I'm halfway to accomplishing this.
Here is what i used
Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
gotoAndPlay("Home2",1);
}
}
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.
Upon clicking the navigation button it plays the above scenes.
However it doesn't change scenes to scene "Home2".
Thank you in advance for all your replies.
GotoAndPlay(frame) Messing Up If Frame Is The Current Frame
I have a bug with my buttons and I am trying to figure out how to fix them. I have about 5 different buttons that will take me to different places on my website (http://www.usu.edu/drc)(don't judge me on design, I am not the greatest web designer)
Anyway, if I click on the students button it will load the students swf and take me to that frame in my mc. If I am already in the students frame, it loads the next frame in my mc instead doing nothing, which is what I want it to do. Anybody know why this is?
Now to fix the problem. I am fairly new to AS and was hardcoding my frames, but as I add frames and move things around, I have to go in and change the frame numbers, hello frame labels. Well, I now have the different frames labeled but I need to check if _currentFrame is equal to my frame label. I don't know how to do this.
What I was thinking is something like this:
if(_currentFrame.name == "students"){ don't do anything }
I don't know if this would work or if this is even the right syntax. Anybody have an idea on this one? Thanks for the help.
Jason
Going To A Frame An Then Going To A Frame Within A Movie Clip In That Frame
I am having trouble with a nav bar I made in flash.I have a variable that determines where we want to go in the movie I am trying to going to a frame an then going to a frame within a movie clip in that frame.
in other words I would like things to happen
1. go to frame #
2. show the frame # state on the movie in clip that frame
is this possible?
Movie Go To Random Frame Flash MX (Strange Problem With A Frame Showing As Blank)
I'm building a site for my fathers company and as part of the header I'm trying to get a movie to decide a random frame to go to so it plays a random animation at the top of each page.
I am using this script (which im not sure is right to make it do this)
play();
what_number = Number(random(3)+1);
gotoAndStop(_root.what_number);
It seems to work but the problem is there are 3 frames, 2 show up fine in random mode but it seems when the other is going to be shown i just get a blank frame instead with just the bg colour showing, ive spent hours trying to work out whats going on but I have no idea.
The site can be viewed at http://www.andrew-winchester.com/pip After you navigate from the index page the smaller random header appears and should show either of the 3 animations from the main header on the index.
Here is a link to the .fla for the smaller header file if that helps http://www.andrew-winchester.com/pip/header.fla
This is really driving me crazy, there must be some simple solution that I am overlooking or some silly mistake ive made ?
Thanks for anyone that can solve it !
How Do I Connect Flash Menu (top Frame) To HTML Pages (bottom Frame)?
Hi,
I am new to flash/swish...
How do I connect the Flash menu system that I set up in Swish that will be embedded in the TOP frame to the standard HTML pages to be selected in the BOTTOM frame?
FYI: I am using Frontpage 2000 to create the frames and standard HTML pages
I can create the HTML page containing the Swish/Flash menu- no problem there. I just don't see the connection between the two. WHat's glueing them together. Is this accomplished with hyperlinks within FrontPage OR is this done from the Swish side and then seen by FrontPage after it is embedded?
Thanks to all who reply.
All the best.
Object Created In A Frame's Actions Telling Parent Frame To Delete It?
I've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:
Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();
addChild(foobar);
stop();
CFoobar then creates and manages some buttons, etc. At a certain point, CFoobar knows it's time has come, and it wants to be deleted, and have the frame go to another frame.
What's the best way to have it do this?
How To Address A Button On The 5th Frame Of A Movie Clip With Action Script Located On The First Frame Of The Main Time
I'm trying to make a button appear on frame 10 of a movie clip and write actionscript on the main time line that addresses that frame 10 button. I'm not sure of the method I need to do to get that frame 10 button to get a url. I tested the same button when put on frame 1 and it worked, but I'm not sure how to address buttons and other symbols that appear as a result of the playhead moving to different places on movie clip time lines.
Can anyone help, or give me a link?
Thanks
Dennis
Attach Code
//works
_root.buttons_mc.go_btn.onRelease = function(){
_root.mall_mc.gotoAndPlay(1);
//a stop action is placed on frame 10 of the mall_mc movie clip
};
//this button is inside the mall_mc movie clip on frame 10
//doesn't work
_root.mall_mc.url_btn.onRelease = function(){
getURL("http://yahoo.com");
};
//An instance of the same url_btn is dragged on to frame 1 of the mall_mc
//movie clip and given an instance name url_frame1_btn
//works
_root.mall_mc.url_frame1_btn.onRelease = function(){
getURL("http://yahoo.com");
};
Unchecking Export In First Frame For Components Does Not Reduce Frame 1 Size
Hey all...
I have a movie all finished up, but for some reason, frame1 is still 56K...I have deselected all "export on first frame" checkboxes, but it seems the component export classes are still loading in frame one...even the Flash help says to simply uncheck export in frame 1 in the linkage settings, but it still is not working...any ideas?
I googled it and it seems a lot of components tend to mysteriously use frame one even with the export option unchecked...if anyone has any info on how to remedy this, please let me know. Thanks.
EDIT: Nevermind...I found out after some more diggin that components will ALWAYS export in the first frame, REGARDLESS of if you have unchecked the option to do so or not. I had to go into the Publish Settings and click the "Settings" button found next to the "ActionScript Version" drop-down box on the Flash tab, then simply manually change the class export frame from frame 1 to frame number 2...
I explained this in case someone else runs into this same problem down the line.
|