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




Easy-dumping Contents Of A Var Into Textbox



in a function in my first scene, data is loaded into the var "T1Q1" many frames later I have a button that i want to load the value of that into a textbox named "question"
i have tried
CODEon(release){
    question = T1Q1;
}



Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 13 Dec 04 19:45


View Complete Forum Thread with Replies

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

Textbox Contents Won't Display On Mac
I've built a little site for my coed soccer team.  Nothing fancy or special.  Just something fun for the team.  It is here:

http://www.wastedspace.tv/bkfc/

However, users on Macs report that they cannot view the contents of my textboxes, where text is loaded with the loadvariables action.  

I checked Macromedia's site and it said Macs using IE 4.5 or below may have this problem.  One user that I know well is using IE 5.0 with Flashplayer 6.0, and still cannot see the text.  Could a member of this forum that uses a Mac check it out for me?  And can someone suggest a solution or workaround for this problem?

Thanks in advance for all of your help!

Detecting Textbox Contents Change
Im having difficulty detecting when the text in an Input textbox (drawn on stage by the Text tool) is changed in any way by the user.

What I would like is to detect what text, in its entirety, a user has entered into a textbox.

Using :

myTextBox.addEventListener(TextEvent.TEXT_INPUT, handleChange);

I can detect character additions. I can get the character added from the event data and with that and myTextBox.text I can piece together what text is in the textbox. Its cumbersome but works to a degree.

However if the user deletes any characters, the event is not triggered. In fact the user could delete the entire text string and I wouldn't know about it.

Is there a way of doing this ?

Set Textbox Contents Via Actionscript? Super Simple. But How?
Hey all,
I'm just trying to have a textbox on my main stage display certain values depending on what frames are being played. So having not done actionscript in a LONG time, I would assume is it something like this:


Code:
textboxvarname = "Value I want to display";
on some frame. but I'm sure I'm way off, cause that doesn't work! hahaa, thanks

Easy Dynamic Textbox Question.
Alright I want to have a Dynamic kind of text box that is always there in my movie (movie is all on one frame). And I want to be able to edit the text that I want to display in the box through actionscript, such as like when a button is pressed then text changes to whatever I want it to.

Kind of like:

on (release) {
text == "blahblah"
}

Something like that, if anyone can help me code this I would greatly appriciate it! Thanks so much in advance.

[F8] Load .swf Into Dynamic Textbox From .txt File (Easy)
Hey all. I have a website that loads external txt files into its dynamic textbox. I know I can use the <img> tag for images, but how would I load a .swf file? Thanks in advance!

Html Tags In Dynamic Textbox - Should Be Easy
Is there some kind of order that html tags have to be in to work? I have this in my textfile:

sortMC=<b><u>Memos</u></b><br><FONT COLOR='#738DD9'><a href = "www.blahblahblah.com"><u>blah website</u></a></FONT><br>

The underlined colored text link to "blah website" works fine as does all text coming after the last break <br> tag (not shown here). However the first part - <b><u>Memos</u></b> doesn't work (that first <br> does though as I can see the breaks in between sections of text that I have set up). Is there a simple explanation for this? I have tried using <B> </B> also and still no luck.

Thanks for any help!

Html Tags In Dynamic Textbox - Should Be Easy
Is there some kind of order that html tags have to be in to work? I have this in my textfile:

sortMC=<b><u>Memos</u></b><br><FONT COLOR='#738DD9'><a href = "www.blahblahblah.com"><u>blah website</u></a></FONT><br>

The underlined colored text link to "blah website" works fine as does all text coming after the last break <br> tag (not shown here). However the first part - <b><u>Memos</u></b> doesn't work (that first <br> does though as I can see the breaks in between sections of text that I have set up). Is there a simple explanation for this? I have tried using <B> </B> also and still no luck.

Thanks for any help!

Dumping My Old Junk
I'm making a game, sort of like a shooting game but I'm actually throwing cakes at targets, and the cakes I'm throwing are all duplicated movie clips based on one seed clip. Each time I throw a new cake, duplicated in a new level, it tries to hit the target and is eventually removed whether or not it hits the target or misses.

