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








Dyanmic Object?


in this example

var anObject= {name:"Jim!!", age:30};


is there anyway to make the name or age labels dynamic?

basicly im trying to dynamicly create columns in the datagrid component and populate it with the right data. the columns are created from information provided from a database.




FlashKit > Flash Help > Flash MX
Posted on: 01-13-2004, 07:01 AM


View Complete Forum Thread with Replies

Sponsored Links:

Dyanmic Text
Hi.. Need a little help.

Created a movie and want to do the following thing.

1 Created a MC with subject headings.
2 Created another MC with Dynamic Text and the variable is SUBJECT.

I have dragged the MC(2)to the main MC(not the stage) and given it an instance name.....

now what i want to is everytime and click on a menu button on the Stage and the Subject picks up the relevant title....

Can someone help.

Thanks

View Replies !    View Related
If...then With Dyanmic Variables
Hi all,

I am having trouble with if...then statements?

I have an slider that changes a gauge that contains the var temp.

I want to make changes to the fla depending upon the value of temp.

Can you evaluate if..then of a variable writen during (enterframe)?

Also, could you please provide some code hints (what methods) to use for the following.

I want to be able to move the flames up/down depending upon the temperature and start/stop the bubbles and water.moving.

Finally, when a user raises the temp, I will have a thermometer in the flash that should rise with the temp gauge only slower.

Thanks

dave

View Replies !    View Related
Dyanmic Loading
So I have a problem with content not loading and I'm trying to figure out why... I have a parent movie that checks a variable on the root level and depending on the return loads an external .swf file. But the .swf file is not loading, not always. Sometimes it does, sometimes it doesn't. the thing is that there is a long list of variables it checks before choosing which content to load. is there any chance that it is not getting the time to get through the list before the play head moves on to the next frame? I'm not sure how this works.

View Replies !    View Related
Dyanmic Text?
I am having trouble... when I load text from a text file it is working fine but then I rotate the text box and the text will not display. I dont know why it is doing this... can anyone help me?

View Replies !    View Related
[CS3] Dyanmic Loader
Hi,

I'm trying to do a banner slideshow like the one shown here:

http://oxidev.com/

I know how to do the slideshow, but how do you code it to load each image as it approaches it in the loop, instead of loading all of them when the page first opens?

Thanks,
Lance

View Replies !    View Related
Dyanmic URL Replacement
Hello, i'm trying to replace part of the URL in a getURL function through an outside txt file. anyone know a good way of doing so?

an example of what i'm trying to do...

getURL("http://www.somedomain.com/<replace variable>/");

View Replies !    View Related
Non Dyanmic Slideshow..
i know its possible as sure i have simliar experience of it...

im looking at a simple slideshow, transistions powerpoint style (but a little nicer!)...

i dont want to run it from an xml file or a database i just want it to look in a specified folder and basically just take all the images from there and display them in a slideshow so if i want to add a new one in i just drop it in the folder.... its for my boss and hes a numpty you see...

if any could point me in the direction of a good start or example if not is kool i can code it i guess...

View Replies !    View Related
Dyanmic Text
this is the best example i could find

http://www.limpbizkit.com/news/default.asp?id=1059

see when you click a title of news it loads the text into a text box next to it.

how do i create an effect like this is flash

View Replies !    View Related
Dyanmic Variable Names
Hi guys,

I've been playing with this for some time now with no luck. What I want to do is create many copies of a movie clip (manually) each which will have a different instance name (var1, var2, var3 etc). This will match up to a variable passed from PHP eg: var1=0&var2=1&var3=1

I would like to get the following code to work but where it says var1 have that replaced dynamically by the instance name. This way all I would have to do is create my copies of the movie clip and change the instance names instead of having to go into each one and edit the code.

onClipEvent (load) {
if (var1 eq "0") {
gotoAndStop(1);
}else{
gotoAndStop(2);
}
}

If someone can shed some light it would be greatly appreciated!

Thanks in advance
frost3r

View Replies !    View Related
Columns In Dyanmic Text
Hi. Again. I'm making the tour page for the site I'm doing. I need to put the dates in a nice neat column, the venues in a nice neat column...etc. I'm getting the text loaded from a txt file...dynamically...so it is easier to update. Anyone have a clue as to how to set that up in the txt file? Relientk.com has a great example of what I might want. Just click on touring. Thanks guys

View Replies !    View Related
Dyanmic Navigation Problem
Hi. I'm a new member and a newbie to actionscript. And I mean newbie.

But I am trying to achieve an effect where a vertical bar slides from right to left across a movie already loaded onto the stage, masking the movie as it goes. When it gets to the left of the stage I want to replace the movie with a new one before the bar slides back to the right side of the stage.

