Adding To A PRELOADER COMPONENT
I have downloaded the preloader comment suggested in the preloader component tutorial (FlashMX/advanced)
It works fine. But what I would like to do is have some sort of movieclip occuring as well while the percentage bar runs.
I have tried to just add a movie clip, but then the main movie does not start.
I would really appreciate some help!!
Thanks!
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 11-20-2002, 05:30 AM
View Complete Forum Thread with Replies
Sponsored Links:
Quiz Component. Adding A Preloader
Does anyone have experience with the quiz component? This component is in an external swf and needs a preloader. The problem is, if you add two frames to the beginning of the movie for the preloader code, it quits working. Any help would be great.
View Replies !
View Related
Adding Component Via Actionscript
I am creating a custom component. I am trying to use a slider control in my component. I've added textfields, labels successfully already. But for some reason, I can't add the slider control. I am adding the slider control exact same way I've added the textfields and labels. Here is the gist of how I am adding the controls:
-I declared the slider component:
public var mySlider : Slider;
-instantiated the slider in the overriden configuUI
override protected function configUI():void {
mySlider = new Slider();
addChild(mySlider);
...
}
-setup the slider properties
override protected function draw():void {
mySlider.x = 1;
mySlider.y= 1;
....
}
I get this error:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:isplayObjectContainer/addChildAt()
at fl.controls::BaseButton/drawBackground()
at fl.controls::BaseButton/draw()
at fl.core::UIComponent/drawNow()
at fl.controls::Slider/draw()
at fl.core::UIComponent/callLaterDispatcher()
what's the problem here? I am adding the slider exact same way I am adding all the other controls.
View Replies !
View Related
Adding Gravity To 'Scrollpane' Component
Current situation:
Flash 5
I created a fla that had a nice scroll (horz) of images that when released slows down (ie. gravity)
I then load this movie into another and the scroller stops working :-(
So I try MX and use the compoent "Scrollpane", this works great, and it still scrolls when I load it into the main movie.
The issue is the slowing down on release (gravity) is not there. Sure I havn't put it there, but I'm not sure how to adjust the compoent to add this feature.
So I'm looking for help in adding this cool ability, as it really makes the user experience smoother.
:-)
View Replies !
View Related
AS2 MX 2004 Adding A Listener To A Component
Hi - I am trying to add a listener to the scroll bar component so that when the scroll or the buttons are clicked, resulting in the target moving - a function is called.
I have tried adding the listener in the following way, without success:
Code:
var extraScrollfn:Object = new Object();
extraScrollfn.onPress = function () {
trace ("scroll component clicked.");
}
theScrollComponentClip.addListener(extraScrollfn);
I'm really stuck and keep trying, but not quite getting it...
Can anyone advise?
Thanks.
M@)
View Replies !
View Related
Adding Images To ScrollBar Component
I have a predesigned Flash website that I am trying to revamp for my project. I am using Flash MX.
There is a customized scrollbar. It calls upon a movie clip called Text Area. In this movieclip, the text for each section of the site is typed in the action frame.
How do I get pictures and buttons to show up in the scrollpane and scroll along like the text does. I have tried putting it in different spots but either it does not scroll or does not show up at all.
The fla can be found at:
http://www.ecaledonhills.com/CHE/
All help greatly appreciated.
Taz
View Replies !
View Related
Adding Link List Component
I just read the tutorial on this site called "Making Life Easier With XML" by Hasan Otuome. I was just wondering what code I would need to add to make each state linked to a URL. So that if you select a specific state, then a new window opens up to that URL. I know it involves href, but I'm completely new to this. Any help would be appreciated. The code from the tutorial is below.
//create all the variables you'll need
var i:Number;
var nodes:Array = new Array();
var states:Array = new Array();
var stateDP:Array = new Array();
//setup your XML connection
var sXML:XML = new XML();
sXML.ignoreWhite = true;
sXML.onLoad = addStates;
sXML.load("states.xml");
//let the fun begin
function addStates(){
//use the "nodes" array to refer to the xml kiddies
nodes = this.firstChild.childNodes;
for (i=0; i<nodes.length; i++){
//loop through "nodes" and add each "lbl" attribute to the "states" array
states.push(nodes[i].attributes.lbl);
//now fill the comboBox's data provider with the contents of the "states" array
stateDP.addItem({label:states[i], data:states[i]});
}
}
//bind the comboBox to its data provider
cmbState.dataProvider = stateDP;
XML
<?xml version="1.0" encoding="iso-8859-1"?>
<items>
<item id="1" lbl="AL" />
<item id="2" lbl="AR" />
<item id="3" lbl="AK" />
<item id="4" lbl="AZ" />
<item id="5" lbl="CA" />
</items>
View Replies !
View Related
Adding Component Parameters To MovieClips
Hi. I have a lot of Flash 9 apps with multiple instances of what is pretty much the same MovieClip. The only real difference between them is a unique id property in their associated classes. I can't add them to the stage dynamically as there are designers which want to move them around visually. I was really jealous of the "Parameters" tab which allowed me to add properties to components so I started looking at creating components but I found them to be quite complicated, time consuming and difficult to reskin.
I was having a play around and I discovered that by clicking "Component Definition" on a MovieClip, I was able to add parameters to it. It changed the type of my MovieClip to a "Component" and I was able to set the parameters in the Parameters tab and use the values in my associated class after defining it.
This all seems great but is this a bad practice? I seem to be halfway between a MovieClip and a proper component... I had a google for this but I couldn't find a definitive answer.
What do you guys think? Any feedback/opinions much appreciated!
Thanks,
Lloyd.
View Replies !
View Related
Adding Image As First Frame To FLV Component
OK - think I've done the hard (well, not that hard in the end) bit of getting some video into the FLV component and uploaded to my site :
link here
The first frame of the video is a white frame - is it possible to place a still image over the first frame to appear before someone hits play?
Cheers.
View Replies !
View Related
Adding Images To The List Component
Adding Images to the List component while using the FLV PLayback
All, ( i can send you my source files if it would help)
I'm using the FLV Playback component and loading videos into it from an external xml file. I also have a list component tied to the FLV playback that when you click on one of the elements in the list, it plays that movie.
QUESTION:
My question is how do I add an image to the list component? Below is the xml file and the actionscript. I've added the image attribute to the XML file as img="time_square.jpg" and added the element of the array when calling/creating the list. Did I do this right?
Any direction would be very much appreciated.
Attach Code
BEGIN XML FILE
<?xml version="1.0" encoding="iso-8859-1"?>
<playlist>
<video desc="Flash Forward sign" flv="ffSign.flv" img="time_square.jpg"/>
<video desc="Fountain in Vegas" flv="fountain.flv" img=""/>
<video desc="Giovanna in truck" flv="giovanna.flv" img=""/>
<video desc="Gondola at Heavenly" flv="gondola.flv" img=""/>
<video desc="River in Yosemite" flv="river.flv" img=""/>
<video desc="Times Square NYC" flv="timesquare.flv" img=""/>
<video desc="Vernal Falls" flv="vernalFalls.flv" img=""/>
<video desc="Balloons at Flash Forward" flv="balloons.flv" img=""/>
<video desc="Driving to Lake Tahoe" flv="driving.flv" img=""/>
</playlist>
END XML FILE
BEGIN ACTIONSCRIPT
var xml:XML = new XML();
xml.ignoreWhite = true;
list.rowHeight = 70;
//list.cellRenderer = "VideoThumb";
list.selectable = true;
// this onload function creates a node variable and loops
// through each video on the list incremented by 1
xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
// lists the attributes included in the videos.xml file
list.addItem(nodes[i].attributes.desc,nodes[i].attributes.flv,nodes[i].attributes.img);
}
//still in the onload function, this plays the indexed video number
vid.play(list.getItemAt(0).data);
list.selectedIndex = 0;
}
//loads the xml file that contains the videos to be played
xml.load("videos.xml");
// creates an object for the video list
//plays video from the list that is selected
var lList:Object = new Object();
lList.change = function() {
vid.play(list.getItemAt(list.selectedIndex).data);
count = list.selectedIndex;
}
// event listener that changes the video when user clicks on the list
list.addEventListener("change",lList);
// created object for the list itself
var vidList:Object = new Object();
//creates variable named count and sets initial value to 0
var count:Number = 0;
// when the video list is complete runs function
// to return the list to the first video
vidList.complete = function() {
// if sequential is selected
if(seq.selected) {
if(count == list.length-1) {
count = 0;
}
// else if seq is not selected than use random
else {
count++;
}
}
else {
var temp = count;
while(temp == count) {
count = Math.floor(Math.random()*list.length);
}
}
vid.play(list.getItemAt(count).data);
list.selectedIndex = count;
}
vid.addEventListener("complete",vidList);
END ACTIONSCRIPT
View Replies !
View Related
Adding A ToolTip To FLV Seekbar Component
Does anyone know how to add a toolTip to the FLV seekbar component? I have been banging my head against the wall far too long for something as simple as this...
It's a quick an easy fix for the play/pause, stop buttons. I added in a movie clip that appears on the rollover state of the button. The seekBar is handled differently and there is not a rollover state in that component. I tried adding in an invisible movieClip over the handle that contains a my toolTip button. I feel like the code is blocked out and I can't get an AddEventListener to work within the component. I ran trace statements for willTrigger and hasEventListener and both came up positive for being able to handle a mouseEvent. I am not sure why this will not work.
Any thoughts would GREATLY be appreciated.
Thanks.
descin
View Replies !
View Related
FLV Component / Adding Vertical Volume
I'm adding a vertical volume to the player with the function videoSound. You can't rotate the volumeBar component and have the handle move along Y, so a new one has to be made. The question is, assigning that function to the flv player component. The fuction works, it's a matter of the flv player component recognizing the function.
Stage.scaleMode = "noscale";
myPlayer.contentPath = "testvid.flv";
myPlayer.playButton = play_pb;
myPlayer.pauseButton = pause_pb;
myPlayer.muteButton = mute_b;
myPlayer.seekBar = scrubtrack;
myPlayer.volumeBar = videoSound;
//VERTICAL volume
this.onEnterFrame = function() {
videoSound.setVolume(Math.round((volumecontrol.scrubtrack.volumebackgroundmask._x-volumecontrol.scrubtrack.volumebar._x)/volumecontrol.scrubtrack.volumebar._width*100));
};
startVolume = 0;
volumecontrol.scrubtrack.volumebackgroundmask._x = volumecontrol.scrubtrack.volumebar._x+startVolume;
videoSound.setVolume(startVolume);
volumecontrol.scrubtrack.volumebackgroundmask.onPress = function() {
this.startDrag(true,volumecontrol.scrubtrack.volumebar._x,this._y,volumecontrol.scrubtrack.volumebar._x+volumecontrol.scrubtrack.volumebar._width,this._y);
this.onMouseUp = stopDrag;
};
volumecontrol.scrubtrack.volumebar.onPress = function() {
volumecontrol.scrubtrack.volumebackgroundmask._x = volumecontrol.scrubtrack.volumebar._xmouse;
this.onMouseUp = stopDrag;
volumecontrol.scrubtrack.volumebackgroundmask.startDrag(true,volumecontrol.scrubtrack.volumebar._x,this._y,volumecontrol.scrubtrack.volumebar._x+volumecontrol.scrubtrack.volumebar._width,this._y);
};
View Replies !
View Related
Adding Transition To FLVPlayback Component
hi guys,
is there any way to add transitions to FLVPlayback component using Transition manager class. all i wan to do is to add start effect to clips that enter the stage.this can be easily done for movieClip but is there any way to do this for FLVPlatback component.
thanks in advance...
View Replies !
View Related
Adding Rollovers To TextArea Component
Hello there.
Any help or guidance to the following problem would be greatly appreciated.
In an application I am building I have a TextArea component which will render dynamic HTML. I would like to capture rollovers on certain words to bring up a clip with text. Can this be done with an invisible button / mc created dynamically inside the TextArea component (embedded with the <img> tag) ?
Kind Regards,
Ron
View Replies !
View Related
Adding Dates To The Calendar Component
Hi,
I am using the Calendar Component in Flash and I wanted to be able to add events to the calendar using XML. Does anyone know how to do this?
I would like to have the date with something in it to have a red background, which I think I have done using the setStyle feature, and once the date it listed I want a Hover Caption to pop up and follow your mouse while you over the date with information in it.
I just need to know where to get started.
View Replies !
View Related
Adding XML Data To List Component
Code:
import fl.controls.*;
import fl.data.DataProvider;
var testXml:XML =
<list>
<a>
<para_name>shabeer</para_name>
<para_text>paragraph text 1</para_text>
</a>
<a>
<para_name>muhammed</para_name>
<para_text>paragraph text 2</para_text>
</a>
<a>
<para_name>ahmed</para_name>
<para_text>paragraph text 4</para_text>
</a>
</list>;
var ParagraphList = new List();
ParagraphList.setSize(140, 150);
ParagraphList.move(33, 55);
addChild(ParagraphList);
ParagraphList.rowHeight = 22;
ParagraphList.dataProvider = new DataProvider(??????);
//here i want to add "paragraph texts" from the xml with out changing the xml
View Replies !
View Related
Adding Rollovers To TextArea Component
Hello there.
Any help or guidance to the following problem would be greatly appreciated.
In an application I am building I have a TextArea component which will render dynamic HTML. I would like to capture rollovers on certain words to bring up a clip with text. Can this be done with an invisible button / mc created dynamically inside the TextArea component (embedded with the <img> tag) ?
Kind Regards,
Ron
View Replies !
View Related
DataGrid Component - Adding A Button
Does anyone know how to add a symbol in a DataGrid cell that will reference an operation for the row that cell is on? I am tring to create a "remove" button so that when it is clicked, that row is removed from a database and the DataGrid.
Thanks!
-Sefi
View Replies !
View Related
Adding Sub Menus To MenuBar Component
The code attached will create a menu with a sub menu. How can I modify it to continue to create sub menus? Say I want another sub menu off of sub menu 1. I tried a few things without any luck, and I'm trying to figure out how to do this without using XML.
var optionsMenu = myMenuBar.addMenu ( "Home" );
var deptMenu = optionsMenu.addMenuItem({label: "menu 1", instanceName: "menu 1"});
deptMenu.addMenuItem({label: "submenu 1", instanceName: "sub1"});
deptMenu.addMenuItem({label: "submenu 2", instanceName: "sub2"});
deptMenu.addMenuItem({label: "submenu 3", instanceName: "sub3"});
View Replies !
View Related
AS2 MX 2004 Adding A Listener To A Component
Hi - I am trying to add a listener to the scroll bar component so that when the scroll or the buttons are clicked, resulting in the target moving - a function is called.
I have tried adding the listener in the following way, without success:
Code:
var extraScrollfn:Object = new Object();
extraScrollfn.onPress = function () {
trace ("scroll component clicked.");
}
theScrollComponentClip.addListener(extraScrollfn);
Can anyone advise?
Thanks.
M@)
View Replies !
View Related
Adding Nodes To Tree Component
Hi,
I'm still having trouble with this Tree thing...
I've managed to add my first category node and add several sub-category nodes beneath it.
But how do I add a second top-level category?
The code from the manual shows this:
Code:
var myTreeDP:XML = new XML();
myTreeDP.addTreeNode("Local Folders", 0);
// Use XML.firstChild to nest child nodes below Local Folders
var myTreeNode:XMLNode = myTreeDP.firstChild;
myTreeNode.addTreeNode("Inbox", 1);
myTreeNode.addTreeNode("Outbox", 2);
myTreeNode.addTreeNode("Sent Items", 3);
myTreeNode.addTreeNode("Deleted Items", 4);
// Assign the myTreeDP data source to the myTree component
myTree.dataProvider = myTreeDP;
// Set each of the four child nodes to be branches
for (var i = 0; i<myTreeNode.childNodes.length; i++)
{
var node:XMLNode = myTreeNode.getTreeNodeAt(i);
myTree.setIsBranch(node, true);
}
In this case, 'Local Folders' is a top-level node, and the others are branch nodes.
How would I add another node like Local Folders with different branch nodes beneath it?
This has been perplexing me for the last couple days...
Anyone know how to do use this crazy component?
Thanks,
View Replies !
View Related
ScrollBar Component - Adding Keyboard Functionality
Is there a way to add keyboard commands to the ScrollBar Component? For example, I would like my text to scroll down, when I press the 'Down Arrow' key. I would like to give people the option to use both the mouse...and keyboard to scroll through text...is this possible? Any ideas or help would be appreciated...thanks!
View Replies !
View Related
Adding Links In An XML File For A Component List
I have a component list that is reading from an xml file. The component list reads and displays the names of chapters of a book. I'd like the user to be able to click on a chapter name, and be able to jump to a new html page. But i don't know how to code in the links into the xml file. Will I need to expand the code in flash and treat the links as nodes? If someone can show me the way, I'd be most grateful! I've attached the files here.
View Replies !
View Related
Adding Custom Component To Viewstack At Runtime.
I'm creating a viewstack having 2 canvases in its two tabs (using LinkBar for navigation). On the first tab, I add a custom component to the canvas component at the latter's creation complete event using addchild() method. The second tab has a single button only in its UI.
Now my problem is that whenever I click on the second tab of the viewstack I get the runtime error "2025 The supplied DisplayObject must be a child of the caller."
Can someone help me?
View Replies !
View Related
Adding Playback Control Component To Ns Object
I've got the following code setting up my NetConnection and NetStream. Is there any way to dynamically attach a playback control compontnet to this? (Play, Stop, Progress, Volume) without having to custom do it all?
my_nc = new NetConnection();
my_nc.connect(null);
my_ns = new NetStream(my_nc);
my_ns.onStatus = function(infoObject:Object):Void {
if (infoObject.code eq "NetStream.Play.Start") {
}
else if (infoObject.code eq "NetStream.Play.Stop") {
}
else if (infoObject.code eq "NetStream.Buffer.Flush") {
trace("This is the bufferFlush");
}
}
View Replies !
View Related
Adding A MC Animation To The Flash Progress Bar Component
I've completed a Preloader and Progress Bar SWF using the default Flash 8 components. Everything works fine (it loads a large SWF project I completed), but I'd like to add a little animated logo above the progress bar.
Without diving into custom made preloaders, I'd like to stick with what I have made already. I see a line of code that makes the progress bar disappear once the main SWF is loaded:
// Hide the progress bar now as we don’t need it any more
myProgressBar._visible = false;
I've added my logo MC to a new layer in my preloader.fla, and named it myLogo.
What will I need to do (if it's possible, that is) to make the logo MC disappear along with the Progress Bar?
I've tried adding:
myLogo._visible = false;
After naming the logo MC instance myLogo, of course.
But this still doesn't work - the logo MC doesn't disappear.
Can any one suggest how to do this? I've attached my ActionScript code in TXT format.
Thanks!
View Replies !
View Related
Adding DoubleClick Listener To Label Component
can any body help me adding doubleClick listener to a labelcomponent. heres the code i tried. the same code works for button component. thanks in advance.
Attach Code
myLabel:Label = new Label();
myLabel.doubleClickEnabled = true;
//myLabel.buttonMode = true; /*tried this too*/
myLabel.addEventlistener(MouseEvent.DOUBLE_CLICK,testFunc);
function testFunc(e:MouseEvent)
{
trace("double click works"):
}
View Replies !
View Related
Adding Custom Component To Viewstack At Runtime.
I'm creating a viewstack having 2 canvases in its two tabs (using LinkBar for navigation). On the first tab, I add a custom component to the canvas component at the latter's creation complete event using addchild() method. The second tab has a single button only in its UI.
Now my problem is that whenever I click on the second tab of the viewstack I get the runtime error "2025 The supplied DisplayObject must be a child of the caller."
Can someone help me?
View Replies !
View Related
Open Window (Adding Code To A Component)
Hi,
I hope someone here can help me.
I have downloaded and am using the image gallery from www.flashcomponents.net. The author mentiones at the bottom of the user manual that a pop-up browser window can be added to the larger images.
The folowing is the xml code.
Code - 1 of these per image copy/pasted in the file:
Code:
<images directory="images">
<imageNode jpegURL="img_0.jpg" thumbURL="tn_img_0.jpg" title="Image 0">Comments on Image 0</imageNode>
The code he states to add is, but only as an example in the ActionScript:
Code:
function clickMe(id) {
//get imagenode for this thumbnail
//'id' counts from 1, xml counts from 0: hence the '-1'
var imageNode = myGallery.getXMLNode().firstChild.childNodes[id - 1];
trace(imageNode);
}
myGallery.setClickHandler('ClickMe', _root);
He says that the above code will open the xml node assigned to the larger image. It does not work for me. I just get the pointed finger. What do I need to add to get those pop-ups to work.
Help.
(Yes this is cross posted from the xml forum)
Thanks.
View Replies !
View Related
Adding Buttons To Stock FLVplayback Component. . .
Ok guys, more issues with the same project. I'm really starting to see what a beginner I am at this. I have a request from the higher-ups to add a rewind button to the FLVplayback component I'm using. It's for a tutorial site with quizzes, so they don't want the option to fast forward or scrub forward, but they want the user to be able to rewind. So I'm trying to skin the FLVplayback instance called SteelExternalPlayMute to include the rewind button as well. Please bear in mind that I have little to no actionscript experience, so talk to me like you would a monkey. A DUMB monkey. Here's a direct link to one of the videos if that's needed: http://www.bullydoguniversity.com/Nissan%20Power%20Pup.swf Thanks again, you're all awesome.
View Replies !
View Related
Adding Custom Symbols To ComboBox Component Items
Got me a nice, custom skinned ComboBox. If you select an item it it switches which movieclips are displayed on stage. Works great.
If I want to add a key to my ComboBox, so each item contains a little picture + text, is there any easy way to do it?
(I've thought about custom fonts, or placing a mc in the correct place triggered by an open event, but it be really cool for all my dynamic classes if I could make some actionscript goodness like:
comboBoxs.addItem( mcLittleSymbol + { label: "Some Text" } );
)
View Replies !
View Related
Adding Images/icons To Items In Combobox Component
hi
is it possible to add icons to each entry in a combobox component drop down list? i'm not even sure if this is possible in html, but i've had a client ask me to do it in flash...it'd be great to know if it's even within the realm of possibility.
if so, any pointers on how to accomplish it? preferably via an external text/xml file
thx!
View Replies !
View Related
Adding Images/icons To Items In Combobox Component
hi
is it possible to add icons to each entry in a combobox component drop down list? i'm not even sure if this is possible in html, but i've had a client ask me to do it in flash...it'd be great to know if it's even within the realm of possibility.
if so, any pointers on how to accomplish it? preferably via an external text/xml file
thx!
View Replies !
View Related
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.
View Replies !
View Related
|