Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Change Handler Problems Controlling A MC


Hello all,
I am having a problem controlling a Movie Clip by using a change handler in a combo box.

I have a series of combo boxes , which contain a selection of parameters. The selction of these parameters 'should' change the frame of a MC that contains different input boxes depending on the selections, on the change.

Whenever anything is changed, the MC goes back to frame 1 and stays there. I've attached the .fla file so that the problem can be seen clearer. The variables changing can be seen in the boxes below, yet when those varibales are changed the function does not change the frame of the MC. Below is the function that is called to change the frame. "input" is the instance name of the MC which I am trying to change.


PHP Code:




function hoursSwitch(){
    if (chapter == "30" or "30L3" or "1606" or "35" and term == "fall" or "spring") {
        _root.input.gotoAndStop(1);
    } else if (chapter == "30" or "30L3" or "1606" or "35" and term == "summer") {
        _root.input.gotoAndStop(2);
    } else if (chapter == "31" and term == "fall" or "spring") {
        _root.input.gotoAndStop(3);
    } else {
        _root.input.gotoAndStop(4);
    }
}







Any Help would be appreciated, Thank You.




FlashKit > Flash Help > Flash General Help
Posted on: 09-29-2004, 12:34 PM


View Complete Forum Thread with Replies

Sponsored Links:

Change Handler
I'm using Flash MX. Can anyone explain in idiot proof plain english about change handlers. I can follow the instructions and get a result but I'm not totally understanding it.

View Replies !    View Related
Change Handler Help
I am new to the Flash UI Components and the Change Handler. My movie has a IconButton and two Radio Buttons. The components were placed on the stage at design time. I entered cmptChange as the Change Handler in the Parameters panel for all three components. Then on the main time line I created the cmptChange function.

function cmptChg(component){
trace(component._name);
trace("groupRB="+groupRB.getValue());
}

When I click the IconButton the first trace statement gives me the Instance name of the button and the second the correct state of the Radio Buttons. When the two Radio Buttons are clicked the first trace statement returns undefined for the component._name.

I need to sort out which component changed; the undefined value is preventing me from this goal. Your assistance will be greatly apprecciated.

Thanks, GrandpaB

View Replies !    View Related
Change Handler?
I am still having tons of trouble here with this. I have a listbox, whenever something is selected in the list box, i need it to advance to a corresponding frame. I have an example that I will attach, this is as far as I have gotten, but I am still missing something very simple. Here is my as:

ActionScript Code:
function dropdown_check() {}if (dropdown.getValue() == 2) {    gotoAndStop(2);} else if (dropdown.getValue() == 3) {    gotoAndStop(2);} else if (dropdown.getValue() == 4) {    gotoAndStop(4);} else if (dropdown.getValue() == 1) {    gotoAndStop(1);}


In the change handler field of the parameters box, I have

ActionScript Code:
dropdown_check


It still won't work. I am sure this is not an emergency to anyone but me, but I have been wrestling with this for days! Thanks in advance for the help,
nat

View Replies !    View Related
Change Handler Inconsistencies...?
I started using Flash MX and directly set my teeth in the new components. And herefor I have a few questions:

I have a checkbox and a set of radiobuttons (3) on a scene and have set the Change Handler property of them all to init (as this is a function that will update the scene with some stuff accordning to the changes made to the components). The thing is only when changing the radiobutton something happens, the checkbox Change Handler is ignored! I tried a different approach and used myCHeckbox.setChangeHandler("init") in the first frame (where the function is also) and then it worked. Anyone who encountered the same problem/bug?! Just curious since it would be better not to have to use the setChangeHandler-function...

View Replies !    View Related
Combobox Change Handler
this is my handler

Code:
function loadit() {

myTxt.text = comTV.getSelectedItem().label;


}
bottomline, it works once, and then the text never changes any ideas why?

View Replies !    View Related
Change Handler Not Showing Up
Ive seen alot of stuff on combo boxes and I have yet to utilize the feature but I dont see it in the parameters field when I select the component inspecter but i do see it on some tutorials.

How can i get this feature?

View Replies !    View Related
Checkbox Change Handler
I am using an MX Check Box component. To find out what the person selected I am using the .getValue of the checkbox to determine true or false.

