| Function calls - reference |
|
 |
Index ‹ flash-actionscript
|
- Previous
- 1
- mc buttons - functionsHi there
I have a bit of a sticky one I think - but hopefully you will be able to see
something in my code that I am missing...
I have a menu that I am using with movie clips as buttons, and all of the
functions in one frame on the first frame of the movie.
Each "button" is not a button at all, but a movie clip, with the correct
instance name, as seen in the code below (eg craftBUTTON) and they are all set
at alpha 80%
It is currently loaded as is here :
http://www.fili.com.au/buttons-play.htm
You will see straight away what the problem is - most of the buttons seem to
work ok, but then the second one keeps decreasing in alpha each time it is
rolloed over, and does not increase when the mouse rolls out.
Also, the third button increases in alpha and stays at 100%
The code on the first frame is attached (I hope!)
The next trouble I am having comes when I want to do an onRelease function,
and the timeline does not seem to want to stop at the stop action I have on
that frame - but we'll worry about that when I get this first bit fixed up!
I am hoping that it is just something I am missing in the code, or maybe there
is conflict and I need to separate the functions out..?
Thankyou!
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
craftBUTTON.onRollOver = function() {
craftBUTTON._alpha +=20;
craftBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(craftBUTTON,
"_xscale",Elastic.easeOut,craftBUTTON._xscale,110,2,true);
new Tween(craftBUTTON,
"_yscale",Elastic.easeOut,craftBUTTON._yscale,110,2,true);
}
craftBUTTON.onRollOut = function() {
craftBUTTON._alpha -=20;
new Tween(craftBUTTON,
"_xscale",Elastic.easeOut,craftBUTTON._xscale,100,2,true);
new Tween(craftBUTTON,
"_yscale",Elastic.easeOut,craftBUTTON._yscale,100,2,true);
}
storyBUTTON.onRollOver = function() {
storyBUTTON._alpha +=20;
storyBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(storyBUTTON,
"_xscale",Elastic.easeOut,storyBUTTON._xscale,110,2,true);
new Tween(storyBUTTON,
"_yscale",Elastic.easeOut,storyBUTTON._yscale,110,2,true);
}
storyBUTTON.onRollOut = function() {
storyBUTTON._alpha -=20;
new Tween(storyBUTTON,
"_xscale",Elastic.easeOut,storyBUTTON._xscale,100,2,true);
new Tween(storyBUTTON,
"_yscale",Elastic.easeOut,storyBUTTON._yscale,100,2,true);
}
collectBUTTON.onRollOver = function() {
collectBUTTON._alpha +=20;
collectBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(collectBUTTON,
"_xscale",Elastic.easeOut,collectBUTTON._xscale,110,2,true);
new Tween(collectBUTTON,
"_yscale",Elastic.easeOut,collectBUTTON._yscale,110,2,true);
}
collectBUTTON.onRollOut = function() {
storyBUTTON._alpha -=20;
new Tween(collectBUTTON,
"_xscale",Elastic.easeOut,collectBUTTON._xscale,100,2,true);
new Tween(collectBUTTON,
"_yscale",Elastic.easeOut,collectBUTTON._yscale,100,2,true);
}
engageBUTTON.onRollOver = function() {
engageBUTTON._alpha +=20;
engageBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(engageBUTTON,
"_xscale",Elastic.easeOut,engageBUTTON._xscale,110,2,true);
new Tween(engageBUTTON,
"_yscale",Elastic.easeOut,engageBUTTON._yscale,110,2,true);
}
engageBUTTON.onRollOut = function() {
engageBUTTON._alpha -=20;
new Tween(engageBUTTON,
"_xscale",Elastic.easeOut,engageBUTTON._xscale,100,2,true);
new Tween(engageBUTTON,
"_yscale",Elastic.easeOut,engageBUTTON._yscale,100,2,true);
}
mediaBUTTON.onRollOver = function() {
mediaBUTTON._alpha +=20;
mediaBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(mediaBUTTON,
"_xscale",Elastic.easeOut,mediaBUTTON._xscale,110,2,true);
new Tween(mediaBUTTON,
"_yscale",Elastic.easeOut,mediaBUTTON._yscale,110,2,true);
}
mediaBUTTON.onRollOut = function() {
mediaBUTTON._alpha -=20;
new Tween(mediaBUTTON,
"_xscale",Elastic.easeOut,mediaBUTTON._xscale,100,2,true);
new Tween(mediaBUTTON,
"_yscale",Elastic.easeOut,mediaBUTTON._yscale,100,2,true);
}
showBUTTON.onRollOver = function() {
showBUTTON._alpha +=20;
showBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(showBUTTON,
"_xscale",Elastic.easeOut,showBUTTON._xscale,110,2,true);
new Tween(showBUTTON,
"_yscale",Elastic.easeOut,showBUTTON._yscale,110,2,true);
}
showBUTTON.onRollOut = function() {
showBUTTON._alpha -=20;
new Tween(showBUTTON,
"_xscale",Elastic.easeOut,showBUTTON._xscale,100,2,true);
new Tween(showBUTTON,
"_yscale",Elastic.easeOut,showBUTTON._yscale,100,2,true);
}
memberBUTTON.onRollOver = function() {
memberBUTTON._alpha +=20;
memberBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(memberBUTTON,
"_xscale",Elastic.easeOut,memberBUTTON._xscale,110,2,true);
new Tween(memberBUTTON,
"_yscale",Elastic.easeOut,memberBUTTON._yscale,110,2,true);
}
memberBUTTON.onRollOut = function() {
memberBUTTON._alpha -=20;
new Tween(memberBUTTON,
"_xscale",Elastic.easeOut,memberBUTTON._xscale,100,2,true);
new Tween(memberBUTTON,
"_yscale",Elastic.easeOut,memberBUTTON._yscale,100,2,true);
}
contactBUTTON.onRollOver = function() {
contactBUTTON._alpha +=20;
contactBUTTON.swapDepths(this.getNextHighestDepth());
new Tween(contactBUTTON,
"_xscale",Elastic.easeOut,contactBUTTON._xscale,110,2,true);
new Tween(contactBUTTON,
"_yscale",Elastic.easeOut,contactBUTTON._yscale,110,2,true);
}
contactBUTTON.onRollOut = function() {
contactBUTTON._alpha -=20;
new Tween(contactBUTTON,
"_xscale",Elastic.easeOut,contactBUTTON._xscale,100,2,true);
new Tween(contactBUTTON,
"_yscale",Elastic.easeOut,contactBUTTON._yscale,100,2,true);
}
- 1
- Dynamic text + mask problemHello ..
I have a problem ....
I'm loading in a xml file, an output the data in some movieclips with dynamic
text fields ....
The movieclips is under a mask .... and that is my problem .... my text seems
to disapear ?? Hmm.
Why is that ..... Please help!
- 2
- Question about frame rateHi all,
Just want to ask, if you could possibly help me in finding the table that
illustrates when to use a particulat frame rate like 12 fps is use to ..... 24
fps is use for standard motion picture etc.. etc and etc..
Thanks a lot.
- 2
- how to build dynamic variable names in loopHi,
I have N instances that are named "variable1, variable2, variable3, etc..".
How can I refrence them in a loop, like :
for (var i=0; i<N; i++)
{
variable.text = "this is variable" + i;
}
thanks.
- 3
- Focus problem for rollovers on textinputs...help plssHi,
I am having a strange problem with focus.i am using tool tips and textinputs.
I have rollovers(movie clip) on the text input boxes(some with no
rollovers).When i run the .fla file for the first time, i am not able to click
on the textinput, but i can see the rollover text with it. When i click a
textinput box(with no rollovers) and come back and click this textinput with
rollovers, I am able to change and edit everything. So it happens everytime
when i go out of these textinputs(with rollovers) and click radiobuttons and
come back again first time problem(not able to change textinput field). can
someboedy help me in solving this problem.
I want the textinput boxes to be active and whenever clicked on them,i should
be able to change/delete the data anytime in the textinput.here is the code.
private var tt:MyToolTip = new MyToolTip();
public function onLoad() {
sales_txt.onRollOver = function() {
//show the rollover text
tt.showTip(" Total sales.");
}
sales_txt.onRollOut = function() {
tt.removeTip();
}
}
class ToolTip {
private var my_mc:MovieClip;
function ToolTip() {
this.my_mc = _root.createEmptyMovieClip("tooltip",root.getNextH ighestDepth());
this.theTip.createTextField("theText",this.my_mc.g
etNextHighestDepth(),3,1,200,70);
}
function showTip(text:String) {
this.my_mc.theText.text = text;
this.my_mc._visible = true;
this.my_mc.onMouseMove = function() {
this._x = _root._xmouse ;
this._y = _root._ymouse+25;
updateAfterEvent();
}
}
public function removeTip():Void {
this.my_mc._visible = false;
delete this.my_mc.onEnterFrame;
}
private var tt:MyToolTip = new MyToolTip();
public function onLoad() {
sales_txt.onRollOver = function() {
//show the rollover text
tt.showTip(" Total sales.");
}
sales_txt.onRollOut = function() {
tt.removeTip();
}
}
class ToolTip {
private var my_mc:MovieClip;
function ToolTip() {
this.my_mc =
_root.createEmptyMovieClip("tooltip",root.getNextH ighestDepth());
this.theTip.createTextField("theText",this.my_mc.g
etNextHighestDepth(),3,1,200,70);
}
function showTip(text:String) {
this.my_mc.theText.text = text;
this.my_mc._visible = true;
this.my_mc.onMouseMove = function() {
this._x = _root._xmouse ;
this._y = _root._ymouse+25;
updateAfterEvent();
}
}
public function removeTip():Void {
this.my_mc._visible = false;
delete this.my_mc.onEnterFrame;
}
}
- 3
- Scroll wheelcan someone please tell me how to get the scroll wheel to work in a flash movie?
thanks,
dawn
- 4
- Size of movie in pixelsI have a flash movie that should do certain actions depending on what size it
is in HTML. I don't want the movie to have fixed size. Is it possible to reach
width and height of the movie from within the movie? The code below always
returns the default size as it was set in Flash, no matter how the sizing in
HTML change it.
trace(_root._width)
trace(_root._height)
- 7
- Problem Creating New ClassHello,
I seem to be having a problem creating a new class whether it is extending an
existing class or simply new altoghther. I am on a computer and network that
is new to me and i have done projects involving classes sucessfully before.
The error message i receive is (error msg example is from help file class):
**Error** [.as file path] : Line 1: The name if this class, 'Plant'. conflicts
with the name of another class that was loaded, 'Plant'.
class Plant {
Total ActionScript Errors: 1 Reported Errors: 1
This msg appeared after a movieClip was linked to the script and the preview
option used. Could this be from some setting or preference that i have never
seen? Flash version is 7.2 Professional and have tried renaming the whole
linkage chain with the same script, producing the same error, whether the
script is from scratch or copied from the help files.
Any help will be greatly appreciated.
Thanks
- 8
- Loading Sprite Using Loader Need Access to Sprite TypeHello,
I'm loading a Sprite via a Loader and once loaded I have access to that Sprite
via the Loader class. I can manipulate the Sprites alpha, x and y coordinates
ect. However, I have a custom function that fades in or out the passed param
and it expects a Sprite. When I pass the loaded Sprite (loaded via the Loader
class) I get an error:
1067: Implicit coercion of a value of type flash.display:Loader to an
unrelated type flash.display:Sprite.
I know that the problem is that it expects a Sprite, but how do I access the
Sprite type once the swf is loaded via the Loader?
My Code:
import FadeClip;
var ldrMovieCntr:Loader = new Loader();
addChild(ldrMovieCntr);
var fcLoadedMovie:FadeClip = new FadeClip(); //CUSTOM CLASS
fcLoadedMovie.setClipToFade(ldrMovieCntr); //PASSING IN A TYPE Loader - CLASS
EXPECTS A Sprite
Thanks in advanced,
Vic
- 11
- Display Different Image At different times of day?I was wondering, if anyone knows how to display a different movieclip a
certain times
For instance between 6 am and 2 pm one movieclip will be on the stage, and
between 2pm
and 9 pm another movieclip and so on.
I just need the basic time detection script. I think I can work out the
rest. And its only on load
so its not constantly being checked.
Thanks in Advance
- 13
- creating back and forward buttonsI was planning on using the named anchor feature in order to use the browser back/forward buttons but found that they did not work on a mac. Is there any as out their to attach to buttons that will function as a back/forward button.
In essence, it would need to get last frame label the movie was on?
Any help is greatly appreciated
Kristy
- 13
- preload website with components in libraryi'm making a flash website. on the swf file i have some symbols consisting of
several movieclips and a couple of components. the total size of the swf file
is about 80kb.
on the first frame of the file i have a movieclip as a progress bar and this
script :
var preloadSite = function() {
var bytesLoaded:Number = _root.getBytesLoaded();
var bytesTotal:Number = _root.getBytesTotal();
if (bytesLoaded>=bytesTotal) {
clearInterval(preloadInterval);
_root.gotoAndPlay("start");
} else {
progressbar._xscale = Math.round((bytesLoaded/bytesTotal)*100)
}
};
var preloadInterval:Number = setInterval(preloadSite, 25);
stop();
the problem i'm having is the progress bar won't show up and the file doesn't
seem to do anything. but if i refresh the browser it would play as if the file
has finish loading.
i've used this script before but without components in the library and it
works fine.
what do i need to do so that the preloader works?
- 13
- repeating case in an if statement?I have the following if statement in my code. It all works fine, and the
else part kicks in at the right time, but for some reason, get excecuted
over and over. So I get a stream of "testing the removeListener" in my
output window. I want this part to only happen once.
function loadMyMovie(id:Number):Void{
// first check if we still have swf's to load
if(loader_number<swf_array.length){
thumb_loader_mcl.loadClip("thumbs/"+id+".jpg",swf_array[id].mc);
//thumb_loader_mcl.loadClip("../flash/thumbs/"+id+".jpg",swf_array[id].mc);
} else {
thumb_loader_mcl.removeListener(this);
trace("testing the removeListener");
//create a new movie clip and then load the first main movie
this.createEmptyMovieClip("mainContent", this.getNextHighestDepth(),
{_x:235, _y:85, _alpha:100});
main_loader_mcl.loadClip("content/0.swf",mainContent);
}
}
This gets called from a function which looks like the following, maybe
the problem is there?
I am kind of at a loss at this and not sure. Any help would be greatly
appreciated.
Thank you,
Brian
function onLoadInit(target:MovieClip):Void{
// position the swf based on info from the sfw_array
target._x=swf_array[loader_number].x;
target._y=swf_array[loader_number].y;
//attache the number
this.attachMovie("loader"+loader_number, "loader"+loader_number,
this.getNextHighestDepth(), {_x:swf_array[loader_number].x,
_y:swf_array[loader_number].y, _alpha:100});
//put the lines on the hightes level again
//and move the latest attached loader one level down
this["loader"+loader_number].swapDepths(this.getNextHighestDepth()-1);
lines.swapDepths(this.getNextHighestDepth());
// set the onRelease handler for the loaded movies
//setRelease(loader_number);
setRelease(this,loader_number);
//turn on the button
this["turnOnBtn"+loader_number]();
// increase loader_number for next swf to load
loader_number++;
// fade in our loaded swf
var aTween:Object=new
Tween(target,"_alpha",Regular.easeOut,0,100,1.5,true);
// when swf has reached an alpha of 100, start loading next swf
loadMyMovie(loader_number);
}
- 15
- AS3.0: How to extend a class that extends MovieClipWhen I try to set the base class of a library symbol to a class that doesn't
DIRECTLY extend MovieClip, but instead extends another class that DOES extend
MovieClip, it's disallowed, saying, "The class 'Whatever' must subclass
'flash.display.MovieClip' since it is linked..."
Is this just a validation bug in the property windows, only checking one class
deep into the inheritance hierarchy? Because the specified class does extend
MovieClip, just two levels in instead of one. Is there a fix for this? Or must
library symbols always directly extend MovieClip? If so, why?
- 15
- calling external program usring fscommandI M USING FLASH MX 2004
I M TRYING TO CALL EXTERNAL PROGRAM
LET'S SAY ORACLE FORM FILE 'IFRUN60.EXE' AND PASSING PARAMETER LIKE THIS
IFRUN60 USERID=SCOTT/TIGER MODULE=PLANT.FMX
BUT UNABLE TO PASS PAREMETER
|
| Author |
Message |
TheSpongebob

|
Posted: 2004-8-14 0:50:12 |
Top |
flash-actionscript, Function calls - reference
If I call a function from a symbol event ( on release ), can I somehow pass the
symbol itself or a reference to it to the function ? I want to use the
reference in the function to make the calling symbol invisible.
Button Symbol calls function. How can the function make the button _visible =
false
|
| |
|
| |
 |
| |
 |
Index ‹ flash-actionscript |
- Next
- 1
- switching frames in side by side movieclipsI have a single scene, which contains side by side movieclips. The movieclip on
the left contains a series of buttons. I would like to have these buttons
control which frame of the movieclip on the right side of the screne is
displayed. Please help.
Thanks,
Michael
- 2
- Window pop-upHi. I want to create a pop-up showing a movieclip called "mcTest" whenever a
button instance named "btButton" is released. How can i do that using a window
component? I tried this code, but it doesn't work
import mx.containers.Window;
import mx.managers.PopUpManager;
btButton.onRelease = function():Void{
var cwMessage:MovieClip = PopUpManager.createPopUp(this,
mx.containers.Window, true, {contentPath: "mcTest", closeButton: true});
}
I have already set the mcTest to be exported for actioscript with the linkage
identifier "mcTest". Could anyone help me please?
Thank you all!
- 3
- XML based slideshow, how do I fade?ok so I am just getting into actionscript, and I am trying to make a website
for a photography site. This is a contract job, so I want the client to have to
ability to just drag and drop new images into the images folder, and then the
XML file reads that folder and just pulls images from it, so that he won't have
to use flash everytime he wants to update it. So far I have made it so it pulls
a new image up every 4 seconds. But here is the problem, I want to images to
fade from one to another. I know I can use this code: whatever.alphaTo(100, 3,
"easeInOutSine");
I have attached my code. The effect that I am going for is this: I want the
image to take 2 seconds to fade up, then hold for 3 seconds, and then take 2
seconds to fade out, but then the next image needs to start fading in after 1
second of fade out of the first image, so there is a nice smooth transition. I
am guessing I need two setIntervals, one for the fades, and one for the hold,
but I am kinda new to this so maybe some of the more experienced people can
help me with this. Thanks in advance for any advice.
- Ryan
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;
function startSlideShow(success)
{
if (success == true)
{
rootNode = slides_xml.firstChild;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
updateSlide(firstSlideNode);
}
}
function updateSlide(newSlideNode)
{
imagePath = newSlideNode.attributes.jpegURL;
loadMovie(imagePath, targetClip);
}
function slideSwitch()
{
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null)
{
updateSlide(firstSlideNode);
currentSlideNode = firstSlideNode;
}
else
{
slideFade()
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
}
function slideFade()
{
currentSlideNode.alphaTo(0, 3, "easeInOutSine");
}
setInterval(slideSwitch, 4000)
- 4
- Passing values to Windowhi..
i am very new to flash... i am trying to open a Window at a click of a
button and attach movie to it... now i want to pass the values of the component
on the main document to a component of the movie clip... i cant figure out how
to accomplish it..:confused;
please help.... the code o have written is
on(click)
{
import mx.managers.PopUpManager
import mx.containers.Window
var my_win = PopUpManager.createPopUp(_root, Window, true, {closeButton: true,
title:"My Window"});
my_win.setSize(300,400);
my_win.attachMovie("name", "name_mc",my_win.getNextHighestDepth() , {_x:0,
_y:20}); //attaching
my_win.name_mc.name_txt.text = "Hello"; -----------------------> name_txt is a
text box in the movieclip
//////////////////////
//adding a listner to the popup window for closing
//////////////////////
windowListener = new Object();
windowListener.click = function(evt){
my_win.deletePopUp();
}
my_win.addEventListener("click", windowListener);
}
- 5
- bringing a movie to the top????Hi
This problem could be solved by assigning proper depth to each MC. Here is
explaining the same withh few steps:
1. Assuming u have 10 MC. Now attach those to the stage using attachMovie()
2. Assign unique depth tto each MC ( say 1,2,3 ....,11)
3. Now when u click on a Particular Instance to drag then set its depth using
swapDepth(15) // 15 or the heighest depth than the given to other MC)
4. Once it stops dragging then set its swapDepth back to the orignal. But
first u need to store its inital depth using getDepth() in to a variable.
I hope this would help u !!
Ashish
- 6
- Flash Video cuePoints are messed up...Anyone else notice that things aren't working with cuePoints... or is it
just me. I am trying to use multiple cuePoints on a video, using the
Obj.target.name
and the component must be messing up.
I have an example from the CD that came with Flash MX 2004 ActionScript book
and it works fine right off the cd, but try using a new MediaPlayback
component, since the update and no go. Just keeps returning the name as
undefined. This is royal BS or I am just totally missing something and no
one is addressing it.
- 7
- Help with Key ListenersFirst I'd like to say thank you to anyone that can help me out with this.
I've set up a key listner and it works fine with the space bar but I want to
use the number keys to control it instead. Numbers 1, 2, 3 and 4 to be exact
and I was wondering how I would need to change my code to have it listen for
those numbers.
Here is my code so far:
this.onEnterFrame=function()
{
if(Key.isDown(Key.SPACE))
{
One_Buzzed_In._visible = true;
buzzed = new Sound(this);
buzzed.attachSound("buzzer");
buzzed.start(0, 1);
}
}
Thanks again for any help.
- 8
- New to ActionscriptMy eyes are getting old...I didn't see the " " until you mentioned it...haha. Very observant Cinemaguy !
- 9
- Probs with setInterval and programmatic animationHi all
Further to a recent post about using setInterval to create animation on a
dynamically created menu item mc; I'm now trying to refine this process but
once again not having much luck! The Flash front end is pulling in the menu
data from an XML file, duplicating a menu item movie clip that has a dynamic
text field in it and then populating that text field with the data from the XML
file. This was all fine and dandy and working with no issues until I tried to
add some interaction motion to the menu item mc.
Initially I added a tween within the menu item mc that shifted the text field,
(inside another mc), to the right and changed it's colour. The control of this
happened in the rollOver statement back in the code. That was fine until the
animation of the menu item embedded mc reached a keyframe - at that point any
data that had been pulled into the text field vanished! So, my first question
is, is there any easy fix to that?
So, I figured I'd go about creating the animation programmtically. kglad
helped me out last night with setInterval, but I'm having two problems now. I'm
using an if statement inside the setInterval function to try and clear the
interval when it reaches a certain point - i.e. when I've slid the menu item 50
pixel to the right. Seems to be working - however getting it to reverse back
into position on rollOut is proving tricky AND it only moves the same menu item
- regardless of which item you rollOver ... which is odd. I guess I'm not being
specific enough in telling it which item to move, but I can't figure that out.
So, my two questions here are 1). Why is reversing the animation not working
correctly on rollOut and 2). How can I let the rollOver code know exactly which
menu item to control?
Here's the code in full:
var item_spacing = 45;
var item_count = 0;
function generateLargeNav(mainMenu_xml){
var numberOfContactees = mainMenu_xml.firstChild.childNodes;
for (var i = 0; i < numberOfContactees.length; i++){
var currentContact = numberOfContactees[i];
var species = items[i].firstChild; // same as items[i].childNodes[0]
var location = items[i].childNodes[1]; // second child node
var item_mc =
mcPlaceHolder.attachMovie("mcLargeMenuItem","item"+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
var clickableEmail = currentContact.attritubes.email;
item_mc.mcLargeMenuItemEmbedSingle.mcMenuItemBottomLevel.itemText.text =
currentContact.attributes.itemText;
item_mc.onRollOver = currentThumb_mc.onDragOver = function(){
moveItem = function () {
if (item_mc._x < 50){
item_mc._x += 10;
} else if (item_mc._x == 50){
clearInterval(moveItem);
}
}
itemMoverID = setInterval(moveItem, 20);
}
item_mc.onRollOut = currentThumb_mc.onDragOut = function(){
moveItem = function () {
if (item_mc._x > 0){
item_mc._x -= 10;
} else if (item_mc._x == 0){
clearInterval(moveItem);
}
}
itemMoverID = setInterval(moveItem, 20);
}
item_mc.onRelease = function(){
somethiung();
}
}
}
var mainMenu_xml = new XML();
mainMenu_xml.ignoreWhite = true;
mainMenu_xml.onLoad = function(success){
if (success) generateLargeNav(this);
else description_txt.text = "Hmm, for some strange reason I couldn't find the
XML file you're looking for, sorry.";
}
mainMenu_xml.load("mainmenu_data.xml");
- 10
- HOW GO TO FULL SCREEN?I have a movie in flash and i want if someone knows to tell me what action
script i have to put in first frame to play my movie in full screen and also
what what action script i have to put in a button to go back to normal mode?
thanx....
- 11
- transitions within one swf?this is something I've been trying to research for a while now and on various
forums, no one has ever been able to answer me. I can only assume that this is
a very difficult thing to do. If you guys don't know then I'm not sure what to
do to learn this.
- 12
- scroll pan component problemIt looks like if you override the code in the doLayout() function of the
ScrollPane (the actual function doLayout is in the ScrollView class) to do
the same code it would normally do, just put the vScrollbar on the left
(vsb.move(lo,to)). That might work, it is just a guess.
Jim Fee
"sebnewyork" <email***@***.com> wrote in message
news:c0cf9g$o1c$email***@***.com...
> Hi all
> using Flash MX 2004 pro, I am using the scroll pane component
> I have managed to customize all the elements of the component, exept ONE,
and
> it is killing me
> I want the scroll bar to be on the LEFT of the scroll pan, not the right
> The only solution I have found is ridiculous: I've had to invert the
whole
> scroll pane with the free transform tool, but as a result the content of
the
> scrollpane is inverted too! That's hilarious! But really not satisfying
> Any help?
> Thanks in advanc
>
>
- 13
- Preloaded pics not fully loadedPROBLEM: I want to load 9 pics and once they are loaded I want the animation to
start. The animation is a simple swipe off the movie clips containing the pics
across the stage. While the pics are loading, there is a simple 'Loading...'
move clip playing. This seems to work ok when I 'view as streaming' in Flash,
but when I view online the images don't seem to be loaded before the animation
starts. See at: www.simongroup.biz. Click 'Services'. Under the list of
services, click 'billboards/signs.' This is even more apparent when viewed at
56K dial up or lower. FILE CONSTRUCTION: First Frame is the 'Loading...' clip.
Second Frame is the 'Loading' clip and the adHolder move clips that the images
load into. The code for this frame includes the pics being loaded into the
adHolder clips using the loadMovie as well as: onEnterFrame=function(){
Loaded=adHolder1.getBytesLoaded()+adHolder2.getBytesLoaded()+adHolder3.getBytesL
oaded()+adHolder4.ol_one.getBytesLoaded()+adHolder5.mk_3d.getBytesLoaded()+adHol
der6.mk_future.getBytesLoaded()+adHolder7.bi_buildings.getBytesLoaded()+adHolder
8.getBytesLoaded()+adHolder9.getBytesLoaded();
Total=adHolder1.getBytesTotal()+adHolder2.getBytesTotal()+adHolder3.getBytesTota
l()+adHolder4.ol_one.getBytesTotal()+adHolder5.mk_3d.getBytesTotal()+adHolder6.m
k_future.getBytesTotal()+adHolder7.bi_buildings.getBytesTotal()+adHolder8.getByt
esTotal()+adHolder9.getBytesTotal(); percent=Math.round((Loaded/Total)*100);
if(percent>=100){ gotoAndPlay('start'); } } Note: Some of the pics have a
shadow. The shadow is in the adHolder clip so that it swipes with the pic
during the animation. That's why some of the pics are loaded into a clip inside
the adHolder Clip. So anyone know what's going on here?
- 14
- Drag and RotateHi all,
i'm working on a projekt, which is a card game and i need to implement some
kind of rotation function.
Actually i can drag, pick up and drop the cards.
Now i want the cards to rotate depending on the movement of the users mouse
when he drags a card.
I tried to do it on my own but i can't figure it out.
As an example of what i mean check this link please:
http://www.thibaud.be/
I don't need a complete solution but an advice or a link to a tutorial that
deals with this kind of problem would be very nice.
Thank you very much.
- 15
- Menu at the bottom of this siteI know how to pull of the rotating photogallery, but what baffles me is the
nave menu at the bottom. Go ahead play with it. When you rollover one of the
three only a corner raises. By the looks of it, I would say that it is
actionscript. But i have never come across script that deal with angles. Then
when you click on one it is something special. I have used the tween classes
but never like this. There is some easing too. This is driving me nuts.
Someone please tell me how it's done.
http://www.onceblindphotography.com/goflash.htm
|
|
|