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




Create Custom Components In Flash MX



how can i create customised components in flash mx thru actionscripting???



FlashKit > Flash Help > Flash MX
Posted on: 07-26-2003, 03:21 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Are There Any Tutorials About Creating A Live Preview And Custom Icon For Custom Flash Components
Hi
I need tutorials about the custom components and how to make a live preview for them and also custom Icons,
basically I want to know if we can put an swf in the live preview field and when we are in the design view of the component that I can interact with the swf like click it and show a copyright message (all at design time not run time of the component)?

and about the custom Icons, flash asks for Fireworks PNG and when I put mine it does not show in the library???

thanks.

Problems Building Custom Flash Components
I'm new to flash components but not new to OOP. I've been playing around trying to build a custom component using existing source code examples in flash. I've copied the entire classesmx directory to my development directory and have started by extending the ScrollView class.

Everything appears to be working corrently in terms of running the functions from the parent classes but have noticed its not really working correctly. For example it will not create the border. If I drag a TextArea component into the stage it will start working. So this is telling me something is missing but not sure what.

As far as I can tell reference to the imports in the class source I'm not missing any files. It's not trigging any errors. Adding traces to the copied classes show its executing functions in the parent and shows its creating the border_mc but immediately after its creation its still set to null.

Any help in this area is greatly appreciated. Thanks!

Custom Flash Components For Interactive Whiteboard Resources
Hi

I'm lookingto build a flash interface that allows teachers to build their own interactive whiteboard resources. Does anyone know how to build custom flash components? Or can anyone suggest a way of creating a flash movie that allows users to upload pictures - create a simple quiz and then save what they have done as an swf??

I'm only loosly sure of what I'm doing so any vague help will be appreciated...

Cheers
Mark

Distribute Items To Key Frames & Custom Flash Components
Any body know how to do this?

How to distribute items to key frames?

Similar to flashes built in distribute to layers?

For example:
These 2 guys are asking for the same thing I am:

http://flashkit.com/board/showthread...ute+key+frames

http://flashkit.com/board/showthread...ute+key+frames

Also does any one know where I can get custom flash components built?

I need some help!!!! Baddd!

How Do I Create A Custom Media Player Within Flash Using Actionscript?
Is there any tutorials on it? want to create a custom media player to playback videos within flash.

Create CUSTOM SIZE HTML POPUP From Flash Button
Having problems with creating html pop up with custom size on it

Can anyone help me out with script that I have to put on button in FLASH

project involved I have to create around 20 pop ups custom sized so keep that in mind pls

Thanks in Advance!!!

Flash 8 FLV Playback/Custom UI Volume Components With Global Volume Control
I'm creating a multi-scene swf with several FLV Playback - Player 8 Component videos on different scenes/frames.

I want to use the FLV Playback Custom UI Volume Bar so that when a user makes a volume adjustment during one FLV Playback viewing that volume adjustment will remain throughout the other FLV Playback video viewings.
This will prevent the viewer from having to make volume adjustments for each viewing. However, I want to enable the volume change to be made and changed at any time throughout any of the video viewings. Another aspect of this is that the FLV Playback Component has a volume setting that would have to be overridden by the global custom UI volume setting.

Is this possible? If so, how would this be done?

Thanks!

James
jamesk@pacificmm.com

Custom Components
i have an fla with three custom components that i saved into the same directory as the flash ui components. i can see the file in the component drop-down list (from the component panel), but only two of the three components are presented for use.

the #initclip directives are numbered 1, 2, and 3. it is the first component that does to show up?

any ideas why?

Custom Components? Help
Hey I been making a website for my sister-in-law and I using flash components for the first time. They're pretty rad! But how do I change stuff. Like the list component, when you roll over stuff in the list it highlights green. Is there anyway to change that color? And if the listbox is selected it highlights green. Is there anyway to change that color? I wanna make those colors blue Here's the site i been making