What I want to do, rather than returning true or false, is to return the choice made, such as a, b, c, or d.

Currently the change handler is on my check answer button and I am not using a change handler for the individual boxes.

Would a change handler using if statements be the best way determine this or is there a better way?

thanks.

View Replies !    View Related
Change Handler Missing
Hey,
I have recently started to learn flash on the side. Well I was going to through a tutorial and I was on a part Were I added a combo box to my file. Well for the combo box I had to change the data and labels which were in the properties window of the combo box. Now In the properties box with those 2 there is suppose to be something called "Change Handler". This is were I give the box a function for example In the change handler I enter in fun . Which I can refer to it in the action script so when a user pics one of the things in the combo box it opens up the url. Well in general I just want to know where is my change handler box?.I cant find it , maybe there is another way of using the combo box in the way Im trying ot ? I find in alot of these video tutorials the teachers' flash program is a whole lot different then mine. I'm using flash mx 2004 proffesional. Well if you can understand any of this please help lol

View Replies !    View Related
Combobox Change Handler
I want to have a combobox that works like a javascript onclick dropdown box. When it is clicked, i want to fscommand to javascript i have written in my HTML page. can anyone find any mistakes in this code or help me? this code is in frame one, the same frame as my combo box. the combobox is named "music_combobox" and the change handler is "changehandler"


Code:


function changehandler(whichbox) {
if (whichbox == "music_combobox") {
var select = music_combobox.getSelectedItem().data;
if (select != 0) {
fscommand(playit, select);
}
else if (select == 0) {
fscommand(stopit);
}
}
}

View Replies !    View Related
Function Variables Within A Change Handler
Is there anyway to call a function in a change handler WITH the normal function syntax? What I mean is, can I call function myFunction like so:

myFunction(x, y);

Thanks for any help!

View Replies !    View Related
Check Box Change Handler Question
I'm doing a Rich Media ad that is duplicating a portion of a form found elsewhere on our site. The original form has a bunch of opt-in check boxes for various things - but each check box is named ListID, and the value is a number, say 42 for one, 13 for another, etc.

I'm trying to make a Rich Media ad that uses a portion of this form in flash. I need, say, five check boxes that start of checked - if all remain checked it will send all the numbers - something to the effect of: ListID 38 & ListID 42 & ListID 13 etc. etc. etc. Obviously is one is unchecked, that "& ListID 62" won't be sent.

I'm fairly new to using components and change handlers so I am unsure how to send multiple variables of the same name with differing values like this, but the developer of the asp page that uses this info claims I just need to send all of them with "&"s. Of course, in addition I need a seperate box where they enter their email address - but I think I can figure that one out - its the logic in knowing which boxes were checked and unchecked and in sumbitting multiple ListIDs with their seperate values (if checked) that is confusing me.

This sounds like it should be simple enough, since its duping a pretty basic html form - but I'm at a loss. Any help would be totally awesome.

Thanks in advance.

View Replies !    View Related
What Do I Have To Change In This Code To Use It Within On/onClipEvent Handler ?
I have a code that i use in MC but i want to add it the hitTest ... because of that i need to change all the code to use it within on/onClipEvent handler ??

Here is the code::


Code:
if(!_root.Player.hitTest(_root.Water)){
on(keyPress "<Left>"){
this._x -= 2;
Sword = "Left";
}
on(keyPress "<Right>"){
this._x += 2;
Sword = "Right";
}
on(keyPress "<Up>"){
this._y -= 2;
Sword = "Up";
}
on(keyPress "<Down>"){
this._y += 2;
Sword = "Down";
}

on(keyPress "<Space>"){
if(Sword == "Left"){
_root.Player.SwordL.gotoAndPlay(2);
}else if(Sword == "Right"){
_root.Player.SwordR.gotoAndPlay(2);
}else if(Sword == "Up"){
_root.Player.SwordU.gotoAndPlay(2);
}else if(Sword == "Down"){
_root.Player.SwordD.gotoAndPlay(2);
}
}
}


And that code that i use on(keyPress"<Space>"){ } , can it be simplier ??

Thanks!!!