I can and have achieved this effect in a linear navigation method, where the user can only click the buttons in order and the navigation follows the timeline. But I want the user to be able to click on any button in any order and achieve the same effect. But I just don't know how.

I have posted this problem on the forum at Macromedia.com, but the only person who replied was a relative newbie themself, and so could only get me so far.
They suggested using levels and loading the different movies, such as the original move and the wipe movie onto different levels, such as level 0 and level 1. The problem is I don't know how to:
1) Load movies onto different levels (but I'm sure it will tell me in the Flash help file, so I can figure that out for myself)
2) Have a movie affect a different level (having the wipe effect on level 0 change the movie on level 0 when it reaches the left side of the screen)

I'm sorry if this is a really basic effect to be achieved, but I have only ever used very basic actionscript such as gotoandplay and stop. If this topic has already been brought up and answered I apologise, and if someone could point me to the right thread I would be very grateful. But I hope that you can help, as I feel that my previous work has always been limited by what I can achieve and create, and I would really like to develop my knowledge of what is an excellent program.

Many thanks

View Replies !    View Related
Dyanmic Color Fill
hey everyone, i am trying to create a character creator problem i come across is that I want the people to be able to say what colour skin they want etc etc now i already have the shape drawn in flash in the location _root.test.skin

how can i change the colour of the shape? so instead of it being pink it can be brown?

dont want to have to draw different shapes for each colour cause then the thing will be huge

many thanks for any help!

View Replies !    View Related
[F8] Center Dyanmic Images Xml
I have a xml image gallery with different sized images, and instead of the images coming in from the top left corner I wanted to make them centered in the movieclip they load into. To do this I am just going to add -x and -y based on half of the image height/width. I have everything working I think but for some reason I cant get the movie to find the demensions of the dynamically loaded jpgs. Does anyone have a tutorial for this?
I tried a setInterval function to keep checking as the image loads but that didnt work.

Thanks

View Replies !    View Related
Dyanmic Text With Mask
How come I cannot mask dynamic text?

Is there some trick I am missing.

View Replies !    View Related
Question Of Why Vs How, Dyanmic Variables
Why does
var _myVars:Object = new Object();
var _matchNum =Math.ceil(Math.random()*5);
_myVars["_headClicked"+_matchNum]=1;

work, while

var _headClicked1:int = 0
var _headClicked2:int = 0
var _headClicked3:int = 0
var _headClicked4:int = 0
var _headClicked5:int = 0
var _matchNum =Math.ceil(Math.random()*5);
["_headClicked"+_matchNum]=1;

doesn't work? I think that I am missing something very fundamental. Do the brackets [] referrence an array only? I have what I need as far as functionality goes, but I don't know why I had to do it the first way, and not the second.

View Replies !    View Related
Dyanmic Text Animation
ok i have a movie clip with a dynamic text field being animated...

i have a text file with this in it


&textline1=time
&textline2=place
&textline3=year
&textline4=month


now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time
and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file? please help... thanks

View Replies !    View Related
Random Dyanmic Masking
I am trying to create a ripple effect. I have a movie that uses dynamic masking, but I would like to have it appear randomly, with more than 1 instance.

Basically there is an image, and the effect I am trying to create is a ripple, that appears randomly, and more than 1 time.

Anyone have an idea how I could use the dynamic masking and have it display randomly?

View Replies !    View Related
Dyanmic Text Choosing
ok someone did tell me how to do this but it went way to deep

Ok heres the set up:

i have 2 buttons and a text box, when i press a button i want a external .txt file to load in my text box.

thanks for any help

View Replies !    View Related
Dyanmic Transition Gallery
Hello, I understand the way how to load an external ".jpg/.swf" but I do not know how these guy do this little transition. For example, I click on an image, it fades in, that I know how to do, you can animate the image in an external .swf file but the thing i dont get is how they get the fadeout? like instead of it abrubtly dissapearing it fadesout and makes way for the next pic or selection. here is what i am talking about:

http://www.templatehelp.com/aff/prev...ite%2F&i=15716

I really want to know how they did it, they also use this flawless transition on Acura's site for example i pick car#1, it fades in to fade car#1, when i pick the next car (car#2) it fadesout car#1 and fades in car#2 and so, etc. I would really like to know how to accomplish that.

View Replies !    View Related
[CS4][AS2] Problem With Dyanmic Loading...
Hiya! ^^ Okay, I have a problem concerning some dynamic loading. I have a very simple movie that I made for a web site- It consists of only one frame, and loads text from different text files depending on which one of the 5 buttons is pushed. When I preview it with F12 in Flash, it works just fine. When I export the .swf and preview it in the Adobe Flash Player 10, everything is peachy-keen. However, when I import it into Dreamweaver and preview with F12, the movie will load just fine, except that nothing happens when any of the buttons are pushed. I have made sure that all the .txt files are in the same folder as the .fla and the .swf files.