But when I want the user to "play again" I can't seem to successfully re-initialize my "i" and start the duplication of the "cake" clip from the beginning. When I trace the "i" I get both the new "i" values as well as the continuation of the old. so it looks like 2 cakes are being thrown as well.

//Example:
//values for "i" when traced are:

1
2
3
4
5

//and then I start the game over and values traced are:

6
1
7
2
8
3
9
4
10
5
etc

is there a way to completely get rid of all of the old values and start again from scratch. I thought that sending the playhead to the first frame of the movie would do it, but the values of "i" in my "cake" duplicating function are still there.
thanks

HELP -- UnloadMovie Is Dumping On Me
ok.. here's the deal.. i've got my level0 swf as my main movie, and using menu buttons, it calls up two other swfs, one from one button, one from another, and *not* simultaneously....

the way i have implemented this is on button release i move to a blank frame of level0 and stop(); loadMovie("blah.swf",2)

in "blah.swf", to return to my main movie, i have a 'home' button with the action on release , _level0.play()... the next frame of level0 has the action unloadMovie(2);
gotoAndPlay("main")....

this works great on the movie i load into level 2, but my second movie, which loads into level 4 hangs up on the 'home' button return.. as near as i can tell, the _level0.play() is not executing, and my level 4 movie starts again from the beginning....

both movies have the same code, there appear to be no syntax errors, it just doesn't work with the second movie... and it makes no difference which i try first... the one in level 4 just doesn't work...

anybody got any ideas about what's going on here, and why my level 4 movie poops out on me??

TIA

Dumping Memory
I built a 15 minute animated slideshow but noticed that I was running out of memory about 13 minutes in. I can't seem to find any information on how to handle memory. Can I tell Flash to dump memory held up in bitmaps at all?

Is there documentation that is available on handling memory in bitmap?

Dumping Previous Scene
I am having an annoying problem that I haven't had before. I am working on a "quick" project demo for a presentation next week. The layout and navigation is pretty typical. I have my different sections separated as different scenes in the flash file. There is a next and previous button on the bottom. The buttons are programmed to go to the scene name and frame label. When I test the buttons inside of the flash file everything works fine. When I test or publish the movie though:
scene1 to scene2 - works fine
scene2 to scene3 - scene2 and scene3 visible
scene3 to scene4 - scene2 and scene4 visible, scene3 gone
scene4 to scene5 - scene2 and scene5 visible, scene4 gone

Everything is on level 0. I have tried renaming scene and label names with no caps, no spaces, no underscores, hyphens, etc. I've even restarted my computer out of frustration.

Why won't scene 2 unload, but the other scenes do?

Has anyone else had this problem before?

Any help will be appreciated.

Dumping DataSet To XML Thru XMLConnector
Using MX 2004 Pro: DataSet: DataGrid: XMLConnectors

I have two XML Connectors, one DataSet, and one DataGrid. The first connector successfully brings in XML and loads the dataset, which then successfully loads the data grid.

I want to then dump ALL of the information back to an XML file to send to the server, NOT just the deltaPacket. I tried to DataBind the dataset to the second XMLConnector. When I call the trigger, a post is succesfully called to the server but it's empty. And no errors are being thrown in the XMLconnector.status.

My question is of course... what do I need to do to successfully dump the entire dataset to XML using the XML Connector.. I of course could iterate through the entire dataset and build the XML manually.. but I figure this is what DataBinding is all about. Do I need some specific Schema? I've created one based on the fields in the dataset.. but doesn't seem to work

Flash Is Dumping My Library Items
Hey, I've had a couple of files end up with the same problem. I've got a plain old movie, all of a sudden I'll open the file and a graphic or movie clip has just disappeared.

The stage of my main movie just shows the little square where it used to be, the library still lists the item, but when I click on it, the timeline and stage are completely greyed out. It's just gone.

I figured I could chalk it up to a corrupt file, but after it happened a few times, I thought I'd see if anyone else has dealt with this.

Thanks for your help.
Eric