soiree stationary

The store locator is where I used the list component i'm trying to change the rollovers to blue. Anybody who helps is awesome!

[F8] Custom Components..
So I followed some tutorial about crerating your OWN components.. It was for Flash MX I believe..

I wanted to try and add this .fla (component) to my FLASH 8 IDE...

but Im not sure how to go about it??

In MX..all you were supposed to do is drop the .fla in the compoenets directory in the Application Data.

This doesnt seem to be the case for Flash 8... or is it? I cant seem to get it to show in the components panel.

Upon some searching.. it looks as if ALL components have to have an external class with them?? Is this correct?

This is just a simplePreloader 'movieClip' component that I created.. no class files for it..

anyone shed some light?..or a work-around..or what to do next?

thanks

Custom Components
I'm trying to make a custom slider but seems to me is not just changing the mc of the components of the simbol. Does anybody have any idea or even better a tutorial about this topic?
Tx

Custom Components
Okay,

I am making custom buttons that i want to be components incase the client changes their mind on the names of buttons. But i don't know what to add to make them work as buttons independantly?

I need each of them to be able to activate external swf's.

If you know what i need to do please let me know.

Thanks

Custom Components
Hey there people of earth,

I'm trying to create custom buttons to use with a flv file. essentially i want to use the Media Display component and create my own controllers to control playing the flv. So I found this doc via macromedia however I get hung up on step 11 as it doesn't seem to work.

Does anyone have any good links on explaining how I can create custom buttons to control a flv?

OR

if there is a good book that will help me learn more on creating custom components for Flash MX Pro, would be greatly appreciated.

Thanks in advance,
Mark