View Replies !    View Related
Change Alpha With Event Handler
Hi,
I am working on a navigation script that descends down using the tween class. I use an event-handler to control this. I want it to change its alpha to 0 onRollOff. I can get the nav to descend onRollOver, but I cannot get it to change its alpha back to 0 when I roll off -- in fact, the current code causes the nav to flicker and not fully descend. What needs to change? Thanks.


Code:
function toggleMenuTween (obj) {
var toggleTween:Tween = new Tween(obj, "_y", Regular.easeIn, 0, 20, .5, true);
}

togglemenu.togglemenu_handler.onRollOver = function() {
if(this._parent._alpha != 100) {
this._parent._alpha = 100;
toggleMenuTween(this._parent.previous_btn);
toggleMenuTween(this._parent.next_btn);
}
}

//This is the problem spot.
togglemenu.togglemenu_handler.onRollOut = function() {
if(this._parent._alpha == 100 && this._parent.next_btn._x == 150) {
this._parent._alpha = 0;
}
}

View Replies !    View Related
Combo Box And Change Handler - In Over My Head
Howdy all,

Anyone know how I can set the data in my combo box = the name of a textfile to be loaded into a dynamic textbox?

I am trying a combo box for the first time. I've used AS to load it but am now having trouble with the ChangeHandler function. I only have a couple of items in the combo box and I am using them to load dynamic text files. I am using the following code that I adapted from another thread I found. "sort" is the instance name of my combo box. MCtxt is the name of my dynamic text box:


ActionScript Code:
// change handler callbackfunction textSort(filename) {    loadText = new LoadVars();    loadText.load(filename);    loadText.onLoad = function(success) {        if (success) {            _root.MCtxt.html = true;            _root.MCtxt.htmlText = this.sortMC;        }    };}// data providervar filename = sort.getSelectedItem().data;var data_array = new Array();// first itemdata_array[0] = {label:"Sort documents", data:""};// second itemdata_array[1] = {label:"By Date", data:"documents/sort_date.txt"};// third itemdata_array[2] = {label:"By Type", data:"documents/sort_type.txt"};// set data providersort.setDataProvider(data_array);// set change handlersort.setChangeHandler("textSort");


I can't figure out how to set "filename" = to the data_array. Can anyone help?

View Replies !    View Related
Scroll Pane Change Handler
i'm using the scroll pane component and what i wana do is when you click on a button it changes what is in the scroll pane can someone tell me how i can do this.

I've looked at using the setScrollContent actionscript but i can't seem to get it to work.

View Replies !    View Related
Change Alpha Event Handler
Hi,
I am working on a navigation script that descends down using the tween class. I use an event-handler to control this. I want it to change its alpha to 0 onRollOff. I can get the nav to descend onRollOver, but I cannot get it to change its alpha back to 0 when I roll off -- in fact, the current code causes the nav to flicker and not fully descend. What needs to change? Thanks.


Code:
function toggleMenuTween (obj) {
var toggleTween:Tween = new Tween(obj, "_y", Regular.easeIn, 0, 20, .5, true);
}

togglemenu.togglemenu_handler.onRollOver = function() {
if(this._parent._alpha != 100) {
this._parent._alpha = 100;
toggleMenuTween(this._parent.previous_btn);
toggleMenuTween(this._parent.next_btn);
}
}

//This is the problem spot.
togglemenu.togglemenu_handler.onRollOut = function() {
if(this._parent._alpha == 100 && this._parent.next_btn._x == 150) {
this._parent._alpha = 0;
}
}

View Replies !    View Related
Combo Box And Change Handler - In Over My Head
Howdy all,

Anyone know how I can set the data in my combo box = the name of a textfile to be loaded into a dynamic textbox?

I am trying a combo box for the first time. I've used AS to load it but am now having trouble with the ChangeHandler function. I only have a couple of items in the combo box and I am using them to load dynamic text files. I am using the following code that I adapted from another thread I found. "sort" is the instance name of my combo box. MCtxt is the name of my dynamic text box:


ActionScript Code:
// change handler callbackfunction textSort(filename) {    loadText = new LoadVars();    loadText.load(filename);    loadText.onLoad = function(success) {        if (success) {            _root.MCtxt.html = true;            _root.MCtxt.htmlText = this.sortMC;        }    };}// data providervar filename = sort.getSelectedItem().data;var data_array = new Array();// first itemdata_array[0] = {label:"Sort documents", data:""};// second itemdata_array[1] = {label:"By Date", data:"documents/sort_date.txt"};// third itemdata_array[2] = {label:"By Type", data:"documents/sort_type.txt"};// set data providersort.setDataProvider(data_array);// set change handlersort.setChangeHandler("textSort");