[cs3 As2] Using Ui Components And Dumping To Text File
Hey peeps,
I've currently got my questionnaire which has a trace function to calculate each users score, however, I've now been asked to place a country selection (which I'm using a UI combo box) at the start and they want it to be dumped to a text file.
If i understand right, I could probably use the trace and somehow trace that to a text file, but have never really used UI components and am not sure how to get the details of that to go to the file as well, any ideas appreciated.

Cheers

Dumping The Entire Display List
Is there a way in flash cs3/as3 to dump the entire hierarchical display list?

edit: I found it by searching on the forum

Dumping Object/Array/Variable In AS3
So I'm a PHP programmer and we have a very cool function called print_r that does this with an array:


HTML Code:
<?
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print "<pre>".print_r($a, true)."</pre>";
?>
The output is the following:


HTML Code:
Array
(
[a] => apple
[b] => banana
[c] => Array
(
[0] => x
[1] => y
[2] => z
)
)
So my question is this: is there an AS3 equivalent? or something like it? I'm debugging an AS2 to AS3 program in which I have tons of bugs and I'm going line by line trying to figure out why my translation isn't working and I would love to see the contents of each object/array/variable.

Any thoughts?

Dumping The DIV Doesn't Dump The Swf (in Safari)
hey,

i have a swf which calls a javascript function to display a div (that looks like a little window) and replace the div's contents with embed code that users can grad from youtube or google video.

this part works fine. the div is displayed above my swf with the youtube video inside.

the div looks like a little window with a drag bar and a close button.

the problem is that when a user tries to close the little div window in safari, the youtube video (i'm assuming it's the same for other flash content), continues playing it's audio. the audio is stopped (as it should be) in firefox.

the way the div is "closed" is by first setting the contents of the div to "", ie empty string. so the object/embed code is gone. but in safari this is apparently not enough to unload the flash player.

below you can see the javascript which sets the contents of the DIV to be that of the embed video, the function which hides the embedded video, and the div itself.


HTML Code:
<script type="text/javascript">
<!--

function hide_embed(){
change_content( "" );
var vid = document.getElementById("vid_pane");
vid.style.display = "none";
}

function change_content( shtml ){
var id = "vid_content";
if (document.getElementById || document.all) {
var el = document.getElementById? document.getElementById(id): document.all[id];
if (el && typeof el.innerHTML != "undefined") el.innerHTML = shtml;
}
}

// -->
</script>


<div id="vid_content">
<!-- this will be replaced with video embed code -->
</div>
thanks for checking it out...

Dumping An XML String From Flash Into Popup Window...
This is more of a javascript question, but worth a shot:
I have an XML string that was generated in a SWF and it is passed to the browser with the fscommand...
All I want to do is have the fscommand instruct some javascript to open a regular popup window and then display the XML in the popup with some formatting provided by an XSL file...
Should be simple enough...
Here's my javascript code in the FScommand receiver function:

popWin=window.open("","new","toolbar=no,location=n o,directories=no, status=no,menubar=no,titlebar=no,scrollbars=yes,re sizable=no,dependent=no,alwaysRaised= yes,width=750,height=500");
popWin.document.open("text/xml");
popWin.document.write(args);
popWin.document.close;

The string is making it to the browser in it's entirity (tested with an alert statement)...but when I dump it into the popup window it takes the XML as HTML and displays it all wonky - and completely ignores the XSL (since it doesn't seem to know it's an XML statement this only makes sense)...

If I load in an XML file directly (instead of writing it to the window) like this:

popWin=window.open("TESTY.XML","new","toolbar=no,location=no,directories=no , status=no,menubar=no,titlebar=no,scrollbars=yes,re sizable=no,dependent=no,alwaysRaised= yes,width=750,height=500");

it then works fine, so it isn't a window problem...it's something to do with the document.write statement I believe...

Any help on this one would be much appreciated...
cheers

Method For Dumping Info From An Own-made Calendar
Hi!

I am having a project in school where vi are creating a calendar from scratch. The problem we are having is that the program creates a .txt when u make a planning in the calendar. What we need now is for this .txt to be saved somewhere. How could we do...we would rather use a method that doesnt require a server such as PHP

Regards Bilal

Strange Array Behaviour- Seems To Be Dumping Values
Hey guys,

Meet my new app- a WIP flash site that builds it's nav and content from a DB:

http://www.chrisdidthis.com/warnerph...rnerphoto.html

I've set up a slideshow that runs in loop- it's not very elegant at the moment, but before I go on working to refine it's functionality, i've run into a problem-

I'm pulling values for my image names from an array of names- I have a value( i ) that increments up and determines the array index to pull the infromation from. This value resets to 0 when it reaches the end of the array and starts from zero again.

Everything works perfectly the first time that i is climbing towards it's reset value, however, when i reset it back to 0, the array stops returning values for [i]images_array- it returns undefined for my image names. If you view the link above, you'll see that the slideshow just stops after it's cycled through all the images. = |

I'm totally stuck on this one, anyone heard of this before? I've pasted in my code here, highlighting the important (i.e not working) bits in black.

Thanks in advance everyone

++counter;
if (counter == frequency) {
counter = 0;
++loader_depth;
loader_name = "loader_"+i;
trace ("changing image, array length = "+images_array.length+", i = "+i);
duplicateMovieClip (image_loader_mc, loader_name, loader_depth);
this[loader_name].image_name = images_array[i];
//
if ((i+1) == images_array.length) {
i = 0;
}
++i;
}
gotoAndPlay (2);


Also, here are my image creation lines that happen a few frames previously- just in case

images_array = new Array ();
var frequency:Number = 90;
var counter:Number = frequency - 5;
var i:Number = 0;
var loader_depth:Number = 1

Hide Contents Of Swf? Is There Any Way Of Hiding The Contents Of My Main Swf?
When my main swf site is loaded in a browser, is there any way of hiding the contents of my swf from users? Right now, anyone can just go to the 'activity' window and download any of my pictures, scripts, etc....and i don't like that.
Thanks,
Dave

How Do U Make A Dynamic Textbox With A Variable Textbox
well im really noob at this like i got flash mx 2004 professional a couple of days ago and well u know im still not getting how to use actionscript i sorta understand most of the drawing i know how to use motion tween real well lol anyways if someone could help me it would be great.

TextBox._height Textbox Size?
Maybe someone can help -
How can I change the height of TextBox_size (MC). Is everything controlled by the movie size?

I put the scrollbarDynamic7.fla at http://www.bitweb.com/test for reference

TextBox._height = TextBox_Height;
function springAction () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
addY = difY / 5;
overshootY = overshootY + addY;
content._y = content._y + overshootY + addY;
}
function easeOut () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
content._y = content._y + difY / 3;
}