What do you think could have gone wrong? Should I try switching to AS3?

Thank you in advance your help, I really appreciate it! ^^

View Replies !    View Related
Dyanmic Text Animation
ok i have a movie clip with a dynamic text field being animated...

i have a text file with this in it


&textline1=time
&textline2=place
&textline3=year
&textline4=month


now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time
and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file? please help... thanks

View Replies !    View Related
Random Dyanmic Masking
I am trying to create a ripple effect. I have a movie that uses dynamic masking, but I would like to have it appear randomly, with more than 1 instance.

Basically there is an image, and the effect I am trying to create is a ripple, that appears randomly, and more than 1 time.

Anyone have an idea how I could use the dynamic masking and have it display randomly?

View Replies !    View Related
Dyanmic Video ScrollPane
Im Very New to Action Scripts and even more with XML. I have a scrollpane with a dyanmic movieclip created to hold descriptions and thumbnail pic of movie to play and a button to play the url to the video.

I have gotten the thumbnail pic and description to load but i can't seem to get the play button to dynamicly attach the url from the xml file. can someone help me with this.

here is the code im using.
Code:


var nc:NetConnection = new NetConnection();
nc.connect(null);
var nsVideo:NetStream = new NetStream(nc);
video.stream.attachVideo(nsVideo);


var mcMain:MovieClip;
function init() {

scrollPane.contentPath = "scrollMovieClip";
mcMain = scrollPane.content;

}
init();

var ilist:XML = new XML();
ilist.ignoreWhite = true;

var videourl:Array = new Array();
var videothumb:Array = new Array();
var videocaption:Array = new Array();


ilist.onLoad = function():Void{
var video:Array = this.firstChild.childNodes;
for (i=0;i<video.length;i++){
   var whoIsOn:Number = 1;
   videourl.push(video[i].attributes.url);
   videothumb.push(video[i].attributes.thumbs);
   videocaption.push(video[i].attributes.desc);
      
   
   mcMain.attachMovie("blackMovie", "black"+i, mcMain.getNextHighestDepth(), {_y:90*i+5, _x:5});   
   mcMain["black"+[i]].description.text = videocaption[i];
   loadMovie (videothumb[i],mcMain["black"+[i]].thumb);
   
   
      mcMain["black"+[i]].playbttn.onRelease = function(){
      trace(this._parent);
      
   };
   
   scrollPane.invalidate();
}



}
ilist.load("images.xml");



scrollPane.setStyle("borderStyle", "none");




thanks.

View Replies !    View Related
Quickie: Dyanmic Text Field
I just wondered how you can make the background of a dynamic text field completely transparent. At the moment, I have a solid background which is annoying as I want the movie clip behind it to show through. Dead grateful for any help. Cheers

View Replies !    View Related
Dyanmic Text In Loaded Swf Doesn't Appear
I have a swf file with a movie clip that plays to the end of its frames and then loads some text into a text box. This code is on the movie clip:

Code:
onClipEvent(load){
max = _totalframes;
}

onClipEvent(enterFrame){
if (_currentframe == max){
stop();
getText = new LoadVars();
getText.load("welcome.txt");
getText.onLoad = function(){
_root.welcome.text = getText.mytext;
}
}
}



That works as it should, however, when I load this swf into another swf. The text no longer displays.


What's the trick?

View Replies !    View Related
Container / Dyanmic Content Problems
I have built a website which has dynamic content coming from a db.

I have built the sections of the site on seperate .swf's and eveything works perfectly.

However, I wish to pull the .swf's into a container in my main movie.... this also works well.

But, one of the areas (news.swf) has news headlines and when i click on the headlines the stories are displayed. When I bring news.swf into the container the festure of displaying news stories does not work?

Anyone hazard a guess?

View Replies !    View Related
Dyanmic Text Inside MovieClip
ok, i'll try and explain.. ive got an external .txt file so that a user can edit some words for a news section, this worked fine as part of the main movie... however when i put it in a moive clip so that when different buttons are selected diferent staic text appears.

View Replies !    View Related
Dyanmic Text Field Alignment
Hi all!

I am facing this problem with the alignment of text in my dynamic text field. The text comes left aligned but I want to make it center aligned.

Is there any way of making the text center aligned to all text field in my fla(universally)?

please suggest.

thanks,