I can't figure out how to set "filename" = to the data_array. Can anyone help?

View Replies !    View Related
Change Handler Event On Button
Hi there,

I am newbie with flash and actionscript. According to a tutorial, I started with on creating a simple quiz. I realized the tutorial was in coded in Flash MX and I use the Flash 8 version.

I am trying to add a change handler on a button. The tutorial says, I need to add the value in the Parameters, but unfortunately the Flash 8, does not have Change Handler. Is there another way to get around it? How would I script a handler on the button?

Here's the code I have on my 'Start Quiz' button, there are no errors but it doesnt do anything.

on (change) {
trace(startQuiz);
}

Thanks!

View Replies !    View Related
Event Listener Replacing Change Handler
Has anybody successfully migrated .fla files from Flash MX to Flash MX 2004 with ActionScript 2?

Specifically, I have a combo box which works in Flash MX (published for Flash Player 6) but not in MX 2004 Pro (published for Flash Player 7).

I can't figure out how to replace my old setChangeHandler code with the new EventListener code. Here's the code that works fine if published for Flash Player 6:

<snip>
combo.setChangeHandler("selectCombo");
function selectCombo(component) {
if (component.getSelectedItem().label == "Saturday") {
_parent.gotoAndStop(10);
} else {
setProperty("alert", _visible, true);
}
}
</snip>

This code lives in the first frame of the associated timeline.
Has anybody re-written code for a combo box that simply waits for a user to make a selection and then acts on that selection?

View Replies !    View Related
[MX] ListBox, Containing Songs, Can't Get The Change Handler To Work
Hey all,

I'm trying to make a jukebox type thing where I have a list box containing the songs and when you click one it starts playing.
Seeing as I'm completely new to action script, I have no idea how to do this.

This is what I have so far, but nothing is happening when you select something from the list box.

songListBox is the instance name of the list box
Song1.mp3 would be the linkage identifier of something in the library


Quote:




songPlaying = new Array();
songPlaying[0] = new Sound(this);
songPlaying[0].attachSound("Song1.mp3");
songPlaying[1] = new Sound(this);
songPlaying[1].attachSound("Song2.mp3");
songPlaying[2] = new Sound(this);
songPlaying[2].attachSound("Song3.mp3");

//Array for values in list box
songsArray = new Array();
songsArray[0] = ["song 1"];
songsArray[1] = ["song 2"];
songsArray[2] = ["song 3"];

//loop to put labels and values into the list box
for (i=0; i<songsArray.length; i++) {
songListBox.addItem(songsArray[i][0]);
}

var index;

//What gets called whenever something new is selected in the list box
function songChange(component) {
if (component._name=="songListBox"){ //if something is selected in the list box, then...
index = component.getSelectedIndex(); //variable "index" gets the index number of the thing selected
songPlaying[index].start() //start playing song that was just attached
}
}

songListBox.setChangeHandler("songChange");

View Replies !    View Related
Use Of Change Handler On Combobox In Flash Mx 2004
Hi all,

I am a complete beginner to flash and was going through some tutuorials from the macromedia site.

The tutorial uses flash but I have flash mx 2004 and I am stuck.

I have got round most of my problems but I am adding a combobox which needs to call a function which is placed in the change handler box in the properties inspector.

I dont have this line in MX 2004!!!! How do I do it???

Please help
Michael

View Replies !    View Related
List Box Component: Linking To Web Pages / Change Handler
Ive made a list box with links to files. How do I
go to the files upon say a mouse click? or just a click
in the box? What do I need to do to the change handler?

thanks,

Tyler

View Replies !    View Related
Does SetSelectedIndex In Combobox Call The Change Handler Function
does the function setSelectedIndex for combobox object call the change handler function? It seems that sometime it will call it and sometime it will not, am I the only one with this phenomenon?