Cheers

Kobus

Textbox Changes To Input Textbox.
Here my code is working inside a for loop which checks inside the XML files and retireves the content...I am not writing the loop here......because there is lots of code inbetween so you don't get the correct idea.

var textmessage = importXMLtemplate.firstChild.childNodes[j].attributes.message;//message contains the text

var TextBoxName = "TextBox" + j;

template_mc.createTextField(TextBoxName, 10, 100, 100, 165, 30);
template_mc[TextBoxName].styleSheet = myCSS;//stylesheet I called above not writing here.
template_mc[TextBoxName].html = true;
template_mc[TextBoxName].multiline = true;
template_mc[TextBoxName].htmlText = textmessage;



template_mc[TextBoxName].type = "input";


Here the message is showing inside the textbos properly loading form XML. The only problem is that the textbox is not changing to input text box.

I want to change the text box to input text box and change the value inside the text box

please help...

SUPER EASY / RETARDED EASY SetMask ?
Ok got a simple retarded question. I have 1 swf loading into a holder_mc and a mask_mc set with setMask but it is not working. There is nothing else to this but so help me it is not working and I know I have to be overlooking something simple but I am just not seeing it.

Heres the whopping 3 lines of code:
code: stop();
contentHolder_mc.loadMovie("home.swf");
contentHolder_mc.setMask(contentMask_mc);


Example attached.

thx

c

Easy Question, Hopefully Easy Answer...
How can i create a grid of 20 movieclips? I would like to have 4 columns and 5 rows.
Its going to be used for a drag and drop game. any help would be REALLY appreciated!!