View Replies !    View Related
I WANT Flash To Cache Dyanmic Images.
Hey guys, I've got a flash that is pulling dynamic images from a database in SQLserver2005 and I want to know if there is a way flash can cache these images. It gets the image by a link to the aps data bae like http://www.foo.com/fooAPI/GetfooImage.aspx?foo_ID=1 and if you opened this up in a browser it'd be an image.

The flash will cache images that were loaded from a directory no problems.

View Replies !    View Related
Drag N Drop N Dyanmic Text
HI dere

im nt sure how to clear the endComment(dynamic text) once the user place the item back to the shelf.Cn u please hlp me chck my codes and see where did i go wrong. thank u veri much.

ps: my swf file juz drag the battery.




Code:
/********************************
Battery
********************************/
stop();
var dropBool = false;//1st var i created
var waterBool = false;//2nd var i created
battery5_mc._visible = false;
battery2_mc.useHandCursor = false;
battery2_mc.onPress = function() {
this.startDrag(false);
this.onMouseMove = function() {
updateAfterEvent();
};
};
// handle release event
battery2_mc.onRelease = battery2_mc.onReleaseOutside=function () {
stopDrag();
this.onMouseMove = undefined;
if (this.hitTest(_root.dropTarget_mc)) {
this.gotoAndStop(2);
this._x = 92;
this._y = 190;
_root.answer3 = "17.99";
_root.answer1 = "17.99";//mass
_root.waterBattery_mc.gotoAndStop(1);
_root.error_mc.gotoAndStop(1);
dropBool = true;
} else if (this.hitTest(_root.waterTarget_mc)) {
this.gotoAndStop(2);
this._visible = false;
this._x = 92;
this._y = 190;
_root.answer2 = "7";//vol
_root.answer3 = "0";
_root.water_mc._visible = false;
_root.waterBattery_mc.gotoAndPlay(2);
_root.error_mc.gotoAndStop(1);
waterBool = true;
} else {
this._x = 88.5;
this._y = 31;
_root.answer3 = "0";
_root.answer1 = "";
_root.answer2 = "";
_root.endComment = "";
_root.water_mc._visible = true;
_root.waterBattery_mc.gotoAndStop(1);
_root.error_mc.gotoAndStop(1);
}
if (dropBool && waterBool) {
_root.endComment = "2.57";
}else if(dropBool && waterBool != true){
_root.endComment = "";
}
trace(dropBool);
trace(waterBool);
};

View Replies !    View Related
Dyanmic Variables With Flash Remoting
Hey all, well, i now need to pass my dynamic radio button information from my Flash mx 2004 page, to a cold fusion cfc.

I am using flash remoting.

I may have 5, 6, 7, etc. radio buttons that the user may or may not click on. I need to pass the data to a cfc, so i can insert the data into a database and an email.

How can I pass data elements that are dynamic?

example(non dynamic):
getConRooms("conres", date, end_time, start_time, rb_1, rb_2, etc. );

thanks

dan

View Replies !    View Related
Setting Style To Dyanmic Text
I'm editing a Flash site and running into some minor problems with text formatting. The original dedicated space for copy is now too small due to text additions. The arrived-at solution is to make the block scrollable, which I've done. The problem is that lines within the text are called to be bold, while others are not. I can set it that way as static text, but when I change it to dynamic, all the text changes to the opening format (in this case, the first line is bold, and the entire text then becomes bold). Any way I can preserve the different formatting as synamic text so the block can scroll? If it helps, I'm using MX.

View Replies !    View Related
Dyanmic Anti-alised Text
Alrite, im having some major problems with this new text field in flash 8, with the whole anti-aliasing stuff. More trouble than is worth in my opinion, but alas, we cant have everything our way. Anyway to the point.

Ive got some text, and im using a pixel font, (think its called PixGothic7), and ive set the anit aliasing to Readability, cause well, i want to be able to read it.. . Then im loading text into it, so ive put the font into the library, and embebeded the required glyphs, and it looks all good. Then i tried to right justify some text, and its majorly blurry. Whats goin on? its fine on left, center and full. But on right its looks shocking??

Any advice you can offer about all these new text features in Flash 8? and explain whats goin on.

Thanks

-Aussie Devil

View Replies !    View Related
Dyanmic Text Missing In Flash 8
If I publish with Flash 7 then it is okie... But it is missing in Flash 8

View Replies !    View Related
Please Help Me Out With Dynamically Loaded Dyanmic Textbox
Hello,

I'm creating a timeline structured site where a movie clip on the stage called 'slider' is set to slide automatically according to how far left, or right the mouse position is from the center of the stage. This works. I even have it set it up so that using two variables, i can decide how much or even which portion of the movie clip (or the timeline) the user is allowed to slide around in.