View Replies !    View Related
Making Another Mc Change With Mysound.onload Event Handler
I have two little music players on my site, let's say 'main' and 'discography'. 'Main' starts automatically, and the other is in the discography section and has buttons that have to be clicked. When someone plays a song in the discography section, I want the main music player to go to another frame, on which there is no music and the spinning graphic showing that it is playing is not there anymore.

I am using the sound handler thing, so I'm trying to use mySound.onLoad event handler to make this happen. I've used the onSoundComplete to make the 'discography' movie clip go back to it's first frame, where there is no music playing. But this code doesn't seem to be working. I am fairly new at this - maybe I am targeting the other movie clip wrong? I didn't want to keep adding the same code into every play button, so I thought this would work.

This code is in my 'discography' movie clip, first frame. My 'main' movie clip is on the main timeline. "TopMusicMenu' is the instance name of my 'main' movie clip. Is this correct, or am I going about it the wrong way?

this.createEmptyMovieClip ("mcSoundHolder", this.getNextHighestDepth());
var mySound:Sound = new Sound (mcSoundHolder);

mySound.onLoad = function() {
this._parent.TopMusicMenu.gotoAndStop("nomusic");
//get the top music player to go back to beginning
}

//buttons for music
btn_chambre1.onRelease = function():Void {
stopAllSounds();
mySound.loadSound("MusicdeChambre4_IntroAllegro.mp3", true);
gotoAndPlay("Chambre1");
}

etc. (there are several of these buttons)

Thanks for any help.

View Replies !    View Related
"change Handler" For Combo Box Component
thanks very much to chessgenie for the reply below. really appreciate it.

i do not understand the 2nd step:
2) on the property panel, calls the change Handler as "comboBoxEvent:

after creating the combo box component (and naming it), how do i call the change Handler?

i search everywhere to no avail. pls help.

thank you.

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

Here's a simple example :
1) create a combo box component and name the instance as "comboBox"
2) on the property panel, calls the change Handler as "comboBoxEvent:
Your AS could be:

Code:
option = new Array();
option[0] = "option 1";
option[1] = "option 2";
option[2] = "option 3";
//
function BuildList() {
comboBox.addItemAt(0, option[0], 0);
comboBox.addItemAt(1, option[1], 1);
comboBox.addItemAt(2, option[2], 2);
}
//
BuildList();
//
function ComboBoxEvent() {
var itemSelected = comboBox.getSelectedItem();
var itemx = Number( itemSelected.data );
trace (" itemSelected(" + itemx +")");
if (itemx == 0 )
trace("I clicked Option 1");
// code your action here for option1;
else
if (itemx == 1 )
trace("I clicked Option 2 ");
// code your action here for option2;
else
if (itemx == 2 )
trace(" I clicked Option 3 ");
// code your action here for option3;
else
trace(" Hmmm .. what I have done here?? ");
}

View Replies !    View Related
Controlling External Swf Frame Change
i have an internal swf that needs to change the external swf's scene and keep the internally loaded movie the same. is this possible?

its a website, so the external part comes down and opens, revealing the new page(an internal swf).

i can always have it the changes on a main timeline of the external. i just need, when a button is pressed, that the external swf change frames.

please help

View Replies !    View Related
Event Handler Inside An Event Handler
i have a movie clip that is essentially a box when clicked can be dragged around and so forth.


ActionScript Code:
//AS for the box movie clip
on (press) {
    startDrag(this);
}
on (release) {
    stopDrag();
}


however inside the box i want a small button that should be able to close the box by turning it invisible (unless there is a better way to do this)


ActionScript Code:
//AS for the close button
on (press) {
    setProperty("_root.box", _visible, false);
}


the box can be dragged but clicking the close buttons does nothing (just continues to drag the box). i think the problem here is since im using the press function to drag the box then the press function inside the clip never actually gets executed. is there a way around this or maybe a better way to create this effect? thanks.

View Replies !    View Related
[F8] On Handler Or Not?
I am trying to keep my main timeline short by placing my movies frame by frame and I wanted to put a action on the last part of each movie making the main time line move onto frame 2 , 3 etc etc.

Inside movie 1 I put

gotoAndPlay("Scene 1", 2);

Does this need to be on some kind of handler?
I have a stop action on each frame of the main time line.

Thanks