Swap Contents In A MC
I am working on a template for a window-style website. Right now I am working on having the user move the window around by dragging the titlebar. I don't really like how the whole MC is visible while dragging so I thought of replacing the original MC with an MC of just the frame of the window. When the user presses down the mouse button while over the title bar the frame will appear, then when they release the original window will re-appear and the stopDrag(); function will execute.

Does anyone know an easy way of swapping the contents of an MC with another while still retaining all of the actions within a Movie Clip?
I've thought of making a frame MC in the original one and just have it above everything else and have it invisible, then have it become visible when the user clicks and have a background inside the frame that would block out the original window. But I would like to have the background behind everything visible when dragging, so that was no good.

Any ideas?

Createtextfield And Add Contents
Hi I have a question:

I have created a textfield using the code below:

counter=5;
for (i=0; i<counter; i++) {

help = "t_txt"+i;
here.createTextField(help, 1, 100, 100, 1, 1);
here.t_txt0.autoSize = true;
here.t_txt0.text += "blablabla";

}

This works except for the contents. I would like to change the value of t_txt0 in this line:

here.t_txt0.text += "blablabla";

to t_txt1, t_txt2, etc. I tried several options but I can't get it to work. Does anyone know what code to use to solve this?

Missing Contents
Hi I created a game interface in flash mx 2004 that has 3 panels that when on click of a button it the contents in the panel will scroll. I want to ask why the one, two or all the panels' content got missing at the end of the scrolling. The 3 panels are supposed to show 3 pictures at the end of the random scrolling.

Getting Contents Of A Directory
Is there anyway to get the contents of a directory like the directory where .swf file is in without the use of outside scripts? So that flash can see what image file names are in there and then load them.

Move Contents Of One .fla To Another?
I have one .fla containing actions, images, text, accross several layers.

I'd like to move all of this content into another .fla (preferably inside its own movie clip) so that it can exist on a keyframe on the stage.

I can't see how to do this without copying over every individual item? I don't want to load a swf into my other document, I need the source.

Any help please?

Saving SWF Contents
Can we save the over moviclip as image(JPG) using actionscript like with the SharedObject class

Emptying A MC Contents First?
Hi There,

Im using the fix below to load smoothed images to Flash 8 and use as a background for my flash movies..... however normally I can just load a bitmap to a certain target and it replaces the contents, however this script seems to load the images on top of each other, so when I do an alpha fade it really bogs down.....

Is there anyway to have it replace its own contents first?

import flash.display.*;

function loadBitmapSmoothed(url:String, target:MovieClip) {
// Create a movie clip which will contain our
// unsmoothed bitmap
var bmc:MovieClip = target.createEmptyMovieClip(
"bmc",
target.getNextHighestDepth());

// Create a listener which will notify us when
// the bitmap loaded successfully
var listener:Object = new Object();

// Track the target
listener.tmc = target;

// If the bitmap loaded successfully we redraw the
// movie into a BitmapData object and then attach
// that BitmapData to the target movie clip with
// the smoothing flag turned on.
listener.onLoadInit = function(mc:MovieClip) {
mc._visible = false;

var bitmap:BitmapData = new BitmapData(
mc._width,
mc._height,
true);

this.tmc.attachBitmap(
bitmap,
this.tmc.getNextHighestDepth(),
"auto",
true);

bitmap.draw(mc);
};

// Do it, load the bitmap now
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(url, bmc);
}

Then I am using for example:

loadBitmapSmoothed("flashbacks/hallways.jpg",my_mc)


Thanks for any help!

Flv And Contents Preloader
I'm trying to play flv on frame 1 after both flv and contents on frame 2 are loaded.

how can I stop flv from playing before the contents are loaded?



AS on frame 1


Quote:





stop();

var loadSize:Number = getBytesTotal();



var nc:NetConnection = new NetConnection;
nc.connect(null);
var ns:NetStream = new NetStream(nc);

myVideo.attachVideo(ns);


ns.play("flv3a.flv");

/********* flv preloader********/

this.createTextField("loaded_txt", this.getNextHighestDepth(), 0, 0, 160, 22);
var loaded_interval:Number = setInterval(checkBytesLoaded, 500, ns);
function checkBytesLoaded(my_ns:NetStream) {
var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100);
loaded_txt.text = Math.round(my_ns.bytesLoaded / 1000) + " of " + Math.round(my_ns.bytesTotal / 1000) + " KB loaded (" + pctLoaded + "%)";