I then have a movieclip called 'yearMarker' which is attached at runtime inside the 'slider' movie clip. This is done through a While loop and PHP script which retrieves from the database the field values for "year" (just a string denoting the particular year in question), and "yearXPosition" (which is how far along on the x axis the attached movie clip should be.

the string I retreive from php looks like this:

yearOf1=1976&yearPosition1=0&yearOf2=1977&yearPosi tion2=350&yearOf3=1978&yearPosition3=1350&yearOf4= 1979&yearPosition4=1700&yearOf5=1980&yearPosition5 =2050&...ect.
(I used the variable name 'yearOf' in place of year because flash already has a class property with that name.

I managed to attach the 'yearMarker' movie clip at the right x distance from the left border of the stage, and it works well.

My problem is whith a dynamic textbox within the 'yearMarker' movieclip. The intention is that when the movieclip is attached, the dynamic textbox within, 'yearMarkerText", is given the value of the Year in question, 'yearOf'.

Not only can I not get this part to work, It also seems that the textbox disapears altogether, though if I set the textbox to be selectable and then test the movie, the mouse cursor changes to select text where the textbox should be if it was visible.

The code, on the first frame on the root of the timeline, which attaches a movie clip based on the above values goes like this:

var yearMarkersVar = new LoadVars()
yearMarkersVar.load("http://localhost/script/yearmarker.php");
yearMarkersVar.onLoad = loadYearVariables;

function loadYearVariables(){
// For Loop that will create a "yearMarker" for each year in the list
for (i = 1; i < this.totalyears; i++) {

// Create simpler variable names to use later
yearOf = this["yearOf"+i];
yearPosition = this["yearPosition"+i];
yearMarker = "yearMarker"+i;

// attach movie clip
slider.attachMovie("yearmarker01", yearMarker, i, {_x:yearPosition, _y:273});


// THIS SHOULD PRINT THE TEXT!
slider.yearMarker.yearMarkerText.text = yearOf;
// TREID THIS TOO
level = ["_level"+i];
level.yearMarkerText.text = yearOf;

}

// set variable to be used by 'slider' as end limit
_global.mcWidthTotal = this.mcWidthTotal;
trace(_global.mcWidthTotal);
}

Flash bug? something Im completely missing? am i an ediot? does anyone know how to solve this? im desperate.



thanks
-ahmed

View Replies !    View Related
Container / Dyanmic Content Problems
I have built a website which has dynamic content coming from a db.

I have built the sections of the site on seperate .swf's and eveything works perfectly.

However, I wish to pull the .swf's into a container in my main movie.... this also works well.

But, one of the areas (news.swf) has news headlines and when i click on the headlines the stories are displayed. When I bring news.swf into the container the festure of displaying news stories does not work?

Anyone hazard a guess?

View Replies !    View Related
External Dyanmic Text & Custom Scrollbar
I have a custom scrollbar which works for Static Text, but not Dynamic Text. What am I doing wrong?

Thanks in advanced.

N

ActionScript Code:
stop();

fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = main._y;
bottom = main._y+mask_mc._height-main._height-space;
dragger.onPress = function() {
    drag = true;
    this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
    dragger.scrollEase();
};
dragger.onMouseUp = function() {
    this.stopDrag();
    drag = false;
};
bar.onPress = function() {
    drag = true;
    if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
        this._parent.dragger._y = this._parent._ymouse;
        this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
    } else {
        this._parent.dragger._y = this._parent._ymouse;
    }
    dragger.scrollEase();
};
bar.onMouseUp = function() {
    drag = false;
};
moveDragger = function (d) {
    if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
        clearInterval(myInterval);
    } else {
        dragger._y += d;
        dragger.scrollEase();
        updateAfterEvent();
    }
};
up_btn.onPress = function() {
    myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
    myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
    clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
    this.onEnterFrame = function() {
        if (Math.abs(dy) == 0 && drag == false) {
            delete this.onEnterFrame;
        }
        r = (this._y-y)/(bar._height-this._height);
        dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
        main._y += dy;
    };
};

View Replies !    View Related
Loading A Text File Into A Dyanmic Textbox
http://www.kirupa.com/developer/mx/dynamic_scroller.htm

I followed that tutorial, it didn't work and I followed one on macromedias website. Both are giving me the same error. I'm using flash mx 2004 professional version 7.2


Quote:




**Warning** Scene=news, layer=actions, frame=1:Line 1: The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
loadVarsText = new loadVars();

Total ActionScript Errors: 1 Reported Errors: 1




It shopws me that and in the text box there all it says is 'undefined'

The code on the layer that contains the textbox:


Quote:




loadVarsText = new loadVars();
loadVarsText.load("test.txt");
scroller.text = loadVarsText.var1;




I've also tried w/o that last line of code. Also the sample file off the kirupa tutorial gives me the same error. What's going on?

View Replies !    View Related
Dyanmic Field Won't Work When Frames Adavnce
hi everyone,
I'm going nuts on this, can't seem to find a solution.
I have this movieclip, which is called by a function (a rollOver action).
The movieclip contains an animated background, a dynamic textfield and an
empy mc where some images will be loaded via xml.
It all works perfectly on the 1st frame, but when I move the textfield into frame 10 (per say), it won't load the xml node anymore.
Did anyone of you encounter this same problem?
Help?
thanks...

View Replies !    View Related
Dyanmic Jpeg Slideshow Loading Delay Problems...
Have created a slideshow based on the code from the Slide Show Turorial located at:
http://www.macromedia.com/support/fl...slideshow_xml/
Everything works well except that when loading relatively large jpgs over a slow connection, when moving to the next or previous slide, the current slide gets dumped before the new one is fully loaded.
Is there a simple way to modify this code to not load (thus replace) the new slide in the targetted clip until it is fully loaded?
I am trying to create a seemless slide show without the need for the user looking at blank loading screens between slides.
Maybe by loading it into a hidden clip, thus effectively caching it before making the switch in the visible clip?
Any suggestion would be appreciated.
thanks in advance-


Referring URL : http://www.macromedia.com/support/fl...slideshow_xml/

View Replies !    View Related
Including Data From Mysql Into Flash Dyanmic Text Field?
Anyone know how I can go about doing this? Sorry, I'm such a newbie @ Flash!

http://www.bowarren.com/home.php is the page I'm working on. I want the dyanmic text field in the middle to grab data via PHP from a mysql database. I just don't have a clue where to begin.

Any help is greatly appreciated.

Thx,
jp

View Replies !    View Related
How Is This Done (Drag Object Anywhere Return To Origin), Object Follow Mouse On Lock
Both on same site,

1/. how did he do the dragable discs to the left of the introduction text?

2/. how did he make it so when you roll over a menu link, an object follows it underneath, but also stays there until you roll over the next?

Thanks

View Replies !    View Related
Making An Object Dissapear Once A Moving Object Makes Contact With It
Hello there,

Im in need of some help. Basically I need a code which will make an object disappear once another moving object hits it (MovieClips controlled by AS)

For example, a bullet comes out of the gun and hits a can which makes the can disappear as soon as the bullet hits it.

Is it something to do with the "intersects" function? I've been trying to solve it all day and cant do it

Please help.

View Replies !    View Related
Whats It Called When You Drag An Object And Want The Object To Continue Moving
i am trying to work out how to make a draggable movie clip/button continue to move in the same direction as the drag guides it...hmmmm does this make sense???? what is this function / behaviour called.... i have looked at many many drag tutorials but at present have only managed to find drag and drop type onces with target positions.... also does any one know if it is possible assign multiple drag points.

regards....

View Replies !    View Related
Video Object - Call To Load And Listener Object Not Working
i've got a video object within a movieclip who's full path i put in a var called 'video'. here's my code, it appears that the video object is not loading my stream and/or i'm not getting the listener object to work properly... everything does trace out good as far as vars, rtmp address, etc... grrr!!!


Code:
//function to load the stream in the vid object
_global.loadVid=function(vidFile){
trace("this is path to vidObj: "+video);
trace("loadVid function var passed: "+vidFile);
var listenerObject:Object = new Object();
listenerObject.ready=function(eventObject:Object):Void{
//video loaded, do this
video.removeEventListener("ready", listenerObject);
_root.container.vidPanel.gotoAndPlay("tovideo");
trace("video is loaded, proceeding to video play state");
};
video.addEventListener("ready", listenerObject);
var nV:String=rtmpURL+vidFile;
video.load(nV, true);
trace("video: "+rtmpURL+vidFile+" should be loading");
}

View Replies !    View Related
How'd U Make An Object Snap 2 Its Original Pos On An Object Thats Moved?
I'm working on a school project using Flash mx that needs a scrolling inventory. I know how to get an object to snap back to its original position from a drag, but how would you get it to snap back to its original position on an object that has moved? ie. On a scrolling menu?

//script to have a spanner remove a head and snap back to position if it doesn’t touch the head on release:

//attach to object

onClipEvent (load) {
spanx = _root.spanner._x;
spany = _root.spanner._y;
}


//action inside clip

on (press) {
startDrag(this,true);
}