View Replies !    View Related
Handler
hi every body;
in this sintax:
monkey_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void

can some one explane what is HANDLER? what is its function?

thanks

View Replies !    View Related
Event Handler, Please Help :o)
Hey,

I'm desinging a website and I created the menu in a movie clip. The rest of the site, ex: home, pics, ect.. is on the main timeline. I used labels for home, pics, ect.. but I need an event handler that will let the buttons in the movie clip menu go to the labels on the main timeline. If anyone knows the event handler for this or has any ideas that could possibly help me. Please let me know. Thanks so much for you help.

- John

View Replies !    View Related
Event Handler
How can I add actions to a movieClip that is dynamically created?

I need my script to create a movieClip, load a picture into the movieClip, and add an onRelease event handler to this movieClip.

Can this be done??

View Replies !    View Related
LoadVariables Without An On Handler?
I need to load some text into a dynamic textbox. No problem. I have some good examples, and even a working test I made myself. The problem is, I have to do my loadVariables() inside an on handler.

Can I do this without putting it inside an on handler? I want some text to load right away, before the user needs to click anywhere.

Thanks!
Frank

View Replies !    View Related
Handler For Combo Box
Does anyone know how to write the handler for when a combo box changes values?

View Replies !    View Related
Form Handler
does any1 know how to make a form handler and if so can u tell me please (so I can make storage room and chat room)???????

View Replies !    View Related
Event Handler
I have a button on the right side of my layout that on(release) text should appear in an area on the left. How do I accomplish this?

Thanks.

View Replies !    View Related
Event Handler
I have a component placed on a movie clip that is its _targetInstanceName. In my component I want to catch an event of the _targetInstanceName. How can I do it?

View Replies !    View Related
Statement Must Appear Within On Handler
I'm trying to make a button that connects to a website, I've applied the get url handler to the button but 'statement must appear within on handler' is the output i keep getting.
I don't know hoe to phrase it to put it into the handler. Could anyone please help?

View Replies !    View Related
QuickTime Handler ?
Hey there. I tried to export a Flash movie as a QuickTime movie, but got an error message stating "The installed version of QuickTime does not have a handler for this type of Macromedia Flash movie. Please consult the documentation for further information." I just installed QT 6.5 today, and I rebooted my computer just to be on the safe side. I am running Flash MX on WinXP. I searched the Flash documentation for QuickTime, but didn't find anything about handlers and whatnot, and according to the documentation, the frame rate of the movie is standard and should work for QuickTime.

Does anyone know what could be causing this problem?

Also, I emailed a Mac projector file to someone today, and he told me later that his Mac said it was a text file (and the .swf I had sent him earlier came across as an Excel file). Any ideas?