/********* contents preloader ********/

loaded = getBytesLoaded();

var percentField:Number = Math.round(loaded / loadSize * 100);

////

frameNum = Math.min(pctLoaded, percentField)



loader.gotoAndStop(frameNum);

if ( Math.min(pctLoaded, percentField) >= 100) {
clearInterval(loaded_interval);
}
}


/********* cue point ********/



var ourListener:Object = new Object();
ourListener.cuePoint = function(eventObject:Object):Void{
if(eventObject.info.name == "first"){
play();

}
}

myVideo.addEventListener("cuePoint",ourListener);






Thank you

Table Of Contents
Hello All,

I couldn't find anything like this in any other existing threads on this site...

I am creating a table of contents using an external swf. The TOC simply loads various pages when clicked on.

I need to create a listener that depending on which page you are on a particular table of contents page name would be highlighted.

Example: If I am on "pagename.aspx" and access the flash TOC it will highlight the button/mc that contains the event listener for "pagename.aspx"

Make sense?

Any help from you guys would be appreciated!

The Contents Disappear
Hello world!

I need help on this website www.logicamente.net

Please criticize.

But my problem now it's this. please go to the Button "resultados" and press, tham go to the next button and tham return to "resultados".

Yep major error.

Cam any help me.

Best Regards to all.
Hugo

Is This Possible (r.e. Viewing MC Contents)
Some of my movieclips have nothing in the first frames. But then when I position them on the stage I can't see anything except the little white circle positioner thing.

Is there some way to set the "default movieclip frame" to the last frame instead of the first, for viewing and positioning purposes.

It would make sense because often the last frame is where the movie content finishes and comes to a halt, not the first frame.

Hope I'm clear in what I'm saying...

Contents Of Button?
Hello,

i have a Flash Button in my library (not a Button Component) which has a dynamic textfield in it, its instance name is label_txt

i add this button dynamically using attachmovie which works fine, now i want to change the text of the label_txt textfield

if the Button would be an MovieClip i could do this using:
myButton.label_txt.text="my Text";

but actually this doesnt work for Buttons, so how do i access the contents of Buttons??

Get Contents Of Another Page
I am familiar with parsing information from other web page contents in .net. But how do I do this In flash? I want to get the source of another web page and and parse it from there for use in my flash. How can I do this? I have tried XMLSocket, not sure If my error was thinking it wouldn't work and trying anyways or what.

Some Contents In The Same Position
Hello people .

Ok, I need your help with this one:

I have an interface with three buttons, and each button calls a small content in the same place each, so I have three contents piled one on top of each other.

The problem is that the content of button #1 shows exactly at the same place where buttonīs #2 content also appears... and also buttonīs #3.

I need to call each content through each button but I need any of the three contents to disappear when any of the other contents is called.

Can you help me with this one?

Thnx!

Links And Contents
I have 3 links and I want to have a different content for each link.
What I was hoping to to do is to change a layer (with content) when another link is clicked. How can this be achieved?

Changing Contents Of An Swf To An Mc
Before I attempt this I thought I would ask. I have converted small swfs into movie clips before but I wanted to know if I could convert a photoslideshow .swf to a movieclip so I could have it play from the timeline rather than call it as an external swf (withloadMovieNum)

the actual slideshow swf only has two frames and two layers on the timeline is it possible?

example
button in main.swf loads external slideshow swf onto level
can I take external slideshow.swf copy all frames in a movieclip inside main.swf
and place mc on a frame and call with gotoandplay(frame?)

hope I'm clear as the slideshow itself uses an xml file to call up various photos.

the site as is now is here

click porfolioa or b for the gallery

Flv And Contents Preloader
I'm trying to play flv on frame 1 after both flv and contents on frame 2 are loaded.

how can I stop flv from playing before the contents are loaded?



AS on frame 1










Attach Code

stop();

var loadSize:Number = getBytesTotal();



var nc:NetConnection = new NetConnection;
nc.connect(null);
var ns:NetStream = new NetStream(nc);

myVideo.attachVideo(ns);


ns.play("flv3a.flv");

/********* flv preloader********/

this.createTextField("loaded_txt", this.getNextHighestDepth(), 0, 0, 160, 22);
var loaded_interval:Number = setInterval(checkBytesLoaded, 500, ns);
function checkBytesLoaded(my_ns:NetStream) {
var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100);
loaded_txt.text = Math.round(my_ns.bytesLoaded / 1000) + " of " + Math.round(my_ns.bytesTotal / 1000) + " KB loaded (" + pctLoaded + "%)";


/********* contents preloader ********/

loaded = getBytesLoaded();

var percentField:Number = Math.round(loaded / loadSize * 100);

////

frameNum = Math.min(pctLoaded, percentField)



loader.gotoAndStop(frameNum);

if ( Math.min(pctLoaded, percentField) >= 100) {
clearInterval(loaded_interval);
}
}


/********* cue point ********/



var ourListener:Object = new Object();
ourListener.cuePoint = function(eventObject:Object):Void{
if(eventObject.info.name == "first"){
play();

}
}

myVideo.addEventListener("cuePoint",ourListener);

How To Catalog Contents In FMS?
Hello, I have a doubt regarding file managment in FMS 3. I want to create a video on demand aplication using FMS and I want to catalog the videos ( to associate data such as Director, Year, Producer, Actors, Genre, Price, Format, Duration, Language, etc.).
Where can this be done? Do I have to create a external (external to FMS) database?
And what about playlits? I know is possible to create server-side playlists? Where are they created and which data do they support? I plan to use xml playlists (rss 2.0 compatible) and to to add all the required data ( Director, Year, Producer, Actors, Genre, Price, Format, Duration, Language, etc.) to the playlists.
In resume, my question is: Do I have to create a external database or is there a internal database inside FMS that can be use to catalog the videos?
If I have to use an external database, which is the best way to relate the data with the video?

Best regards

Diogo

DRM For The Contents In The Browser
I am considering to use FMS for our video conents and also want to adopt FMRMS for the DRM. Then what I got from the site is that FMRMS is just supporting AMP and AIR applications. So then what about the contents in the browser?

Get Cell Contents
I need to get the contents of a cell where a user has edited any cell in that row.

For example, I've got a hidden column of primary keys from an XML file. When a user edits any other cell in a row, I need to grab that primary key so I can send that row's data to a script and update my database.

Of course, if there's a better, more efficient method for updating data in a MySQL database from a datagrid, I'd love to hear from someone.

Here is my code so far:




Thanks!

:grimey







Attach Code

fieldsGrid.addEventListener(DataGridEvent.ITEM_EDIT_END, itemEditPreEnd, false, 100);

function itemEditPreEnd(event:DataGridEvent):void {
// get a reference to the datagrid
var grid:DataGrid = event.target as DataGrid;
// get a reference to the name of the property in the underlying object corresponding to the cell that's being edited
var field:String = event.dataField;
// get a reference to the row number (the index in the dataprovider of the row that's being edited
var row:Number = Number(event.rowIndex);
var col:Number = Number (event.columnIndex);
//d.text=row.toString()+" "+col.toString();
//d.text=event.toString();
d.text=grid.getItemAt(0)[0].toString();
}

























Edited: 01/04/2008 at 09:54:49 AM by Frank Grimes

Preload All Contents
is there any way to add a preload all images function to the thumbnail gallery in the tutorial?

Reload Contents
Does anyone know how I can reload/refresh contents that have been loaded by an external XML file. I have a XML file that has more than one parent node. When I click on a arrow button(to go to the next one) it does not reload or refresh the thumbnails.

Using Contents Of A Txt Box As A Variable
i have a dynamic text box that is filled with the path to an image form a database. for instance the database will say images/picture.jpg

then i have a symbol called pic that is on the _root into which i want to load the image corresponding to the path that is in the textbox.

the column in the database is called picture and my asp script sends the data to flash. the text field is populated so i know the asp script works. but i can't seem to use the contents of the populated text box as a variable from which i will tell _root.pic to load the image


PHP Code:



var holder = picture
_root.pic.loadMovieNum(holder, 10000); 

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