on (release, releaseOutside) {

if (this.hitTest(_root.dismantle.head) & _root.head_switch=="hollow") {
_root.spanner.gotoAndPlay(2);
_root.dismantle.head.gotoAndPlay(2);
this._y = 185;
_root.airbrush._x= _root.airbrush.airbx;
_root.airbrush._y= _root.airbrush.airby;
}

else {
_root.spanner.gotoAndStop(1);
this._x = spanx;
this._y = spany;
this.gotoAndStop(2);

}

stopDrag();

}

how would i script a scrolling inventory from which I can drag and drop objects that snap back to the same pos in the inventory even tho its moved? You can see the inventory on the right of the attached jpeg.

View Replies !    View Related
Papervision Acsess Individual Object Within .dae File/Object
Hello,

The following code loads a .dae file into a new DAE() Object i am trying to acsess a specific child within de Object called "Loja1" (one of many) with var storeisplayObject3D = holder.getChildByName("Loja1"); to individually rotate it etc... but with no sucsess.

Does anyone know how this is acomplished ?

Thanks in Advance.

files at : http://www.kiyoshii.com/transfer/src.zip


Code:
package {

import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;

import org.papervision3d.cameras.Camera3D;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;

public class Pulitzer3d extends Sprite {
public var viewport:Viewport3D;
public var renderer:BasicRenderEngine;
public var scene:Scene3D;
public var camera:Camera3D;
public var dae:DAE;
public var cm:ColorMaterial;
public var holder:DisplayObject3D;
public var cameraBtn:BtnCamera;

public function Pulitzer3d() {
init();
}
private function init() {
//basic scene stuff
viewport = new Viewport3D(1024, 768, true,true);

addChild(viewport);

renderer = new BasicRenderEngine();

scene = new Scene3D();

camera = new Camera3D(holder, 15, 100);

camera.zoom = 500;

camera.z = -50;

//COLOR MATERIAL
cm = new ColorMaterial(0xFF0099, .85, true);

//DAE
dae = new DAE();

dae.load("floor_rename.dae", new MaterialsList( { all:cm } ));

holder = new DisplayObject3D();
holder.addChild(dae);

holder.rotationX = 90;
holder.rotationY = 45;

scene.addChild(holder);

var store:DisplayObject3D = holder.getChildByName("Loja1");

trace("DAE : " + store);

stage.addEventListener(Event.ENTER_FRAME, renderStuff);

}
private function renderStuff(e:Event) {
renderer.renderScene(scene,camera,viewport,true);
//camera.x += (((stage.mouseX-(stage.stageWidth * .5))*2)-camera.x )*.05;
//camera.y += (((stage.mouseY-(stage.stageHeight*.5))*2)-camera.y )*.05;
}
}
}

View Replies !    View Related
Web Service Param Is An Object Inside And Array Which Is An Object
Howdy. This is my first time on this forum, and I hope I get more help here than some of the other forums. I'll try to explain my dillema as simply as possible.

I have a webservice. I am calling a method 'InsertSlide'. That method requires and object as the paramater.
the object shcema looks like this:

Object
-SlideID (integer)
-Name (integer)
-SlideTypeID (integer)
-Hits (integer)
-LocationID (integer)
-SwfFileName (integer)
-SlideDataCollection (Array)
- -N (Object)
- - -Label
- - -Value

I hope that makes sense, all I'm trying to get at, is there is an object with an array as a property, that array is populated with an object and it has properties.

I recieve that same ojbect from the webservice fine, but when I send that object like that to the Webservice it does not fully populate my databases, unfortunatly I did not write the webservice.

Is it possible that the problem is the webservice? or flash?

Thanks for any help!
- Kiwi

View Replies !    View Related
Targeting Object Properties Inside PopUp Object
In my project I am creating a window using the PopUpManager. The symbol used to create that window has several objects.

For the sake of discussion we'll discuss the object message_txt inside myWindow.

How do I reference message_txt.text from actionscript after the object is dynamically created?

View Replies !    View Related
Gravity Issue? Object Slides Through Another Object Instead Of Sitting On Top Of It
Hello!

I have a file where two objects fall from the top of the stage and bounce and then eventually stop (using gravity and hit test).

You can grab the objects (a ball and a box --- each has a button symbol n the movie clip) and toss them and they bounce off each other and off the 4 sides of the stage.

The issue is when one of the objects is dropped directly on top of the other object, after it stops bouncing, it slides down until it hits the bottom of the stage (in this case, the box slides down in front of the ball, and the ball slides down in back of the box).

Is this because the gravity is pulling the object down to the bottom of the stage even though there's another object in its way?

How can I fix this so that the objects will still bounce off each other, and when dropped directly on top of each other object will stop instead of oozing through it (sorry, this is the best way I can describe it ?

I've attached 2 files (Fla 8 and Fla mx 2004).

-------- here is the gravity code on the first frame:


PHP Code:



var gravity:Number = 1.2;
var restitution:Number = 0.6;
var friction:Number = 0.9;

stop(); 




-------- here is the code on the ball


PHP Code:



onClipEvent(load) {
    var dragging:Boolean = false;
    var vel:Object = { x: 0, y: 0 };
    var pos:Object = { x: _x, y: _y };
    var old:Object = { x: _x, y: _y };
    var radius:Number = this._width / 2;
    var movie:Object = { width: 400, height: 300 };
}

onClipEvent(enterFrame){    
    if( !dragging ) {
        vel.y += _root.gravity;
        
        pos.x += vel.x;
        pos.y += vel.y;

        if( pos.y + radius > movie.height ) {
            pos.y = movie.height - radius;
            vel.y *= -_root.restitution;
            vel.x *= _root.friction;
        }
        
        if( pos.x + radius > movie.width ) {
            pos.x = movie.width - radius;
            vel.x *= -_root.restitution;
        }
        
        if( pos.x < radius ) {
            pos.x = radius;
            vel.x *= -_root.restitution;
        }
        
        _x = pos.x;
        _y = pos.y;
        
    } else {
        old.x = pos.x;
        old.y = pos.y;
        pos.x = _x;
        pos.y = _y;
        
        vel.x = ( pos.x - old.x ) / 2;
        vel.y = ( pos.y - old.y ) / 2;        
    }    

    
if(this.hitTest(_root.box)) {
        trace("hit");
        // ball and box are colliding, so lets reverse their movements.
        vel.x *= -1;
        vel.y *= -1;
        _root.box.vel.x*=-1;
        _root.box.vel.y*=-1;
        
        /*  these actions could be made more realistic by determining the precise
        position of the ball relative to the box during the collision, for instance,
        determine if the right side is colliding with the left side, so only reverse
        the x velocity, instead of both.  */
    }
    
    //this prevents the ball from leaving the upper extreme of the stage
    if (this._y < 0) {
            vel.y*=-1;
    }  





-------- here is the code on the button inside the ball (so you can drag and release the ball)


PHP Code:



on(press){
    startDrag(this,false,16,16,384,284);
    dragging = true;
}
on(release, releaseOutside){
    stopDrag();
    dragging = false;





-------- here is the code on the box


PHP Code:



onClipEvent(load) {
    var dragging:Boolean = false;
    var vel:Object = { x: 0, y: 0 };
    var pos:Object = { x: _x, y: _y };
    var old:Object = { x: _x, y: _y };
    var radius:Number = this._width / 2;
    var movie:Object = { width: 400, height: 300 };
}

onClipEvent(enterFrame){    
    if( !dragging ) {
        vel.y += _root.gravity;
        
        pos.x += vel.x;
        pos.y += vel.y;

        if( pos.y + radius > movie.height ) {
            pos.y = movie.height - radius;
            vel.y *= -_root.restitution;
            vel.x *= _root.friction;
        }
        
        if( pos.x + radius > movie.width ) {
            pos.x = movie.width - radius;
            vel.x *= -_root.restitution;
        }
        
        if( pos.x < radius ) {
            pos.x = radius;
            vel.x *= -_root.restitution;
        }
        
        _x = pos.x;
        _y = pos.y;
        
    } else {
        old.x = pos.x;
        old.y = pos.y;
        pos.x = _x;
        pos.y = _y;
        
        vel.x = ( pos.x - old.x ) / 2;
        vel.y = ( pos.y - old.y ) / 2;        
    }    





-------- here is the code on the button inside the box (so you can drag and release the box)


PHP Code:



on(press){
    startDrag(this,false,16,16,384,284);
    dragging = true;
}
on(release, releaseOutside){
    stopDrag();
    dragging = false;






I appreciate any help anyone can give me to fix this issue, I don't understand enough yet about how these objects are interacting to fix this --- but I hope to learn from you brilliant Kirupians!) Thanks!

Hondo311

View Replies !    View Related
Tween Class To Move An Object Called From Within The Object
I have a custom class that I want to move with the Tween Class
I am calling the Tween constructor from within that class but when I pass the keyword "this" as the object of that constructor , it doesnt move at all the code is as follow


PHP Code:



package{import fl.transitions.Tween;import flash.display.MovieClip;public class PortViewer extends MovieClip{var _twn:Tween;public function PortViewer(){    _twn = new Tween(this, "y", None.easeNone, 0, 100, 2, true);}}} 




how do I reference the object from within itself is there another keyword?
There are no errors it just doesnt move

Thank you Kirupa forums

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