Custom Components
Does any one have source files for custimizing components? Or at least a good tutorial? The Macromedia one is not very helpful (it's lengthy and confusing). I am trying to make a custom Media Controller in Flash MX 2004 Pro...
any pointers, tips, or files...please help.

I don't even know where to start really.

Thanks a lot

Custom Components
how would one go about making a custom component from scratch?

Components Custom UI
I need to send my parameters value to the swf which contains my components can I use the custom UI to pass the values to these components if I can then how dont direct me to macromedia's site cuz their examples tend to misdirect me
Wadood

Custom Components
Okay,

I am making custom buttons that i want to be components incase the client changes their mind on the names of buttons. But i don't know what to add to make them work as buttons independantly?

I need each of them to be able to activate external swf's.

If you know what i need to do please let me know.

Thanks

Custom Components
Hey there people of earth,

I'm trying to create custom buttons to use with a flv file. essentially i want to use the Media Display component and create my own controllers to control playing the flv. So I found this doc via macromedia however I get hung up on step 11 as it doesn't seem to work.

Does anyone have any good links on explaining how I can create custom buttons to control a flv?

OR

if there is a good book that will help me learn more on creating custom components for Flash MX Pro, would be greatly appreciated.

Thanks in advance,
Mark

Custom AS3 Components
Does anybody know where I might find a bare-bones walk through on how to create custom AS3 components? I'm reading along with Jeff Kamerer's 'Creating ActionScript 3.0 components in Flash' (http://www.adobe.com/devnet/flash/articles/creating_as3_components.html) and am finding it a little over the top. He spends more time talking about how he hacked the TitleList than he does in turning it into a component. I've been trying to extract the information specific to creating a component, and have come up with the major points I think, ei: extending the UIComponent class, overriding configUI, draw, (and another source said setSize was needed to, so I've tried that), I've put in a bunch of metadata, but all my component does when I "Component Definition..." -> "Export SWC..." it and pull it into another source is spin, really fast, from frame 1 to frame 2... which, although interesting, isn't what I'm going for.

Us there a good tut out there?

Thanks,

nic

Custom AS3 Components
Does anybody know how to create custom components in AS3?

I want to make some simple components that I can reuse as necessary. I DONT want to use the V2 architecture and I dont want to mess around with component shims, avatars, live preview or any of that garbage.

Any ideas?

Custom Fonts And Components
I'm having problems using pixelfonts within components.
I've set the font using the new FStyleFormat function (see below), but that doesn't seem to embed the required font. I was going to try creating a shared font symbol but I read that these dont work for dynamic text fields or input fields.

Anyone got any advice????


var controlPanelStyleFormat = new FStyleFormat();
controlPanelStyleFormat.textFont = "kroeger 06_55";
controlPanelStyleFormat.textSize =8;
controlPanelStyleFormat.textColor = 0x757975;
controlPanelStyleFormat.addListener(myComboBox,int erfacePanel.selector_mc, interfacePanel.BUTTON, myListBox,myScrollBox,myPushButton, myScrollBar);
controlPanelStyleFormat.applyChanges;

Custom Components With Other Symbols?
In Flash CS3:

Suppose I've put an instance of symbol B in symbol A. And I give Symbol A a class name (with corresponding class definitions in an .as file). If the instance name of that B instance is clipB
then I'm supposed to be able to access this instance in A's class definition .as file as follows:

clipB.x = 100;

whilch works just fine.

But if I convert A into a compiled MovieClip, it seems that the same piece of code would produce an error as follows:

1119: Access of possibly undefined property clipB through a reference with static type Class.

This is weird. Something that worked fine when it's a normal MovieClip goes wrong when it's converted into a compiled MovieClip. It seems that when a MovieClip is converted into a component, it just doesn't remember all its children's names!

[CS3] Custom Components & Classes
Does anybody know where i can start learning about making custom classes and components? I've had a look around and theirs minimal sources so i was wondering if anybody on here knew where i could learn the basics and beyond!

Thanks in advance

Importing Custom Components
Hypothetical example...

I have a custom component in Flash CS3->Configuration->Components->Custom->TestComponent.swc

I'd like to import that component to be used in a class, as in:

package {

import TestComponent;
import flash.display.MovieClip;

public class Testing extends MovieClip {
etc...
}

}


would that be com.custom.TestComponent?

Hope I'm being clear, kinda new to as3. Thanks.

Problem With Custom Components
I have been stuck on this problem for a while, and wonder if anyone knows the answer. It is concerning accessing some properties of a custom component. I marked the problem with the keyword [PROBLEM] in the following snippets of code.

components/State1UI.mxml
--------------------------------
<?xml version="1.0" encoding="utf-8"?>
<custom:State1UIClass xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:custom="components.*">
<mx:Canvas>
<mx:Text id="msg" text="message"/>
</mx:Canvas>
</custom:State1UIClass>

components/State1UIClass.as
--------------------------------
public class State1UIClass extends Canvas
{
private static var _instance: State1UIClass;

public var msg: Text;

public static function getInstance(): State1UIClass
{
if (State1UIClass._instance == null)
{
State1UIClass._instance = new State1UIClass();
}
return State1UIClass._instance;
}
}

main.mxml:
-----------
<custom:ApplicationManager xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:custom="components.*" applicationComplete="start()"/>
<mx:State name="state1" >
<mx:AddChild position="lastChild">
<custom:State1UI/>
</mx:AddChild>
</mx:State>
</custom:ApplicationManager>

components/ApplicationManager.as
-----------------------------------
public class ApplicationManager extends Application
{
public function start():void
{
currentState = 'state1';

//[PROBLEM]: AT RUN TIME, State1UIClass.getInstance().msg
//IS NULL!!!!
Alert.show(State1UIClass.getInstance().msg.text);

}
}

FLV Video And Custom UI Components
Hello Everyone,

Hopefully this is the best place to put this question. I did not see a FLV Video section. Any way, I have three different instances of a FLV Playback components each connected to its indiviual instance of a Custom UI Play/Pause button, seekbar, and volume. The problem is that when I navigate from keyframe to keyframe the Custom UI components build on top of each other. Does anyone to the script I would need to hide or turn off a Custom UI when its related video is not playing. Thank you all so much for your help.

Problem With Custom Components
Okay so I'm taking my first stab at creating my own component, and I've run across an odd problem. I exported a .SWC file and placed it in the Flash MX Components ("Flash MX 2004enConfigurationComponents") folder. The component shows up fine in the Components tab in flash. The problem is, whever I try and drag an instance of that Component to the stage it starts trying to run the code. Before I ever test the movie or anything it starts running while I'm still in the authoring environment. I don't have live preview on. Is this normal or is there some trick I'm missing to creating custom components? Any advice or links are appreciated.

Loading Custom Components
Hey,

Im currently working in Flex and AS3, wondering if anyone can give me a hand with part of the code that Ive spent days playing with but cant get going.

I essentialy have a main application file main.mxml and I want to load canvas components in and out of view depending on what the user clicks but I need to do this all dynamicaly, Im good with AS2 and AS3 but its just this one thing that I am stuck on.

I have created more files such as homepage.mxml and profile.mxml and these contain a canvas element and then AS within this. I want to be able to load these in and out using a class and actionscript rather then states and mx tags etc.

I got it all going adding a child and creating an instance of the page so it displays but then I ran into troubl referencing it again and using removechild, I kept getting errors about it being null so I assumed i had messed up the referencing somewhere.

I know the question isnt specific with code etc but could someone perhaps suggest a method of doing this even if it is theory?

I just need to wrap my head around the way of doing this and Im sure I could write the actual code and classes myself. If anymore info is needed just let me know.

Thanks!

Styles In Custom Components
I am looking for some information on extending the UIObject class to utilize style functionality. It seems most of the articles do not address this directly. Particularly I am creating my own components and want to know what I nee to do to implement the setStyle method, I can call it from my component, but where do I react to that call, or do I achieve that in a non-code manner (naming movieclip pieces accordingly)

Using Custom Buttons Instead Of Components
I'm working on a tutorial and trying to modify the actionscript so I can use my own next/previous buttons. I don't like the component buttons that are used in the tutorial. Here is the section of code I'm trying to edit:

function loadWhatever(act, increment) {
num = new Number(_parent.NumLow);
if(act == "Next") {
_parent.NumLow = num + increment;
} else if(act == "Previous") {
_parent.NumLow = num - increment;
} else {
_parent.NumLow = 0;

The actionscript on the next button is this:

on(click){
_parent._parent.read.loadEntries("Next", 1);
}

Any help would be greatly appreciated. Thank you in advance.

Custom Components And Parameters
People , I need a big help in here...

First, I have a custom component linked to the Class "List" with the
following default parameter(showed in the component parameters painel):


ActionScript Code:
mylist:Array=["one","two"]



code in List.as
----------------


ActionScript Code:
class List{
 
   [Inspectable(name="mylist", defaultValue="one,two",category="1")]
   public var mylist:Array;
 
   function List(){
         trace(mylist)  // trace returns "one,two"
   }
 
 
}



what I need is that the values defined in the component painel
for "mylist" parameter, be avaliable for any other instances of
the "List" class so I can manipulate those values anywhere.
I have tested and unfortunately it returned "undefined":

Example:


code in Generic.as
------------------



ActionScript Code:
class Generic{
 
      function Generic(){
           var my_list:List= new List() // trace returns "undefined" here
       } 
}



Any help is apreciatted ! Thanks !

Custom UI And Components (2004)
Hi there,

I made a custom UI .swf and a simple component in Flash 2004.
I associated the component to the UI and to a class in a separate .AS file. The component itself is working fine, but I want to use the UI.swf to
update a few of its properties.

My question is : how do I pass variables from the UI.swf to the Component to update ???

Thanks everybody

{ Flash MX Professional 2004 / Player 7 / AS 2.0 }

Scalable Custom UI Components In MX2004
Have you ever noticed that you can't scale instances of your custom components? You can rotate them or skew them, but when an attempt to scale them is made (via the scale tool or transform box) they appear to scale on the stage, but when you export they will stay the same size.

My components extend UIComponent, so I shouldn't have to manually override the init() or size() methods. I could be wrong there.

Does anyone know how to get a custom component scalable, without having to manually target each MC within my component (i.e resize the whole instance)?

desperate for an answer (aren't we always?)...

cheers!

Live Preview And Custom Components
How do I get textfields in components that I've built , to show the data passed from a component paramater inside of FMX with Live Preview enabled?

More Help Needed Custom Scrollbars Etc With Components.
Hey,

First of all I wanted to thanks lost in beta for the help with my last question. Everything worked out perfectly.

Now, I added some scrollable text using the mx components. I have lots of experience with adobe photoshop and other raster programs. So I was wondering if there are anyways to tweak the scroll bars/buttons etc that flash automatically uses, with some of my own, preferably without going through too much trouble.

Thanks in advance again.

Chris

Sizing Problems With Custom Components
I have created a custom slider component (SWC file). When I resize it in the editor, it seems to be resizing fine, but then when I play the movie it is back to it's full size again. I know I'm missing something here but I don't know what. Any suggestions?

Thanks,
Osman

Problem With Custom Icons On Components
Hello...
I've just finished my component.
Now i want to create a custom icon.
I followed this steps..
1º Created a FCustomIcons Folder
2º Import my 20x20 custom icon to library and placed in FCustomIcons folder
3º change the icon name to the name of component.

Everything works! when i open and close the FCustomIcons folder, my component refreshs the default component icon with my custom icon. So far everything ok..

the problem is, when im creating the SWC file.
After convert it and install the component with the mxp file.
After install it.. i go to the Component (CTR + F7) and the icon that appears on my component is the default component icon those 3 color boxes...

Why does my custom icon doest apear!?
Any help!!?
Best rergards

Custom Styling Your UI Components(combobox Help)
hey all,

i want to apply a graphic that i have created as my new skin for this component is this possible? or how do you go about styling??

Cheers in advance peeps

How Do I Replace Components With Custom Stuff
Here is what I have working they way I like http://shara.us/Practice/FlashDB/myTextBox.html the text box pulls data from a mySQL database and displays it just fine. But the default component buttons are ugly and I wish to use custom images either as a movie clip or button. Is this possible? Here is the actionscript I'm working with:

_global.styles.TextArea.setStyle("backgroundColor" , "false");
_global.styles.TextArea.setStyle("borderStyle", "none");
_global.styles.Button.setStyle("backgroundColor" , "false");
_global.styles.Button.setStyle("borderStyle", "none");
function loadEntries(act, increment) {
// Define NumLow as a Number
num = new Number(_parent.NumLow);
// Act accordingly
if(act == "٧") {
// Add increment
_parent.NumLow = num + increment;
} else if(act == "٨") {
_parent.NumLow = num - increment;
} else {
// Load default - i.e. 0
_parent.NumLow = 0;
}
// Update Statistics
_parent.read.low.text = _parent.NumLow;
_parent.read.high.text = Number(_parent.NumLow) + 1;
// Begin Loading
myEntries = new LoadVars()
entries.vScrollPolicy = false;
myEntries.ref = this
myEntries.load("http://shara.us/Practice/FlashDB/shara.php?action=read&r="+random(999)+"&NumLow="+_ parent.NumLow)
myEntries.onLoad = function(success){
if(success){
// Assign output to components and objects
entries.text = this.entries;
totalEntries.text = this.totalEntries;
//Update values to calculate prev/next button visibility
num = Number(_parent.NumLow)
var totalEntries = Number(this.totalEntries);
var total = num+increment
//Hide/show next button
if(total<totalEntries) this.ref.next_button._visible = true;
else this.ref.next_button._visible = false;
//Hide/show previous button
if(num==0) prev_button._visible = false;
else prev_button._visible = true;
}
}
}
// Load Default
_parent.read.loadEntries("Default", 1);
stop();


Lastly, I would like to add a transition using a mask or whatever other means to make the text appear as if it is dropping down from the top of the screen when the next button is used (page down basically) and reverse when previous button is used (page up). Any help with either or both of these matters would be greatly appreciated. Thank you in advance.

Custom Components And Project Suggestions
Hi,

I am trying to develop a set of classes and custom components which will make it easy to create user interfaces without much knowledge of AS. These user interfaces talk to external IP based devices.
I have completed on such interface using AS2 but used a active x VB container to do all the communications. I am now trying to recreate in AS3 but the learning curve is steep and I have been splitting my head open trying to get my head around which is the best way of attacking it.
So far I have created a class that connects to the control system using an XMLSocket and serializes the communication between the Flash and the Control system. I have also created a custom Event class to fire of messages to the component on the stage that may have to react to the incoming information. That is if a "channel 1 on" message comes in and there is a movie that has a 1 in its channel attribute is should animate to the on position.
I have trying to create a custom component that would have all the attributes that may need to be changed at design stage as Inspectable. I have done this but have run into a few snags (problems).

1. Custom components don't seem to lend them selves to multi state buttons (movies). From what I can figure the assets are locked in a single frame (2). I am not sure how this leaves me with being able to let a non programming arty type person giving it a nice pretty animated button gesture. I was thinking of trying to just make the simple animated movie with no AS and the adding it to the component at design time giving it a standard alias as a reference.

2. If I try and add more than one of my custom components to stage is gives me an error. (already have an instance on the stage bla bla). How can I fix this ?

I have read many blogs on creating custom components and the offical Adobe one which is pretty full on. I was hoping to get some input back that would save me trawling through more blogs at least for a day or two.

Cheers

Matt

Sizing Problems With Custom Components
I have created a custom slider component (SWC file). When I resize it in the editor, it seems to be resizing fine, but then when I play the movie it is back to it's full size again. I know I'm missing something here but I don't know what. Any suggestions?

Thanks,
Osman

Custom Components And Movie Navigation
Hi guys,

    I have a little problem.  I have created a custome component whihc is a self contained SCORM compliant question.  The component in itself is working fine the problem comes when I try to incorporate it into a larger quiz file.  The Component contains two buttons for navigation - back and forward. on the first Question in a quiz the back button is hidden and on the last question the next button is altered to a submit button.  The problem I am having is actualy using these buttons to navigate between frames in the main movie.

I assume that the main/quiz movie should be classed as the parent of the component and thus I have tried
CODEon(release)
{
      this.parent.gotoNextFrame();
}

Listening For Events With Custom UI Components
hi all,

to better learn the finer points of designing UI components, i'm trying to develop a simple accumulator. you know, a list on the left side, a list on the right side, and some buttons in the middle to move crap back and forth... i'm sure components like this are available already, but like i said, i'm doing it for the educational value.

anyway, i've set up Accumulator.fla like so. one layer (UI) contains a "to" List, a "from" List, an "add" Button, a "remove" Button, and a "bounding box" MovieClip. the other layer (Actions) contains the script to add a few elements to the "from" List, just so i have something to work with.

i've also set up Accumulator.as with all of the class initialization stuff (constructor, init() method, size() method, etc...) as needed.

so, when i fire up the movie, the UI controls work properly (Lists are populated, Buttons are clickable, etc...), and all of the trace statements i put in my Accumulator class are showing up. during the initialization of the Accumulator class, i'm trying to add a listener to the "Add" button. here's the trouble... the "click" event never seems to get trapped in this case. however, if i add a listener on the "Add" button in the Actions layer instead, everything works fine.

anyone have any ideas what might be going wrong? the goal here is to be able to add the listener on the "Add" button from inside the Accumulator class, rather than having to put listening code on in the Actions layer outside the Accumulator class. that way, everything is encapsulated in a nice neat little package. is there a better way to approach this?

thanks in advance.

Load Order Of Custom Components/Classes
Hello All ---

Is there a way in AS2 to determine the order that classes will load/initialize? I have 2 Custom Components on the stage and need Component B to load before Component A. I have found that if I put them on different layers, that sovles the problem, however, that is really not an ideal fix.

Thanks for any and all replies.

Custom Composite Components In MXML/ActionScript
Hi,

I am trying to figure out how to create a custom composite component that is composed of several other custom components.

For example I want something along the lines of:


Code:
<MyPackage:Clock size="50">
<MyPackage:Hand id="hour" length="30" width="10" />
<MyPackage:Hand id="minute" length="40" width="5"/>
<MyPackage:Tick label="12" angle="270" />
<MyPackage:Tick label="*" angle="90" />
</MyPackage:Clock>
Where the Clock, Hand, And Tick classes are defined in ActionScript, but the number of sub components each instance of Clock contains can be defined in the MXML file.

Currently, my subcomponents are subclasses of the Sprite Class, and my main component is a subclass of the UIComponent.

The error I am getting on the MXML page is Component declarations are not allowed here.

Additionally, if I get this working, is there a way subcomponents could gain access to properties of the other already instantiated subcomponents during its instantiation?

Rmtp Address For Custom Made Components, Can It Be Done?
Good afternoon
(Just joined actionscript.org as I'm about to embark on a large web project for a client, and I've been given the mind bending task of integrating streaming video).

Managed to setup a normal player streaming via servers, FMS servers and clients etc etc ...took a while but it works perfectly...

THE PROBLEM:

We have a player that was created without using any of the drag and drop components and has all been fully coded.

The problem is that if I put the 'rmtp server video' address where the flv filename was used before (it was a progressive download before), and put it up on the web server it cannot find the address.

The address works fine when using prebuilt flash player components.

Does anyone know if:

a) is it possible to stream video through Flash Media Server using custom built components.

b) is there a different address needed, to get it to work?

c) any ideas, as I wont be able to create the same style of player using the pre-built components.


Many thanks

Jon

sure to be searching the forum for a lot of other anwers soon, got some already but this is the first question. cheers.

Using Listeners With Motion Tweens In Custom Components
Hi all,

I'm creating several cutom components. Within each I'm setting up scripted tweens with the Tween class. I have listeners setup within the components to fire internal events. My question is how can one component on the stage listen to the others tween events? Currently I'm setting up internal listeners like so:

MenuListener = new Object();
var easeType = mx.transitions.easing.Regular.easeOut;
ButtonTween = new mx.transitions.Tween(....);
ButtonTween.addListener (MenuListener);

My issue is that "MenuListener" is a local object. How does some other component subscribe to this event? Thanks and sorry if this is a stupid question. I know it's going to be something easy.

Drag And Drop Behavior For Custom Components
How i can reproduce an drag and drop efect for my component, with move of component. For moment i have this code.

Code:
var myPanel:myComp = new myComp;
function dragStart(event:MouseEvent):void{
var dragInitiator:myComp = event.currentTarget as myComp;
var dragSource:DragSource = new DragSource();
DragManager.doDrag(dragInitiator, dragSource, event);
}
function dragEnd(event:DragEvent):void{
var dropTarget:Canvas=event.currentTarget as Canvas;
DragManager.acceptDragDrop(dropTarget);
}
myPanel.addEventListener(MouseEvent.MOUSE_MOVE,dragStart);
canvas1.addEventListener(DragEvent.DRAG_ENTER,dragEnd);
When release mouse button, myPanel is not moved to the new location. How can do that?

Copyright © 2005-08 www.BigResource.com, All rights reserved