(I ended up uploading the .swf as a web page, but that's not going to fly for too long.) Any and all help would be sincerely appreciated.

Toodles,
Summarah

View Replies !    View Related
Statement Must Appear Within On Handler?
Ok i have a small problem with this. I'm trying to make a play button which i've done before, but for some reason it isnt working. The error i'm getting is:

**Error** Scene=Scene 1, layer=Button, frame=1:Line 3: Statement must appear within on handler
py_btn.onRelease = function (){


Also this is probably important, but my scripting is:

code: py_btn.onRelease = function (){
gotoAndPlay("", 1);
};

I've tried coping and pasting the script from a program that has a working play button in it. Just so this doesn't come up later. Yes i did change the instance name.

I'm also using flash 8 and AS 2.0

I really do not know whats wrong right now. It hsa worked in the past i'm a bit confused now. Any help would be Appreciated. Thanks.

View Replies !    View Related
OnRollOver Handler
Ok here's my problem...

On my website, I have buttons on controlled by action script. I have an rollover and rollout stage. Also, whenever you rollover the buttons a preview of the image will come up on the side. However it won't do the preview and the rollover state at the same time, it will either do one or the other depending on whether or not I put the over state w/in the function of the loadClip.

Heres the Actionscript.....

b1.onRollOver =function(){
over;
mcl2.loadClip("http://my.lsu.edu/jmart68/flythumbs/1.jpg",thumbLoader);
}
b1.onRollOut = out;
b1.onDragOut = out;
b1.onReleaseOutside = out;
b1.onRelease = function() {
loader._visible = true;
mcl.loadClip("http://my.lsu.edu/jmart68/flyers/1.jpg",myLoader);
line._y = 108.3;

}
b1.buttText.buttonText.text = "1";

Could anybody help me out?

Here's the site "http://my.lsu.edu/jmart68" right now, the rollover state works but not the previews of each button.

ps. its in the work section of the site.

thanks

View Replies !    View Related
Event Handler Help
I need some help with event handlers

you have a movie clip named "ball"

Code:
ball.onEnterFrame = function () {
this._y+=3;
}
This code goes on the timeline.
When the code is placed on the clip here is the error


Code:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1:
Statement must appear within on/onClipEvent handler
ball.onEnterFrame = function() {

Total ActionScript Errors: 1 Reported Errors: 1
What would have to change in the code to place it on a clip?

Thanks

Ponyack

View Replies !    View Related
Html Handler Help
I want the whole web page to size around my swf with no boarder or scroll bar just nice and snug and I cannot seem to get that to work in flash and I can't find a solution.

Pls help!!!!!




Pra Roo

View Replies !    View Related
This OnLoadProgree Handler Has A Bug
hello i have a STUPID problem... i've been searching the net but i don't get no freakin answers!!! whaaaaaa!!!!! i'm dying!!

this loadClip() function with its BUGGY onLoadProgress thingy keeps on giving me the message: "a script in the movie is causing flash to run slowly"

but there is no reason for it to run slowly it's just that stupid onLoadProgress handler that causes it to pop up...

why is there no solution....???????????

please HELP!! i wanna rip out the hair on my head!!!

it's bugging me!!! i'm wasting to much time figuring it out... PLS HELP! anyone!! please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View Replies !    View Related
[F9] Combobox Handler Bug
Hello,
I draged a combobox into the stage and I already created a button.
After clicking on combo box the button event handlers can not work appropriately aand in some cases in does not fire.
I don not have this problem by other components.Is it combobox bug?
Thx

View Replies !    View Related
Handler Problem
Can anyone help with this. I am trying to link a button to a scene. I cannot get the button to go. I know you aren't suppose to use scenes.

I have tried different actionscripting codes. I am getting an error when I use this code. Below is the attached error.

If anyone can help I would appreciate it greatly.

Thanks in advance, Kevin

View Replies !    View Related
LoadMovie() Outside Of On Handler?
I'm loading an image dynamically (it's stored on a different server, yes all permission and such is taken care of, all's legal and good) using loadMovie() and all is going well as long as I have it inside an on(whatever) handler. It throws an error ("Statement must appear within on handler") if I have it outside of the on handler - which makes sense...

I want the clip to load as soon as I call it, without any need for user interaction (ie clicks, rollOvers, etc).

How can I do this? Is there a on(call) type possibility or some other fun workaround?

All thoughts would be appreciated - thanks!

Megan

View Replies !    View Related
Onload Handler Set Var
hi i am trying to make this work...

it is a custom class that is supposed to load a txt file build a text field and populate it...

the problem is that the function disText() is being called...

please help this is my second day in....


Code:
/*
this is the brain buster info box class

*/
dynamic class GamePackages.infobox extends MovieClip{
//load external txt file
//format title
//attach scrollbar


function infobox(txtName:String){
this.setMask(infobox_mc);

}

function innerinfo(txtName:String){

var infoText:LoadVars = new LoadVars();
infoText.onLoad = function(success:Boolean){
if(success){
textHolder = infoText.doubleNumberTrouble + "poo-dank";
disText(textHolder);

}else{
trace("ffffffffff");
textHolder = "poo-dank"
}
}

infoText.load(txtName);

trace(infoText.contentType());
}

function disText(here:String){
trace("in here "+here);
this.createTextField("tf", this.getNextHighestDepth(),10,10,220,42);
this.tf.type = "dynamic";
this.tf.wordWrap = true;
this.tf.multiline = true;
//this.tf.html = true;
this.tf.text = here;
this.tf.border = true;
this.tf.autoSize = true;
this.tf.scroll = true

tform = new TextFormat();
tform.color = 0x000000;
tform.font = "Microsoft Sans Serif";
tform.size = 12;
tform.leftMargin = 6;

this.tf.setTextFormat(tform);

}
}

View Replies !    View Related
ENTER_FRAME Handler
i got a btn_mc on stage, 10 frames length, the width shape tweens from 1 -> 50

this is my actionscript :


ActionScript Code:
btn_mc.buttonMode = true;
btn_mc.addEventListener(MouseEvent.ROLL_OVER, btn_rollOver);


function btn_rollOver(event:MouseEvent):void
{
    event.currentTarget.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
   
}

function btn_rollOut(event:MouseEvent):void
{
    event.currentTarget.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
    event.currentTarget.addEventListener(Event.ENTER_FRAME, exitFrameHandler);
   
}

function enterFrameHandler(event:Event):void
{
    event.currentTarget.nextFrame();
    event.currentTarget.addEventListener(MouseEvent.ROLL_OUT, btn_rollOut);
}


function exitFrameHandler(event:Event):void
{
    btn_mc.prevFrame();
   
   
    if (event.currentTarget.currentFrame == 1)
        {
        event.currentTarget.removeEventListener(Event.ENTER_FRAME, exitFrameHandler);
        }
}

nextFrame() and prevFrame() seem to work allright, but you can manage to pause the prevFrame() function if you rollOver it again quickly.

so from what i can tell what is happening :

btn_mc gets a ROLL_OVER event, if ROLL_OVER event occurs, btn_mc enterFrameHandler starts running, and keeps playing nextFrame(). Also an ROLL_OUT event is added at this time. So when we ROLL_OUT, exitFrameHandler starts prevFrame() until the currentFrame of the btn_mc == 1, it then removes the exitFrameHandler.

what happens now is that when your ROLL_OVER, ROLL_OUT and immediatly ROLL_OVER again, the nextFrame() should be running again, but this doesnt happen, it seems enterFrameHandler is not being started, prevFrame() pauses on a certain frame, even though it is listening...

anyone care to see what the potential problem is ?

Kind regards,

Juan

View Replies !    View Related
On Handler Error
I'm a real noobie when it comes to AS. I am using Flsah MX 2004 Professional using AS 2.0. Here is what I am trying to do:

1. I am developing a rotating table of contents. i.e. one page of the TOC will have a lisitng of features on the site with links to each article. The next will have the same for the Arts, then Recipes, then Wine.
2. At the bottom of the stage are the words "Features", "Arts", "Recipe", and "Wine". I'm trying to link each of those words (which have been converted to buttons) to the first frame that page appears. So if a visitor hasn't finished reading what's available on the features page, for example, clicking on the word "Features" will return him or her to the first frame that page appears and then the movie begins again at that point in the timeline. All of the four buttons are layers in a laver called "Menutext" which has been converted to a movie clip.
3. The code I am using is this:
featureb.onRelease = function() {
gotoAndPlay(1);
};
4. For the other three buttons I substitute the name of that button and the frame it begins
5. I get the following errors when I publish:
**Error** Symbol=menutext, layer=Wine, frame=1:Line 1: Statement must appear within on handler
wineb.onRelease = function() {

**Error** Symbol=menutext, layer=Recipes, frame=1:Line 1: Statement must appear within on handler
recipesb.onRelease = function() {

**Error** Symbol=menutext, layer=Arts, frame=1:Line 1: Statement must appear within on handler
artsb.onRelease = function() {

**Error** Symbol=menutext, layer=Features, frame=1:Line 1: Statement must appear within on handler
featureb.onRelease = function() {

**Error** Symbol=menutext, layer=Wine, frame=780:Line 1: Statement must appear within on handler
wineb.onRelease = function() {

**Error** Symbol=menutext, layer=Features, frame=780:Line 1: Statement must appear within on handler
featureb.onRelease = function() {

Total ActionScript Errors: 6 Reported Errors: 6What am I doing wrong?

View Replies !    View Related
Handler That Executes Only Once
I need an event handler that executes only once when the root movie has loaded. If I later on return to the first frame that holds the script it should not execute again.

something like "when_root_has_loaded = function(){ some code};

Thanks

View Replies !    View Related
Click Handler
Hi,
this might be pretty simple, but I'm trying to find the button component's click Handler in flash... can anyone help me with this or help me with the action scripting for such an event...

thanks!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved