ActionScript 3.0 :: Making Component That Uses Several Controls

Nov 21, 2010

I'm making some custom controls/components and I have an issue with package paths. I know what I want, but don't know how to do it. I'll try to illustrate with code:
PHP Code:
package {
public class Test extends Sprite {
public function Test() { // let's make some instances...
//I'll use full path names to avoid imports
var _one:ClassOne = new domain.controls.ClassOne();
[Code] .....

This is all ok, works and stuff. But as you can see code is awefull. And If I make import statements:
import domain.controls.Style;
import domain.controls.classTwo.Style;
I'd still have a mess in code, since I'd have to use full paths.

Now, I would like to simplify things, but keep it clear also. Lets say I'm making a component that uses several controls. I want to make package part of the assignment statement, like:
Code:
import domain.controls.*;
......
// inside my component
test1.style = Style.DEFAULT;
test2.style = classTwo.Style.RED;
But this is not working. I was thinking about making some kind of proxy class/variable/object named classTwo.

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Making Video Fullscreen Without Scaling Interface Controls?

Oct 21, 2011

Sites like The Daily Show (I can't post URLs since I'm a new user, but just go to their front page to see) are doing what I need to do. When you go fullscreen with their video, the bottom video controls and the top social media bar aren't scaled. They adjust themselves in width, but the text and button graphics remain the same size.Now, I've had success with a method where, when the FULLSCREEN event is invoked, I downsize my interface elements by a ratio equal to the difference between my SWF size and the screen size, essentially keeping the interface at a constant size in both modes. However, all text and graphics inside those elements are distorted or blurred when I do this.

View 3 Replies

ActionScript 3.0 :: Making Video Fullscreen Without Scaling Interface Controls

Oct 21, 2011

Sites like [URL] are doing what I need to do. When you go fullscreen with their video, the bottom video controls and the top social media bar aren't scaled. They adjust themselves in width, but the text and button graphics remain the same size.

I've had success with a method where, when the FULLSCREEN event is invoked, I downsize my interface elements by a ratio equal to the difference between my SWF size and the screen size, essentially keeping the interface at a constant size in both modes. However, all text and graphics inside those elements are distorted or blurred when I do this. At [URL], the text looks exactly the same in both modes, and uses no anti-alias.

View 3 Replies

Flash FLV Playback Component Controls Not Working?

Feb 3, 2009

I have an FLV Playback component in a website that I'm working on and for some odd reason the controls do not work. The video loads and plays fine and the controls appear but you cant click on anything like you can when you assign the skin in the parameters. It is a default Flash skin. At first I thought it was due to the video layer being under a mask, so I moved it on top and it didnt change anything.

View 1 Replies

IDE :: FLVPlayback Component - Adding User Controls?

Jan 30, 2009

I'm attempting to add some user controls to a flv for a client. I've added the flv to a swf and added the FLVPlayback component no problem. I've exported the movie, again, no problem. When I play the movie on my local drive, it plays just fine. Here is where the problem comes in: I've uploaded the movie to a live server to embed in an html page so that my client may preview the controls before giving final go ahead for the project. However, once the movie is upload to a a live server, the FLVPlayback component no longer appears in the movie and the flv no longer plays.

View 3 Replies

ActionScript 1/2 :: Hide Buffer And Controls Of The FLVPlayback Component?

Apr 8, 2009

I tried to look this up, but can't seem to find what I am looking for. How do I hide the FLV Buffer in the beginning and the playback controls that come with it?

View 1 Replies

Professional :: Embedded FlvPlayBack Component Missing Controls

May 22, 2010

I have a flvPlayback component in this url  as you can see the controls are at the bottom so you can pause/play, adjust volune, etc. I've embedded the first url in a post at this site  everything works fine there except the control bar is missing

View 7 Replies

Actionscript 3 :: Make A Mx.controls.Alert Centered On A <s:Window/> Component?

Aug 4, 2010

I have an mxml component "PresentationWindow" that is for brevity's sake, simply:

<fx:Script>
//... functions here will be explained below
</fx:Script>
<s:Window>

[Code].....

View 1 Replies

Actionscript 3 :: Custom Flex Component, Visual Controls In Design View?

Apr 1, 2010

Do you know how if you drag an <mx:Label> or <s:Label> component into your Flex project, when you go to design mode you get this panel on the right to set its properties like text etc.

I have a custom component that I can call with actionscript, or with mxml like this:

<comps:TheComp field1="OK" field2="Yes" />

The component takes this input and uses it for its internal operation

[Code]...

When I go to design mode, I can see the component under custom components, I can drag it to the stage and see it, but can't set its values field1 and field visually on the right like a normal <s:Label> or <mx:Label> would have. how I can add that? Do I need to make it inherit something or anything else

View 3 Replies

ActionScript 2.0 :: 2 Player Game Moving Cars Controls Help With Controls

Nov 13, 2005

i have the controls for car number 1 that would be the arrow keys if [code]but how can i make controls for car 2.i wann use wasd but i cant figure out how the key.a doesnt work.

View 1 Replies

Actionscript 3.0 :: FLVplayback Component : Add The Time Elapsed And Time Left On The Controls?

Feb 9, 2010

Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls (just like how the player on the tutorials on this site works). I dont really want to create my own controls, as im happy with the flv playback component.

View 2 Replies

ActionScript 2.0 :: Making A Smart Component

Nov 9, 2005

in Macromedia flash MX i noted that the scollbar component when is droped over a textbox, it take the name of that textbox like a target text box... how is this done? I mean, how the component knows where i'm droping him?? and how it knows that is a textbox object and no another thing.

View 7 Replies

IDE :: Making The CS3 Checkbox Component Larger?

Jul 23, 2007

Relative newcomer to Flash, and I have (what should be) a simple question: how does one go about making the CS3 checkbox component larger? I'm not talking about the bounding box (checkbox + label); I'm talking about the checkbox itself. I've looked all over the place, and I'm stunned that this doesn't appear to be as easy as I thought.

View 1 Replies

ActionScript 3.0 :: Making The Flv Component Accessible?

Jun 19, 2009

I am using the flv player component and am having trouble adding the players buttons to the tab order.I opened the FLA for the skin I am attaching to the component, and individually selected the play, close caption and full screen button and assigned them each a tab order number within the Accessibility window. I also selected the "make object accessible" checkbox for each button within the Accessibility window. Doing that didnt seem to work, so I looked further and found that there is an accessibility class and I have now tried to utilize that class with the following code:
 
import fl.accessibility.ButtonAccImpl;ButtonAccImpl.enableAccessibility();
 
but still dont seem to be doing something right?does anyone have experience accessibility and the flv player component?

View 2 Replies

ActionScript 3.0 :: Making A Console Window Component?

Apr 24, 2011

I'm trying to make a console for text based i/o. The output window needs to be able to print char by char in multiple colors, wrap horizontally and scroll vertically.Most of that isn't a problem with the default TextField class, but I'm having a lot of trouble getting the colors right.If I use the htmlText property and wrap each character with "<font color=000000></font>" it starts a new line each time I add text.TextFormats don't seem to work at all for some reason. I do something like this:

ActionScript Code:
var tf : TextFormat = new TextFormat();
tf.color = FFFFF0;
textField.setTextFormat(tf);

...and then add the new text but nothing changes. Even if it worked, could I even use multiple TextFormats in a single textfield?I've been reading about this new "Flash Text Engine", and I'm wondering if there's some way that can help me, but I'm having trouble finding enough examples to understand how it works.

View 4 Replies

ActionScript 1/2 :: Making A Playlist Out Of The Component List - Add In Thumbnails

Mar 9, 2010

I'm currently making a playlist out of the component List and I want to add in thumbnails in there. The playlist shows the choice of videos that can be played.

View 6 Replies

ActionScript 2.0 :: Making Transparent The Textarea Component's Background?

Feb 1, 2007

Is there any way for Making transparent the textarea component's background ?

View 14 Replies

Flex :: Making MXML Component Report Target Of Click?

Jan 24, 2011

I have a component based on canvas, and within that component I have two images. I have the component listen for a click and when that event occurs one image goes transparent and the other becomes visible. This part works perfect. Now, on clicking that component, I also want to do something to the parent canvas, I already have this working for more basic types (image, canvas, text, etc) but the problem with my component is that the click event has the internal image as the target, so what I want to happen to the outside canvas is happening to the canvas of the component. How do I make my component as a whole the target of any clicks on it?
3.5 SDK

View 2 Replies

ActionScript 2.0 :: Making The Simple Player Using The Player Component Preinstalled In Flash?

Jun 3, 2010

I am trying to make the SIMPLEST POSSIBLE MP# player using the player component preinstalled in flash.It is very simple, the code is as follows:

Code:
on (release) {
player.contentPath ="Song.mp3"
player.play()
}
("player" is the mp3 component)

This works if I want a single track to be selected and played.Now, I need it to AUTOMATICALLY LOAD THE NEXT TRACK, which I will input in the code.I am thinking something like this:

Code:
player.onSoundComplete = function() {
player.contentPath ="Song.mp3"
player.play()
};

But this is not working.

PS: I know an XML file would be the best here, but I don't want to use it. I just want to enter the next track's code inside the swf.

View 2 Replies

Flash :: Adobe - Making An Interactive Charting UI Component "from Scratch" (without Flex)

Feb 14, 2011

I'm looking for resources on making an interactive charting component in Adobe Flash without use of Flex (or, minimal use). That is, starting "from scratch" with Flash and ActionScript 3.0. Is there recommended reading? Perhaps a good recent book on the subject, or a detailed blog article, or an open source project to look at? I'm interested in the development process, and specific design patterns (for example, extending Sprite as the logical base class for your component).

View 1 Replies

Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

ActionScript 3.0 :: Making Spacebar Act As Mouse For Making A Sidescroller?

Feb 8, 2011

For a project, I'm making an interactive side scroller.You move the character with the arrow keys and press the space bar to interact with things.So far, I followed DexNote's tutorial on YouTube.I thought that I would make the interactable objects as buttons, while the mouse focus would be on the character and when you press the space bar it make a mouse click in that area.The trouble I'm having now is that I don't know how to make the space bar trigger the "interactions."

View 1 Replies

Put Scroll Of Tree Component In Left Side Of Component Or Creating A Custom Scrollbar For Tree Component

May 20, 2009

is there any way to put scroll of tree component in left side of component or creating a custom scrollbar for tree component

View 13 Replies

ActionScript 2.0 :: Making A List And Making It Fast

Jul 12, 2003

I want to generate large text files, basically 4 columns, several thousand rows, of numbers. Making an array with all this info in it occurs farily quickly, it's getting it to a displayable format that takes a really long time. Right now I use something like this:

[Code]...

View 10 Replies

Flex :: Make A Custom Component Or Extend The List Component For A 2D Top Down View MAP ?

Nov 11, 2010

I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?

or

I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.

UPDATE: *There will be not any object over another.

*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.

Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?

View 1 Replies

Actionscript 3 :: Control The FLVPlayback Component's Volume Using The Slider Component In Flash?

Mar 20, 2012

I was wondering if there was a way to get the sound from a FLVPlayback component and manipulate it with using a custom volume slider? Within my Actionscript I currently have this code which enables me to control the volume of a MP3:

import fl.events.SliderEvent;
var mysong = new music();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
myChannel = mysong.play(0,10);

[Code]...

But Instead of using the MP3 for sound, is there a way to use an FLV's sound instead?

View 1 Replies

Add Controls To Swf Video?

Jun 4, 2009

I have lots of .swf video files from the past years, and recently have been using the flash video encoder in cs3 to create .flv that adds video controls.  I was wondering if there was a way to add video controls like slider, stop, pause, volume, etc.. to .swf video files.  I have searched for a .swf converter to .flv format but even though all the marketing says it can do it, none of the ones I have tried can do it.

View 1 Replies

Can't See FLV Playback Controls

Nov 10, 2009

Embedded a few FLV movies in my flash SWF and they appear ok and play back properly when I test the movie from within flash (CNTRL + ENTER) or just run the generated SWF file i can see the playback controls fine.

But when i put that flash movie into a HTML file and preview it, the playback controls are nowhere to be seen. I have a strong feeling it has something to do with the location of the playback skin in relation to the movie or html file (but i have copied the skins like 10 times and pasted them into every level of my website and I still cannot see the playback controls!

View 3 Replies

Controls Won't Show Up

Feb 17, 2010

My volume etc controls aren't showing up when I play my flash videos -

View 4 Replies

FLV Controls Not Appearing

Jan 24, 2011

I've got a swf file that is supposed to play back a flv within a player. When I test it locally, it works fine, but when I upoaded all of the files (swf, flv, and SteelExternalPlaySeekMute) to the server, when I call the main swf on the page, it doesn't show the controls.  If I just call up the swf in a new browser, though, it works fine.

I think the problem may lie in the fact that the html file that loads the swf is not in the same filepath in the server as the swf file.  Could it be that the swf is looking for the controls swf in the html's directory, rather than the directory its in?  (Though, that doesn't make sense, because it appears to load the flv without an issue, and they are in the same directory)

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved