Path Corrector Component
I'm having issues with the path corrector component. I'm attempting to load an .swf movie into an empty movie clip but having no success using the path corrector component. I'm new to flash, I guess this is a little beyond me at the moment. As far as I can tell I have no references to _root alone on the movie to be loaded. I've attached my .fla file if someone would be kind enough to take a look at it for me. Any help would be greatly appreciated. Thank you.
FlashKit > Flash Help > Flash MX
Posted on: 06-12-2006, 05:17 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Component Target Path
What would the target path be to a movie clip within the scrollPane component.
example: trying to target ScrollUpArrowUp movieClip in the scrollpane component. I have the linkage identifier set as "ScrollUpArrowUp" and I have give and instance name to my component. I'd like to set the color value of specific movie clips in the component dynamically. I can't seem to figure out what the target path would be. please help. Thanks!
Help With Dynamic Path To Component Please.
Hello,
I'm trying to change the name of a component in a path with a repeat loop. I have 8 loader components named myLoaderthum00 - myLoaderthum07. My problem is witht he name of the instance "myLoaderthum00, myLoaderthum01, myLoaderthum02, etc... I don't seem to be able to chage the name of the instance in the path. Is it possible to do this, and if so how?
Here's my code:
for (var i:Number = 0; i < 8; i++) {
_root.page.thumb.(myLoaderthum0 + i).contentPath="images/" + xml_file.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue + "_tn.jpg"
}
Thanks, -L
.
Component And Wrong Path
Hello
I need to load xml to component which is in the same directory as fla file. After trace(loaderInfo.url); included in component class I receive this:
Component in fla file trace (wrong path) :
///C|/Documents%20and%20Settings/st01/Ustawienia%20lokalne/Dane%20aplikacji/Adobe/Flash%20CS3/en/Configuration/TMPdpvp0zu119.swf
Component in swf file trace (correct path):
///D|/Work/Components/paths/t1.swf
Path from fla file makes it impossible to load xml file with relative path. Maybe someone know how to bypass this. Thank you in advance.
UI Component Content Path
What I'm looking to do is to use the UI ScrollPane with 4 buttons. Is there a way to make the ScrollPane's content path a variable so that when a button is pressed, the new .swf can be loaded into the same component?
Thanks
How To Add Parameters To Component W/class Path
Hi, I'm new to Flash 9 and I don't know how to add parameters to a Flash 9 component I create via the Component Definition dialog box if my component uses a class file.
The second I enter a class path for the component, it wipes out any created variables. I'm trying to create a simple label component that's not based on the fl.core.UIComponent class. I just want to see what's the simplest component I can create.
All I want the component to do is display a colored background with a text field on top whose value I can change from the inspector. It doesn't need to resize, change state or anything. I figured I could do this without the overhead of the UIComponent, more as a learning exercise, but I've had no luck and would appreciate any help.
I assume if I were basing this on UIComponent, I could take advantage of the Inspectable metadata structure, but I suspect I don't have that route.
Thanks,
Jennifer
Path For Mc In Component In Currently Opened .fla For A .swf Panel
some may know im building a hell-of-a-component... which basically types text....
i figured out how to get a movieclip to act as a cursor... but now that my list of options/attributes/settings or whatever you want to call them are so huge, i decided i really had to make a custom UI....
now ive done most of it now (hence the array.sort() question earlier - thanks sen! ) but i want to be able to preview what the current cursor is (if they choose to use a movieclip!)...
the path of the movieclip to be used as a cursor is, from within the component is: Typr.cursorMC
i tried using xch.Typr.cursorMC but that didnt work and ive no idea how i could link in with a currently open flash document... or if its even possible....
any help greatly appreciated....
one-liner help also greatly appreciated! lol
Prophet.
Custom FLV Preloader With Component- What Is AS Path?
Hello, I've read through a bunch of threads and have been unable to figure this one out.
I'm trying to build a custom FLV preloader for the FLV PLayback component, but every thread refers to using the NetStream.bytesLoaded (non-component FLV command). What are you supposed to do when using the FLVPlayback component??
I tried this - but it didn't work. myVideo is the FLVPlayback component.
Any help is appreciated - this is confusing stuff....
ActionScript Code:
myVideo.getBytesLoaded = loadedBytes;myVideo.getBytesTotal = totalBytes;trace(totalBytes);// button for testingplayButton.onRelease = function (){ myVideo.play();}var listenerObject:Object = new Object();listenerObject.cuePoint = function(eventObject:Object):Void { var cuePointName = eventObject.info.name; // cue point start if (cuePointName == "start") { trace("flv begins playing"); // stop playing } else if (cuePointName == "mid") { trace("mid point reached"); myVideo.pause(); // Tweens for border mc } else if (cuePointName == "end") { trace("movie finished playing"); // Tweens for border mc }};myVideo.addEventListener("cuePoint", listenerObject);stop();
Path For Mc In Component In Currently Opened .fla For A .swf Panel
some may know im building a hell-of-a-component... which basically types text....
i figured out how to get a movieclip to act as a cursor... but now that my list of options/attributes/settings or whatever you want to call them are so huge, i decided i really had to make a custom UI....
now ive done most of it now (hence the array.sort() question earlier - thanks sen! ) but i want to be able to preview what the current cursor is (if they choose to use a movieclip!)...
the path of the movieclip to be used as a cursor is, from within the component is: Typr.cursorMC
i tried using xch.Typr.cursorMC but that didnt work and ive no idea how i could link in with a currently open flash document... or if its even possible....
any help greatly appreciated....
one-liner help also greatly appreciated! lol
Prophet.
Component Bindings For Generic WSC Forms… Path?
Ok, I am stumped here… I have been through many of the tutorials both here and abroad, but I cannot find the answer. I have been working on this problem for 2 solid days ~24hrs, at this point I need some professional help either here or on the psychiatrist’s couch.
By the way great bindings tutorial by Pete Hall, just did not go far enough for what I am looking for.
This is basically what I am trying to do: I have a .net web service sending out a generic soap xml to populate a verity of flash forms. I.e. think of a general web service that sends out xml that can populate income tax forms for all 50 states, depending on the nature of the data in the db.
I am trying to then catch this data with a WSC sent it into a data set then populate fields on the form. Most of these fields are simple text input fields, but each have properties such as a label (needs to be dynamic to support multi languages), editable, database reference etc.
The problem is I cannot figure out how to pull each single row form the dataset and fill the appropriate text/label components. I can fill a data grid through the data provider binding no problem. And I can use the index to page through the data set. But what I cannot do is use the data set to fill a number of (15-30) text/label components.
I think the answer is using a path statement in the bindings, and/or using what Macromedia calls virtual schemas. But I cannot get the syntax correct, I am assuming I need to use AS not Xpath as this is going through the WSC which converts it to AS. (There is an amazing lack of examples of complex binding to a WSC)
Here is a sample of the XML (maybe needs a bit more formatting):
<?xml version="1.0" encoding="utf-8" ?>
- <OxygenData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" EpisodeID="1" xmlns="http://www.OxygenHealthware.com">
<testData>auditest</testData>
- <OxygenData>
- <OxygenData dbID="episode_id" isRequired="false">
<DataValue>1</DataValue>
</OxygenData>
- <OxygenData dbID="episode_pat_id" isRequired="false">
<DataValue>1</DataValue>
</OxygenData>
- <OxygenData dbID="pat_org_id" isRequired="false">
<DataValue>1</DataValue>
</OxygenData>
- <OxygenData dbID="episode_name" isRequired="false">
<DataValue>heart failure</DataValue>
</OxygenData>
- <OxygenData dbID="episode_name_id" isRequired="false">
<DataValue>1</DataValue>
</OxygenData>
Resulting in a WSC schema of something like:
Results:OxygenMetaXML
OxygenData:Array
[n]:OxygenData
DataValue:String
DataLabel:String
dbID:String
etc…
If you have any advice please let me know!!!
I should also add that I am not so familiar with AS and as some of these forms may be created by novice developers (myself included) my intent is to come up with a simple process to visually develop additional forms.
Thanks
Audi
Trying To Figure Out Proper Path To Component For A Tabbable Form
This one is a bit confusing. So bear with me. I have a v1 ScrollPane component on stage with the instance name 'myPane' inside of that is various bits of content decided upon from a combo box. One of these pieces is a form (instance name: App_mc) that should be tabbable but it doesn't seem to work. I think it's because the movie clip does not appear right away. I'm not sure. What I'm trying to figure out is the proper path to that instance and the text fields in it from the _root. So it's definitely _root.myPane but then it gets really cloudy after that.
Here's my actionscript path:
//Enable Tabbing for objects in the myPane
//------------------------
_root.myPane.tmp_mc.App_mc.tabChildren = true;
//------------------------
// Set the focus of the first object in the myPane
//------------------------
Selection.setFocus("_root.myPane.tmp_mc.App_mc.nam e_txt")
I've also tried the path _root.myPane.App_mc.tmp_mc. and so on with no luck either. Anyone got a clue?
Using Eval Function And Variable In A Path (target Path)
Hello,
I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.
the original code is:
code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}
There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?
I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:
code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol
Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.
Cannot Export An Avi Of Motion Along A Path When Path Is Specified With Action Script
Hello!
I have the following problem: I am using Flash 8 Professional to produce a series of avi files showing the motion of a dot along different paths. Whenever I use the drawing tools to draw the path everything is all right: I can export both a swf and an avi file showing the motion. The problems start when I use action acript to specify the path: then a swf can be exported, but not an avi file (Flash acts as if it is exporting but the avi file produced shows only a stationary dot). Can anybody help me?
_root.path="http://www.sitename.com/path/FlashSite/"; Script Issue While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.
From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -
setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );
Thanks in advance
Shine
Variable Path Name --> Path=_root
instName="inst1";
path="_root";
Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}
I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.
Any ideas?
_root.path="http://www.sitename.com/path/FlashSite/"; Problem While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.
From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -
setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );
Thanks in advance
Shine
Wrong Path Given, What Path To Use?, And Why?
Since the beginning of my Flash time, i never solved the 'giving path' problem in Action Script.
Most of the time my paths work, but sometimes they only work in an empty .fla file and not in my homepage.fla file with the code in another scene.
This time it's the code in the timeline (layer: actions, frame 2, scene: control_panel_sc, .fla file: homepage.fla):
stop();
ccbTime.addItem("tidfme2");
I tried naming the path to:
this.ccbTime.addItem("tidfme2");
super.ccbTime.addItem("tidfme2");
_root.ccbTime.addItem("tidfme2");
_parent.ccbTime.addItem("tidfme2");
_global.ccbTime.addItem("tidfme2");
_level.ccbTime.addItem("tidfme2");
_leven0.ccbTime.addItem("tidfme2");
this._root.ccbTime.addItem("tidfme2");
even adding the scene name to it:
this._root.control_panel_sc.ccbTime.addItem("tidfm e2");
etc. (thus the above paths again + scene name)
All paths above don't work, meaning, i can't see the value in a component ComboBox, though in an empty .fla file i do see this value.
Because you can't help me out without actually seeing the .fla file, i uploaded it:
(every link is the same file, so just choose one URL).
http://pcxpert.dyndns.org/homepage.fla
http://pcxpert.dyndns.org/homepage.zip
http://www.uploading.com/?get=YQ0G1UIC zip version
http://www.uploading.com/?get=VWE6WZKO .fla version
http://members.lycos.nl/johnwhello/homepage.fla
http://members.lycos.nl/johnwhello/homepage.zip
ftp://pcxperting:flash@pcxpert.dyndns.org/homepage.fla
ftp://pcxperting:flash@pcxpert.dyndns.org/homepage.zip
Also, you're authorized to change any file at ftp://pcxperting:flash@pcxpert.dyndns.org (the future pcxperting.com that is made by and made for pcxperts)
AS3 - Path Problem ? Var In Path Problem Not Working
hitrect1_mc.buttonMode = true;
hitrect2_mc.buttonMode = true;
hitrect3_mc.buttonMode = true;
hitrect4_mc.buttonMode = true;
hitrect1_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect2_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect3_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect4_mc.addEventListener(MouseEvent.CLICK , cl1);
function cl1 (e:MouseEvent):void{
xa=e.currentTarget.name.charAt(7);
for (i=1;i<=xa;i++){
targets = "bar"+String(i)+"s_mc";
trace (targets);
soundrect_mc.targets.gotoAndStop(2);
}
well it traces bar1s_mc if it's exact as the code.
if i remove soundrect_mc.targets.gotoAndStop(2); it traces all targets.all 4 of them.How do i make flash recognize "targets" as a path to a movie clip ?
Speed Of My Button Component Versus Adobe Component
I've been happily creating my button component and things have been going well until I got to the point of creating the mouse down state.
I've modeled the structure of my components very similar to the Adobe supplied components, but I notice my component is not as attentive to mouse events as the Adobe components. I can click my mouse over one of my buttons fast enough that the button doesn't register the click.
But no matter how fast I click the Adobe button, it always registers the clip.
Is the speed difference the fact that my button doesn't use the Component shim? I plan to either use a shim or convert the component itself into a compiled clip, but for development purposes, I thought it best to reference the UIcomponent source.
I would appreciate your thoughts,
Thanks, Jennifer
AS3 Component Instantiation With Dynamic Variable Component File Name
Hello! I am passing some variables from my server to a Flex application. One of these is the name of an MXML component that will be opened in a pop up. Since I am doing this dynamically is there a way to set up an AS3 variable so that say (in pseudocode):
ActionScript Code:
// serverSideVariables['mxml_component'] = "Dialog"
var myClassNameVar:String = serverSideVariables['mxml_component'];
// then I want to do something like this:
// in static code this would look like: var myClassToInstantiante:Dialog = new Dialog();
var myClassToInstantiante:myClassName = new myClassName();
Is this possible?? Thanks!
Checkbox Component To Toggle ComboBox Component
I've got a script that dynamically generates a grid of checkboxes and combo boxes. I'm trying write a handler to toggle the Combo boxes on or off when a user clicks on the corresponding checkbox. To do this, I add a property called "bound_to" when duplicating the checkboxes. The "bound_to" property contains the instance name of the combo box that I want the checkbox to control. So here's my onChange handler:
Code:
function toggleComboBox(component) {
trace(component._name+" has been selected ");
trace("bound to "+ eval(component.bound_to));
if (eval(component.bound_to).getEnabled == true) {
trace("enabled must be true for the target");
eval(component.bound_to).setEnabled(false);
} else {
trace("enabled is false for the target");
eval(component.bound_to).setEnabled(true);
}
}
My trace actions show that the correct instance names are saved correctly and this function works to enable the combo boxes, but it won't disable them. The problem is with the IF statement I think. It always returns false so I can only toggle the combo boxes on, but not off again. Is my syntax wrong or am I doing this the wrong way?
Component Themes - Changing Button Component
I am creating a custom theme, or skin, for my components and I have figured out how to edit most pieces but the most used is the most elusive.
Does anyone know how to edit the look of the button when creating a new theme?
I am finding that you have to edit the ClassObject but Macromedia's help is very confusing, they talk aobut creating a button dynamically then about the ClassObject but don't put all the directions in one place.
Maybe someone knows a good tutorial
Thanks
Newbie Needs Component Help (Input Text Component)
Very easy i am sure.
I have a input text component on my stage. When it is CHANGED I want to move to the frame specified. IE 4 frames in target movie.
When I put 4 into the text box, I want my actionscript to go
x = this.text;
this.parent.targetswf.goToFrame(x);
x = "";
Only problem is I cant seem to use the on Change event? It says I need to use an InstanceName.AddListener. Can someone explain this to me as I couldn't find any help regarding this ?
Thanks
MCM
Changing The Color Of A Component Inside A Component?
I've been going over these docs
http://livedocs.adobe.com/flash/mx20...3.html#3148563
http://livedocs.adobe.com/flash/mx20...=00002960.html
http://livedocs.adobe.com/flash/mx20...=00002096.html
and I've been able to customize my List component like
mp3list.setStyle("color", 0xFFFFFF);
But I cannot get change the UIScrollBar or Button components. I've tried several things
Code:
_global.styles.mp3list.Button.setStyle("backgroundColor", 0x0000FF);
_global.styles.Button.setStyle("backgroundColor", 0x0000FF);
Nothing is working
Datefield Component And Combo List Component
Hello All,
Im creating a form for a booking system. When the user chooses the date and submits. The booking gets emailed to a specific address. Im using the datefield component and combolist component. in flash. I usually use PHP to push data from a text field and email. But i'm stuck here, because the datefield and combolist is not a text field. Can anyone please help me.
I wanna email the data from the fields to an email address. Im new in flash. Can anyone please help me.
Component Inspector For Custom Component Questions
Hi --
I am wondering if it is possible to make the component inspector somewhat
dynamic for use with a custom component. For example, I have a component
where the user can choose to have a value set automatically or the user can
have it set manually and enter a range for this value in two component
parameters. Is it possible to hide to parameters in the component inspector
when a third parameter is set to TRUE and to show those two when the third
is set to FALSE?
Thanks
Rich
Datefield Component And Combo List Component
Hello All,
Im creating a form for a booking system. When the user chooses the date and submits. The booking gets emailed to a specific address. Im using the datefield component and combolist component. in flash. I usually use PHP to push data from a text field and email. But i'm stuck here, because the datefield and combolist is not a text field. Can anyone please help me.
I wanna email the data from the fields to an email address. Im new in flash. Can anyone please help me.
UICombo Box Component Calling A Calendar Component
Hi I am trying to use a Combo Box that will call a calander component with the onChangeHandler.
I want it so when the user clicks the combo box a calander shows up, the user then selects there date and that date will be the current label value of the combo box.
I am using Flash MX and actionscript 1.0 so this is what i tried with no succes and was just a basic shot in the dark.
CODEfunction cmbHandler(component){
var cal = FCalendar;
_parent.createEmptyMovieClip(cal_mc,1);
cal_mc.loadMovie(cal);
component.addItem("Select Date",cal_mc);
component.setLabel(cal.getSelectedItem());
}
Loading Component Inside Scrollpane Component
Hello,
Can anyone help me out in adding a scrollpane on to the screen through actionscript and after that adding any component inside the added scrollpane component.
Thanks in advance.
[Component] Targeting Flash 6 ScrollPane Component
Hey All,
Been a while... hopefully somebody can provide some insight into what I am missing here.
I have a Flash 6 ScrollPane - yes, I know it's old, but it is also easy to do custom skinning. I had data loading into it from the library by using createEmptyMovieClip and then attachMovie to grab an MC from the library.
This all worked fine until I had to place the ScrollPane into a MC in the library, dynamically attach it to the stage and then assign the content. Now I can only get my content MC to display on top of the ScrollPane, not in it. Here is a sample:
ActionScript Code:
function showPop(popType) {
popContainer = _root.createEmptyMovieClip("popWindow_mc", 350);
popWindow = popContainer.attachMovie("pop", "pop_mc", 1);
popWindow.pop_sp.boundingBox_mc._visible = false;
popScrollClip = popWindow.createEmptyMovieClip("scrollClip_mc", 400);
popScrollContent = popScrollClip.attachMovie("scrollMC_disclaimer", "scrollContent_mc", 1);
popWindow.pop_sp.setScrollContent(popScrollClip);
};
"pop" is the linkage name of the MC that contains the ScrollPane and "scrollMC_disclaimer" is the linkage name of the MC that is the content to be scrolled.
Any ideas as to what I am missing? Any help is greatly appreciated. Thanks in advance!
Component Preloader, And Component Menu
i'm trying to use a component preloader to load a component menu, will this work? I have a more detailed post in the "Newbies" section of the boards...here's a link
http://www.flashkit.com/board/showth...hreadid=471088
If you have any idea how i can get this to work plz post...i really like this loader and it would be great to use.
Creating A Component Within A Component Class
Basically I have a component with I have associated a class with - and then attached it to stage using attachMovie and make references to it using its linked name which works great. However within this class I want to attach another movie clip component - which works however how to I reference this second component from this class using linkage doesnt work neither does assigning it to variable. The only way is to call the class - which gives undesired results.
What is the proper way to have a component within a component?
[F8] Tree Component Within Accordian Component
Hello all!
I've done a navigation scheme that uses both the accordion and tree components. The data being gathered is from an XML file. The only problem i'm having is getting the tree components to display the data that they're being provided with. I did traces and I found out that they are getting the data...but it simply isn't being displayed. Can anyone take a look at the FLA and see what's going wrong?
http://www.jake3p0.com/downloads/accordionTreeNav.zip
Window Component With Loader Component
I have the SWF loading into a shell using a Loader component. Within one swf is a trigger for a window - which ,suprise suprise, doesn't work. It works fine if I access the swf directly just not when loaded through the shell. I have added the component to the shell fla and then although a window component loads up, the content (which is linked in the library) is not found. Anyone come across this before?
Attach Code
correctAnswerBtn.onRelease = function() {
var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"CorrectAnswers"});
my_win.title = "Correct Answers";
var winListener:Object = new Object();
winListener.click = function(evt_obj:Object) {
my_win.deletePopUp();
};
winListener.complete = function(evt_obj:Object) {
my_win.setSize(my_win.content._width+7, my_win.content._height+32);
my_win._x = ((Stage.width/2)-(my_win._width/2));
my_win._y = ((Stage.height/2)-(my_win._height/2));
};
my_win.addEventListener("click", winListener);
my_win.addEventListener("complete", winListener);
};
Menu Component And Window Component
I have a dilema. I'm trying to create a flash application that is basically a rich text editor
well, I'm trying to make a menu component to open a window component which has a close button
here is a part of my code (attempt 1):
PHP Code:
import mx.controls.Menu;import mx.controls.MenuBar;import mx.managers.PopUpManager;import mx.containers.Window;var my_mb:MenuBar;var myProfile:Menu = my_mb.addMenu("My Profile");myProfile.addMenuItem({label:"View/Edit Profile Information", instanceName:"newInst"});myProfile.addMenuItem({label:"See My Profile", instanceName:"openInst"});//THE LISTENERSvar mbListener:Object = new Object();mbListener.change = function(evt_obj:Object) { var menuItem_obj:Object = evt_obj.menuItem; switch (menuItem_obj.attributes.instanceName) { case "openInst": var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"openDialog"}); var winListener:Object = new Object(); winListener.click = function() { my_win.deletePopUp(); }; my_win.addEventListener("click", winListener); break;}
The problem with this script: when I test the movie, the movie freezes and Flash asks do you want to disable the script and etc..
so I tried doing the same by attachMovie() :
PHP Code:
//THE STUFF FROM BEFORE switch (menuItem_obj.attributes.instanceName) { case "openInst": _root.attachMovie("Window","openInst",this.getNextHighestDepth()); openDialog.setSize(623.9,310) openDialog.closeButton = true; openDialog.contentPath = "openDialog"; openDialog.title = "Open Document";//HERE IS THE PROBLEM: openDialog.close = function() { trace("Closing..."); removeMovieClip(_level0.openInst); } break;
The problem from the 2nd Code Box: I can't close the box. When I press the X, it won't close it.
So...basically what I'm asking is...How do I call a Window Component from a Menu Bar Component and let the Window Component also close correctly when the user closes it.
Thanks in advance for your great help!
AS2: Menu Component & Window Component
well, I had a question Yesterday, and posted in the Flash 8 Section of this forum...well, I have a question now...When I open a Window Component(with a movie clip inside it ...ofcourse) via Popup Manager from the Menu Component, the Window opens up, but I can't go back to the menu and open it. Any suggestions on how?
Here is a part of my code (which I believe will summarize the rest of my code):
PHP Code:
import mx.controls.Menu;import mx.controls.MenuBar;import mx.managers.PopUpManager;import mx.containers.Window;var myProfile:Menu = my_mb.addMenu("File");myProfile.addMenuItem({label:"Open", instanceName:"openInstance"});var mbListener:Object = new Object();mbListener.change = function(evt_obj:Object) { var menuItem_obj:Object = evt_obj.menuItem; switch (menuItem_obj.attributes.instanceName) { case "seemyProfileInstance": var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Open Document", contentPath:"openDialog", closeButton:true}); my_win.setSize(320, 240); var winListener:Object = new Object(); winListener.click = function() { my_win.deletePopUp(); }; my_win.addEventListener("click", winListener); break;
Loader Component And List Component
Hello everyone,
using AS2.0 does any one know if i can push or add a list component inside a loader component?
This would allow me to add as many List components as i want "dynamiclly" while letting the loader component grow as needed with the usuability of the scroll bar on a small stage.
thx
Datagrid Component Vs. Dataprovider Component ?
could someone help me out here? i am attempting to use some methods on my datagrid, but for some reason only one method is functioning.
by methods i mean this:
(DataGrid component)
myDataGrid.getColumnAt(index).width
myDataGrid.removeAllColumns()
(DataProvider compnent)
myDP.removeAll()
here is what i did:
Code:
drag and drop a datagrid component onto stage
give it an instance name of quiz_dg
here i call a function that populates an array (1 row) and assigns the array to my datagrid:
Code:
function doll(blah) {
toy();
quiz_dg.dataProvider = test;
}
this is my function to populate the array:
Code:
var test:Array = new Array();
function toy(blah) {
test.addItem({Tmp1:tmp1,
Tmp2:tmp2,
Tmp3:tmp3,
Tmp4:tmp4,
Tmp5:tmp5,
Tmp6:tmp6,
Tmp7:tmp7});
return test;
}
so here is my dilema:
Code:
no matter how i add code to manipulate my quiz_dg, none are recognized, i did figure out that some methods, manipulate the datagrid, and the same methods do not affect the dataprovider what so ever, thus the reason for having two different methods to clear a datagrid.
DataGrid Component:
Code:
you can use myDataGrid.removeAllColumns(), but it also tells me this:
Calling this method has no effect on the data provider. Call this method if you are setting a new data provider that has different fields from the previous data provider, and you want to clear the fields that are displayed.
so i had to use myDP.removeAll() to clear my datagrid
here is what i did to use myDP.removeAll():
Code:
drag and drop a datagrid component onto stage
give it an instance name of quiz_dg
function doll(blah) {
toy();
test.removeAll(); //clear previous items
quiz_dg.dataProvider = test;
}
var test:Array = new Array();
function toy(blah) {
test.addItem({Tmp1:tmp1,
Tmp2:tmp2,
Tmp3:tmp3,
Tmp4:tmp4,
Tmp5:tmp5,
Tmp6:tmp6,
Tmp7:tmp7});
return test;
}
so what i would like to use is:
Code:
myDataGrid.getColumnAt(index).width
any help is greatly appriciated....
ra2833
Path
hi all,
i have an mc(1) on the main timeline and another mc(2) inside mc(1); what would the path be to control mc(2) from within mc(1)? i tried things like:
mc1 and mc2 = instance names of mc(1) and mc(2)
_root.mc1.mc2.gotoAndPlay(2);
or simply
mc2.gotoAndPlay(2);
none of these work;
i appreciate any help here.
thx
Path?
Ok, I've been trying this for hours now...still can't get it working...
Let's suppose I have a holder MC placed in _root.othermc.HolderMC and now I'm loading an external swf (my.swf, located on a different domain than Holder MC) into this Holder. What do the LOADED and the TOTAL vars below have to look like ?!?!?
Holder.loadMovie("http://www.whatever.com/my.swf");
Holder._x = 0;
Holder._y = 0;
this.onEnterFrame = function() {
LOADED = Holder.getBytesLoaded();
TOTAL = Holder.getBytesTotal();
PERC = LOADED/TOTAL*100;
Please.....anyone...
[Edited by Natsurfer on 08-09-2002 at 03:28 PM]
Path? ...please Help
Hi all,
Let's assume you have a scroll pane and scroll content is MC1.
What would be the path to that MC1??
_root.ScrollPaneInstanceName ??
Thanks
Natsurfer
Path
Hello again .. :-)
I am having trouble with loading and unloading movies.
this is my setup:
Mastermovie: _root.createEmptyMovieClip("container", 10);
loadMovie("pan_svaneke1.swf", "container");
container._x = 30 ;
container._y = 40 ;
* Container
- pan_svaneke1.swf
* dragcontrol
* picture
* image
In the image clip I have a botton
and now I want to unload pan_svaneke1.swf and replace/load pan_svaneke2.swf ....and so on But how?
Path To CD
Does anyone know how to create a dynamic path to a users cd player? I am working on a site that all the flash, images and sound files will be distributed on a cd and called from a html page.
Help Path?
sometimes I have the hardest time understanding the parent-child relationship. OK, heres what i got. ive got 4 buttons on my main timeline, each with a drop down menu with three buttons. (now these are all called with movie clips by functions.)
now I need to (attachMovie) an effect on the rollover buttons from the drop down menu. follow?
=============================================
\ DropMenuMC is the name of the MC that triggers when the user rolls over one of the main 4 buttons. negative (resides in DropMenuMC)and is the instance name of the MC/button
that needs to be rolled over to get the effect (DMfxID the export name, DMfx the instance name).
=============================================
negative.onMouseUp = function() {
_root.attachMovie("DMfxID","DMfx",6);
_root.DMfx._x = negative._x;
_root.DMfx._y = negative._y;
}
=============================================
i set the depth to 6 (because its just higher than the last depth that was set)
I have this action placed on the first frame of DropMenuMC. i have tried it on the main timeline and have tried several variations of a target path to get it to work. any inkling of an understanding thrown my way will be greatly appreciated - thanks.
geoff
Path From Php
Hi guys,
I would like to know one thing. I have an external movie called register.swf that fits in the middle of my index page. I have created a form in php called contact.php. This form opens in a new window. It is a pop-up window, in fact. When the person has finished to fill in the form, he or she presses the send button. By doing this, it calls an other php file called email3.php. Now, this php file meant to send all the information to my email address. However, I am using one line at the end and I don't know what to call to add the final touch of my message: Your request has been sent. Thank you!
Here is the code I am using in flash: echo "_root.input.EmailStatus=Complete - Your mail has been sent";
php?>
Let me comment: _root should be where all my external movies are going. input is the flash layer where my variable name called: EmailStatus is located. Now, is it the right path? It is all I am asking.
Thank you,
Path Q...HELP PLEASE
i have a MC named "bob1_mc" in my root timeline...i have "bob2_mc" inside of "bob1_mc"...at a certain point of "bob2_mc" i want to jump to frame label "two" in "bob1_mc"...right now i have...:
_root.bob1_mc.gotoAndStop ("two");
whats wrong here, it doesnt work...?
thanks
|