SharedObject Not Playing Nicely
Shared objects have always caused me to overheat a little because it seems to me that they work sometimes but not always.
At the moment I'm using ActionScript to create a sharedObject with one property and placing a number value at that property.
Code:
var my_so:SharedObject = SharedObject.getLocal("sohistory", "/");
my_so.data.pageID = page;
I'm using .flush() to save it immediately then I display the number in a text field.
Code:
my_so.flush();
receiver_txt.text = my_so.data.pageID;
So far, so good.
I have another movie with actionscript that retreives the value of the property and displays it in a text field. It's a bit tricky and uses a function to decide whether the last saved value has changed and then updates a text field
Code:
function checkPage() {
var my_so:SharedObject = SharedObject.getLocal("sohistory", "/");
newPage = my_so.data.pageID;
if(newPage != oldPage)
_root.changeNav(newPage);
oldPage = newPage;
}
The problem I'm having is that it only updates for about 15 or 16 changes on Firefox and about 5 or 6 changes on IE. At the moment I'm testing with Windows XP.
I think it must have something to do with the method I'm using to test for change and there must be a listener object I can use of some sort.
Any ideas?
Thanks,
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Apr 21, 2006, 17:56
View Complete Forum Thread with Replies
Sponsored Links:
- Help With Sharedobject Playing Banner Once
- Please...anyone...I'm Asking Nicely
- How Do I Have Nicely Formatted Text In A Scroller?
- Helpa Me Popups How Are They Made Nicely ?
- How To Make This: Random Transitions Nicely Done.
- Javascript Doesn't Play Nicely
- Fitting Flash To Fit In Webpage Nicely
- Movie Clips Not Behaving Nicely
- Could You Respond Nicely, Please, About This Script. It Doesn't Work.
- RemoveItemAt Datagrid Doesn T Work Nicely
- [CS3] How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
- AS3 - How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
- Sharing, But Not Nicely - Shared Libraries And Duplicated Clips
- Gallery Moves Forward Through Images Nicely, But Not When Going Back
- [CS3] SharedObject Being Set In Swf A, Check SharedObject In Swf B
- SharedObject Being Set In Swf A, Check SharedObject In Swf B
- SharedObject Being Set In Swf A, Check SharedObject In Swf B
- SharedObject Being Set In Swf A, Check SharedObject In Swf B
- Please "disappear" Nicely :)
- Flash Player Not Playing Not Playing Properly Low Bitrate Sound
- Check If Movie Clip Finish Playing Before Playing Next
- How Do I Check To See If A Sound Is Already Playing Before Playing When Pressing Play
- Playing A Certain Frame, After A External Swf File Has Started Playing?
- SharedObject?
- Different Use For SharedObject?
- Help With Sharedobject
- SharedObject
- SharedObject - Where ?
- SharedObject Help?
- Sharedobject
- Sharedobject
- SharedObject
- Help With SharedObject
- Sharedobject
- SharedObject, How?
- SharedObject Help
- SharedObject From Swf To Swf
- SharedObject Help
- SharedObject
- Sharedobject
- SharedObject?
- SharedObject
- [F8] SharedObject (between 2 .swf)
- SharedObject
- Sharedobject
- SharedObject Help
- SharedObject
- SharedObject
- SharedObject
- SharedObject
- SharedObject - When Will It Die?
Help With Sharedobject Playing Banner Once
here is my problem,
i have a flash banner on a layer in html that i want users to view only once, so the next thing the user visits, he wont be able to see the banner,BUT, there is a image/link to reveal/replay the animation.
Since im a newbie, i have no idea how this script runs, and how to delete the sharedobject to reveal it again
any help???
tnx in advance
View Replies !
View Related
Please...anyone...I'm Asking Nicely
OK...it's supposed to be a simple task. I have a paint brush(a movie clip). I have a "pallette"(buttons) when I click on the pallette with the paint brush the tip of the brush(a button)is supposed to turn the color of the pallette piece. Then it's supposed to disperse the color to the rest of the book.
Sounds simple enough
Fat Chance.... The tip turns black and that's where it ends...it won't even go fill the colors in the rest of the book. Now it wouldn't be that bad with out the colored tip...but it would be just spiffy for the tip to turn color too....
Come on folks...anyone up for the challenge to lend me a hand with this beast?!?!?!?
View Replies !
View Related
How Do I Have Nicely Formatted Text In A Scroller?
Hi All,
I have a dynamic text box with the scroller component tagged onto the side of it...everything works fine...
EXCEPT
on the stage i can have really nice formatted text with different colours and bold font..it really is nice
BUT
when i preview it (ctrl > enter), it looks like excrement!! its not a fancy font...Arial Narrow??
Why is this happening??
Appreciate the help
Cheers
View Replies !
View Related
Helpa Me Popups How Are They Made Nicely ?
hey
i know this probably was answered before, (i actually saw and went ot a thread like this but it didnt help me)
but i have a nice question
in your html page, you can add javascript to open a window thats totally customized...eg.size, toolbars, etc...
how would i do that in flash?
is there some actionscripting of its own, or some crazy javascript thing that flash understands
thanks all
(ps, im usin flash 5)
View Replies !
View Related
How To Make This: Random Transitions Nicely Done.
I look to this site for inspiration and help. I look to other sites for design inspirations, but I found this neat little annimation that I would love to see the fla for...anyone have any ideas on where I can see an fla of similar nature. http://www.templatemonster.com/show....g2=&order=date
Thanks.
View Replies !
View Related
Javascript Doesn't Play Nicely
Hi,
I have a javascript menu and a flash movie on the one html page, and they aren't playing nicely. Flash overlaps the javascript drop-down menu. Anyone know how to fix it? I've searched over the web and found people with the same problem, but no solution.
cheers,
Minnn
View Replies !
View Related
Fitting Flash To Fit In Webpage Nicely
Hi,
This is a follow up after I had some great help from 'pellepiano'..
Bascially Ive attached a file so it might help people in the future and someone might be able to help me.
The flash file when published to HTML will stretch to the size of the screen keeping the main body the same pixels centered (after you set the page margin properties on dreamweaver to 0).
It has two main sets of code to do this, one to set up the initial page to fit the browser without stretching the images in the page, and the other that will stretch Instances to what you set them to....... I am looking to set the white bar to the bottom of the screen and the blue logo to the top left of screen when in IE?????? anybody help me!???
Thanks
Jp
View Replies !
View Related
Movie Clips Not Behaving Nicely
These movie clips are not behaving nicely (see attached files).
The first thing that's strange is that the rollOver/rollOut affects the last box no matter which box you roll over.
The second strange thing is that frame 5 of the movie clip doesn't ever appear, at least the text ("10" in this case) is never visible.
Any suggestions?
Thanks,
Mathminded
View Replies !
View Related
Could You Respond Nicely, Please, About This Script. It Doesn't Work.
I am trying to insert data into a DB, but it won't enter. Here is what I have for the AS:
on(release) {
if(new_player_name ne '')
{
gotoAndPlay(2);
new_player_name.loadVariables("create_player.php", "POST");
status = "Creating, please wait...";
}
else
{
status = "Enter a New Player Name";
}
}
And my PHP looks like this:
<?
include('../db/db_access.php');
$player_name = $_POST['new_player_name'];
mysql_query("insert into player set player_name='$player_name'");
$result = mysql_query("select player_id from player where player_name='$player_name'");
$player_id = mysql_result($result, 0, 'player_id');
$result = mysql_query("insert into old_position (player_id, oldx_tile, oldy_tile, on_map) values ('$player_id', '7', '7', '1')");
print "status = Created&checklog=1";
?>
What am I doing wrong? Also, I need to have it be Flash, it's the current player I have, sorry.
View Replies !
View Related
RemoveItemAt Datagrid Doesn T Work Nicely
hello everyone,
I post onthe good forum, sorry for the previous one at Flash CS3 .....
i ve a problem about my script that should show me entries of an xml file :
HTML Code:
<?xml version="1.0" encoding="utf-8" ?>
<videos>
<video name="motion 01" genre="motion" data="thumbs/motion01.jpg" />
<video name="motion 02" genre="abstrait" data="thumbs/motion02.jpg" />
<video name="motion 03" genre="art video" data="thumbs/motion03.jpg" />
<video name="motion 04" genre="motion" data="thumbs/motion04.jpg" />
<video name="motion 05" genre="abstrait" data="thumbs/motion05.jpg" />
<video name="motion 06" genre="art video" data="thumbs/motion06.jpg" />
<video name="motion 07" genre="motion" data="thumbs/motion07.jpg" />
</videos>
inside a dataGrid (myDataP1) versus their attributes "genre".
the loading in the dataGrid is ok, when i click to btSort with that script it's ok
HTML Code:
function monTri(evt:Event):void {
//myXML = new XML(evt.target.data);
var myDP = new DataProvider(myXML);
myDP.sortOn("genre");// classe les genres
if (myXML.video.(@genre=="motion")) {
for (var i:uint = 0; i < myDP.length; i++) {
myDP.removeItemAt(myXML.video.(@genre!=="motion"));
}
myDataP1.dataProvider = myDP;
}
}
btSort.addEventListener(MouseEvent.CLICK, monTri);
the problem happen when i want to click on a second button that should change entries of dataP1 with another @genre ...
HTML Code:
function monTri2(evt:Event):void {
//myXML = new XML(evt.target.data);
var myDP = new DataProvider(myXML);
myDP.sortOn("genre");
if (myXML.video.(@genre!=="abstrait")) {
for (var i:uint = 0; i < myDP.length; i++) {
myDP.removeItemAt(myXML.video.(@genre!=="abstrait"));
}
myDataP1.dataProvider = myDP;
}
}
btSort2.addEventListener(MouseEvent.CLICK, monTri2);
i m trying an other kind of script but this one can not remove Item that have !=motion ...
HTML Code:
function monTri3(evt:Event) {
var myDP = new DataProvider(myXML);
var myStyle:String = "motion";
for (var i:Number=0; i < myDP.length; i++) {
var item:XML = XML(myDP.getItemAt(i));
trace(item);
if (item.@genre !== myStyle) {
myDP.removeItemAt(i);
}
}
myDataP1.dataProvider = myDP;
}
btSort2.addEventListener(MouseEvent.CLICK, monTri2);
the last oner should work but it s not ... if anyone as an idea of what's going on it will be very helpfull.
Thanks you.
View Replies !
View Related
[CS3] How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
Ok so my lame attempt at humor may not make any sense... so here's the deal
I'm making a thumbnail grid (based on a tutorial) that feeds from an XML file and hence the grid is dynamically created. Each thumbnail has an event listener attached at runtime according to the XML data in order to add a child for the FULL image to display on top. But what I wanna add to this is to add a Movieclip child with a rollover animation to each thumbnail image on top. Here's a small illustration of what i'm trying to do (for those who didnt understand):
Here's the XML code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GALLERY COLUMNS="2" XPOSITION="30" YPOSITION="30" WIDTH="200" HEIGHT="94">
<IMAGE FULL="fullimages/1.png" THUMB="thumbs/1.png" CLIENT="SINCO" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/2.png" THUMB="thumbs/2.png" CLIENT="ARCH" DATE="01.02.2008" TYPE="POSTER/IDENTITY" />
<IMAGE FULL="fullimages/3.png" THUMB="thumbs/3.png" CLIENT="DSAF" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/4.png" THUMB="thumbs/4.png" CLIENT="KANCHO" DATE="01.02.2008" TYPE="POSTER" />
</GALLERY>
And here's the AS code
Code:
var columns:Number;
var my_x:Number;
var my_y:Number;
var my_thumb_width:Number;
var my_thumb_height:Number;
var my_images:XMLList;
var my_total:Number;
var container_mc:MovieClip;
var anim_mc:boxAnim = new boxAnim();
var x_counter:Number = 0;
var y_counter:Number = 0;
// ------ Stage Properties ------ \
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);
// ------ URL Loader ------ \
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("gallery.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
// ------ Process XML Data ------ \
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);
columns = myXML.@COLUMNS;
my_x = myXML.@XPOSITION;
my_y = myXML.@YPOSITION;
my_thumb_width = myXML.@WIDTH;
my_thumb_height = myXML.@HEIGHT;
my_images = myXML.IMAGE;
my_total = my_images.length();
createContainer();
callThumbs();
}
// ------ Create Container MC ------ \
function createContainer():void{
container_mc = new MovieClip();
container_mc.x = my_x;
container_mc.y = my_y
addChild(container_mc);
addChild(anim_mc);
container_mc.addEventListener(MouseEvent.CLICK, callFull);
}
// ------ Call the thumbnails ------ \
function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){
var thumb_url = my_images[i].@THUMB;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
thumb_loader.name = i;
thumb_loader.x = (my_thumb_width + 10) * x_counter;
thumb_loader.y = (my_thumb_height + 10) * y_counter;
if (x_counter+1 < columns){
x_counter++;
} else {
x_counter = 0;
y_counter ++;
}
}
}
// ------ Call the full image ------ \
function callFull(e:MouseEvent):void{
var full_loader:Loader = new Loader();
var full_url = my_images[e.target.name].@FULL;
full_loader.load(new URLRequest(full_url));
full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);
container_mc.removeEventListener(MouseEvent.CLICK, callFull);
}
// ------ Place the thumbnails ------ \
function thumbLoaded(e:Event):void{
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}
// ------ Place the full image ------ \
function fullLoaded(e:Event):void{
var my_loader:Loader = Loader(e.target.loader);
addChild(my_loader);
my_loader.x = (stage.stageWidth - my_loader.width) / 2;
my_loader.y = (stage.stageHeight - my_loader.height) / 2;
my_loader.addEventListener(MouseEvent.CLICK, removeFull);
}
// ------ Remove the full image ------ \
function removeFull(e:MouseEvent):void{
var my_loader:Loader = Loader(e.currentTarget);
my_loader.unload();
removeChild(my_loader);
container_mc.addEventListener(MouseEvent.CLICK, callFull);
}
// ------ Stage resize ------ \
function stageResize(e:Event):void{
trace("Resize");
}
I'm also interested in making this thumbnail gallery fully resizable (hence, you'll see at the very bottom a function for the stageResize...) to make something like this:
But i have no idea how to get the grid dynamically adjusted when the Event.RESIZE event is called on the stage... hence, you'll notice the lame stageResize function i made only traces out a string of characters
If someone can give me a few tips on this i'd really appreciate it.
View Replies !
View Related
AS3 - How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
Ok so my lame attempt at humor may not make any sense... so here's the deal
I'm making a thumbnail grid (based on a tutorial) that feeds from an XML file and hence the grid is dynamically created. Each thumbnail has an event listener attached at runtime according to the XML data in order to add a child for the FULL image to display on top. But what I wanna add to this is to add a Movieclip child with a rollover animation to each thumbnail image on top. Here's a small illustration of what i'm trying to do (for those who didnt understand):
Here's the XML code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GALLERY COLUMNS="2" XPOSITION="30" YPOSITION="30" WIDTH="200" HEIGHT="94">
<IMAGE FULL="fullimages/1.png" THUMB="thumbs/1.png" CLIENT="SINCO" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/2.png" THUMB="thumbs/2.png" CLIENT="ARCH" DATE="01.02.2008" TYPE="POSTER/IDENTITY" />
<IMAGE FULL="fullimages/3.png" THUMB="thumbs/3.png" CLIENT="DSAF" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/4.png" THUMB="thumbs/4.png" CLIENT="KANCHO" DATE="01.02.2008" TYPE="POSTER" />
</GALLERY>
And here's the AS code
Code:
var columns:Number;
var my_x:Number;
var my_y:Number;
var my_thumb_width:Number;
var my_thumb_height:Number;
var my_images:XMLList;
var my_total:Number;
var container_mc:MovieClip;
var anim_mc:boxAnim = new boxAnim();
var x_counter:Number = 0;
var y_counter:Number = 0;
// ------ Stage Properties ------ \
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);
// ------ URL Loader ------ \
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("gallery.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
// ------ Process XML Data ------ \
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);
columns = myXML.@COLUMNS;
my_x = myXML.@XPOSITION;
my_y = myXML.@YPOSITION;
my_thumb_width = myXML.@WIDTH;
my_thumb_height = myXML.@HEIGHT;
my_images = myXML.IMAGE;
my_total = my_images.length();
createContainer();
callThumbs();
}
// ------ Create Container MC ------ \
function createContainer():void{
container_mc = new MovieClip();
container_mc.x = my_x;
container_mc.y = my_y
addChild(container_mc);
addChild(anim_mc);
container_mc.addEventListener(MouseEvent.CLICK, callFull);
}
// ------ Call the thumbnails ------ \
function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){
var thumb_url = my_images[i].@THUMB;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
thumb_loader.name = i;
thumb_loader.x = (my_thumb_width + 10) * x_counter;
thumb_loader.y = (my_thumb_height + 10) * y_counter;
if (x_counter+1 < columns){
x_counter++;
} else {
x_counter = 0;
y_counter ++;
}
}
}
// ------ Call the full image ------ \
function callFull(e:MouseEvent):void{
var full_loader:Loader = new Loader();
var full_url = my_images[e.target.name].@FULL;
full_loader.load(new URLRequest(full_url));
full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);
container_mc.removeEventListener(MouseEvent.CLICK, callFull);
}
// ------ Place the thumbnails ------ \
function thumbLoaded(e:Event):void{
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}
// ------ Place the full image ------ \
function fullLoaded(e:Event):void{
var my_loader:Loader = Loader(e.target.loader);
addChild(my_loader);
my_loader.x = (stage.stageWidth - my_loader.width) / 2;
my_loader.y = (stage.stageHeight - my_loader.height) / 2;
my_loader.addEventListener(MouseEvent.CLICK, removeFull);
}
// ------ Remove the full image ------ \
function removeFull(e:MouseEvent):void{
var my_loader:Loader = Loader(e.currentTarget);
my_loader.unload();
removeChild(my_loader);
container_mc.addEventListener(MouseEvent.CLICK, callFull);
}
// ------ Stage resize ------ \
function stageResize(e:Event):void{
trace("Resize");
}
I'm also interested in making this thumbnail gallery fully resizable (hence, you'll see at the very bottom a function for the stageResize...) to make something like this:
But i have no idea how to get the grid dynamically adjusted when the Event.RESIZE event is called on the stage... hence, you'll notice the lame stageResize function i made only traces out a string of characters
If someone can give me a few tips on this i'd really appreciate it.
View Replies !
View Related
Sharing, But Not Nicely - Shared Libraries And Duplicated Clips
i'm using dynamically shared libraries in my movie. currently i load the swf into its own library mc (located at _root.sharedLibrary) and ideally i would like to duplicate the clips and use them in the parent movie.
is there a way i can duplicate clips into a different movie clip other than their origin if the source mc's are loaded into a child clip?
i cannot attach the duplicated clips inside of any clip except the library mc. in the following example i'm trying to attach the mc from the shared to the _root level. it duplicates into _root.sharedLibrary instead:
Code:
//frame 1
createEmptyMovieClip("sharedLibrary", this.getNextHighestDepth());
sharedLibrary.loadMovie("sc_versa_shared.swf");
//frame 2
sharedLibrary.attachMovie("myIcon", "newIcon", this.getNextHighestDepth());
newIcon._x = 400;// does not work
much thanks,
jwt
View Replies !
View Related
Gallery Moves Forward Through Images Nicely, But Not When Going Back
Hi,
As you click on each button in this animation, a picture is shown like a gallery according to which button the user clicks on. When I click on a button to go to a picture, it follows through nicely when going forward, but if I want to go back the gallery doesn't reverse through the pictures, it just goes back to the beginning in frame 1 and then finds the picture.
I basically want to get the same effect as: http://www.deftones.com/5_2/site.html
Here is what I have done so far so you can see what i'm talking about: http://www.gamefantasy.co.uk/freeminds
On the first frame of each picture change animation I have put the following code: gotoAndPlay("home");
The last frame of each picture change animation has the following code: stop();
The following code is written for each button to go to the specific picture:
on (release)
{
gotoAndPlay("home");
}
Thanks a lot for your help.
View Replies !
View Related
[CS3] SharedObject Being Set In Swf A, Check SharedObject In Swf B
Hi guys,
I haven't done any real work with sharedObjects so forgive me if the answer is obvious.
I am setting a SharedObject in swf 'A' if and i want to check it is set in swf 'B'
Both swf's are in the same folder space.
I have been messing with it the past couple of days but i cant get it to read what is set in swf 'A'.
am i able to read in swf 'B' what was set in swf 'A'?
Thanks
View Replies !
View Related
SharedObject Being Set In Swf A, Check SharedObject In Swf B
Hi guys,
I haven't done any real work with sharedObjects so forgive me if the answer is obvious.
I am setting a SharedObject in swf 'A' if and i want to check it is set in swf 'B'
Both swf's are in the same folder space.
I have been messing with it the past couple of days but i cant get it to read what is set in swf 'A'.
i am able to read in swf 'B' what was set in swf 'A'?
Thanks
View Replies !
View Related
SharedObject Being Set In Swf A, Check SharedObject In Swf B
Hi guys,
I haven't done any real work with sharedObjects so forgive me if the answer is obvious.
I am setting a SharedObject in swf 'A' if and i want to check it is set in swf 'B'
Both swf's are in the same folder space.
I have been messing with it the past couple of days but i cant get it to read what is set in swf 'A'.
am i able to read in swf 'B' what was set in swf 'A'?
Thanks
View Replies !
View Related
SharedObject Being Set In Swf A, Check SharedObject In Swf B
Hi guys,
I haven't done any real work with sharedObjects so forgive me if the answer is obvious.
I am setting a SharedObject in swf 'A' if and i want to check it is set in swf 'B'
Both swf's are in the same folder space.
I have been messing with it the past couple of days but i cant get it to read what is set in swf 'A'.
am i able to read in swf 'B' what was set in swf 'A'?
Thanks
View Replies !
View Related
Please "disappear" Nicely :)
Hello all!
I have a problem with my site and here goes:
- i have a main SWF (the index) with 5 buttons on it and 5 SWF's with the content for each button
- after clicking one button the SWF load's (with preloader and all) BUT after clicking another button, the SWF that is allready loaded instantly disappear and the next one take's its place and this happens with all the 5 SWF's.
Yes, all the content load's in a empty MovieClip but i wish so much that all the SWF's that load in the stage (index) will slowly disappear BEFORE the next one load's.
I see this on so meny sites and it look's so.... cool
Please help me to solve my problem or at least anyone give a link with a tutorial about my problem!
THANK YOU IN ADVANCE
View Replies !
View Related
Flash Player Not Playing Not Playing Properly Low Bitrate Sound
Hi,
I have created a flash audio player which can play streaming audio (mp3) files and it takes data from external xml file. Everthing is working fine. But when i used a low bitrate mp3 file (size 600 kb, time 3min approx) , it plays the audio with max speed and get ended in 30 seconds. The same audio file is playing normally in windows media player, or winamp,etc.
Plese give me some idea what is happening ........
Thanks,
Gunjan
View Replies !
View Related
Check If Movie Clip Finish Playing Before Playing Next
I'm trying to figure out how to create a conditional variable script to check to see if one of the 4 movies are finished before starting the next selected one.
I have 4 menus with 4 movie clips that have an opening and closing animation in them.
When clicking the one of the buttons I would like it to check and see if any of the movie clips are in the open position. Then have the movie that is in the open position play it's closing animation. Then play the selected category movie that the person clicked on.
I know it's all done with variables but just cant figure out how to put it together.
here is what i have so far.
menuStatus = 0;
trace(menuStatus);
but1.onPress = function() {
if (menuStatus == 0) {
menuwork.gotoAndPlay("start");
menuStatus = 1;
} else if (menuStatus == 2) {
resetMenus();
}
};
but2.onRelease = function() {
if (menuStatus == 0) {
menuwhoweare.gotoAndPlay("start");
menuStatus = 2;
}else if (menuStatus == 1){
resetMenus();
}
};
function resetMenus() {
if (menuStatus == 1) {
menuwork.gotoAndPlay("close");
menuStatus = 0;
} else if (menuStatus == 2) {
menuwhoweare.gotoAndPlay("close");
menuStatus = 0;
}
}
thanks for any help in advance
View Replies !
View Related
How Do I Check To See If A Sound Is Already Playing Before Playing When Pressing Play
Okay, i really need some help on this. I have a play button where if clicked will play the sound over the top of it when its already playing, if that makes any sense. the sound is already called on the first frame. if the user clicks the play button again, it will play over it.
heres my play button code. i need to know what to add to add to make it check to see if the audio is already playing. My audio sound is named myMusc.
ActionScript Code:
on (press) {
if (playing != true) {
if (paused != true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(0, 999);
}
if (paused == true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(myMusicPosition, 0);
_root.myMusic.onSoundComplete = function() {
myMusic.start();
};
}
}
}
Thanks
View Replies !
View Related
Playing A Certain Frame, After A External Swf File Has Started Playing?
Hi,
This is my first post here.
I need to know how to have a certain frame in my movie start playing, after a external movie I have has started playing.
The problem is basically sync., and I want a certain frame to play only after the external movie begins to play.
I'm using...
loadMovie("http://www.alainshep.com/alain.swf", 66);
if (playing) {
gotoAndPlay("begin");
} else {
gotoAndPlay("start");
}
The external movie plays after it loads, but I just don't know how to set it up for the frame I want to play after it has started playing.
Please Please someone help me..
View Replies !
View Related
SharedObject?
Okay, I was checking out a new developer tutorial on macromedia.com when the author says:
"Although we'll cover the basics of reading from and writing to a SharedObject, much more information is available under the SharedObject entry in the ActionScript Dictionary (Help > ActionScript Dictionary)."
I can't find an entry for sharedobject anywhere. What's more is that it's not listed in the actionscript windows within flash. The author laters gives an example of use:
"so = SharedObject.getLocal("myInfo");"
But still I can't seem to find any references to SharedObject OR getLocal.
Anyone want to give me a push in the right direction?
Skex
View Replies !
View Related
Different Use For SharedObject?
I have a Flash website with a map and users can create new icons on it on the fly (using attachMovie). Changes made by any users must be visible to all visitors. People had advised me to use SharedObject but...
For SharedObject, it seems that every users can only save and see their own changes because SharedObject is stored locally. Is there a way to only use one SharedObject stored in the server? Or another way to put it is can every user who visit my website use the same SharedObject?
Thanks!
View Replies !
View Related
Help With Sharedobject
Hi,
I am using sharedobject to store information of flash movies.
mydata = sharedobject.getlocal("database")
somevariable = mydata.data["somevariable"]
All these movies are separate swf that are part of a course.
I need to make a function that exports and imports data from all movies but I haven't figured out how to access info from a different movie, only from the movie currently loaded.
Is this possible? con variables be stored by a.swf and then accessed by b.swf?
Thanks for your help.
View Replies !
View Related
SharedObject
Hello,
I have a simple animation that I don't want played after a return visit. It's boggling my mind.
Code:
stop();
so = SharedObject.getlocal("testing", "/");
if (so.data.Visited) {
gotoAndPlay("end");
} else {
so.data.Visited = true;
so.flush();
play();
}
This works great locally testing movie, but does not work on the server. Am I missing something here? Any help would be greatly appreciated.
View Replies !
View Related
SharedObject - Where ?
I make a Flash Windows projector where I use a sharedobject to save the data of the user. I want the user be able to save (on a disket for example) the sharedobject file .sol. So I want to automatically show to the user the place where is this file, like:
CWindowsapplication datamacromediaflash player...
Is there a way to display this link ?
Thank's
Michel
View Replies !
View Related
Sharedobject
I am starting a sharedobject,
myLocalSO = sharedobject.getLocal("flashcookie16" );
How do i clear all the information?
There is flush(); does that save info or kill the cookie?
is there a kill sharedobject function? so you can keep the object but set everything in it to default or the begining.
View Replies !
View Related
Sharedobject
why does this script say my sharedobject (myLocalSO) is undefined?
I clearly set it as "flashcookie15"?
this is nuts.
stop();
myLocalSO = sharedobject.getLocal("flashcookie15" );
trace(myLocalSO.data.counter); //indefined????????
if (myLocalSO.data.counter > 1) {
numVisits.text = "You have been here " + myLocalSO.data.counter + " times."
gotoAndStop(4);
}else {
Play();
myLocalSO.data.counter = 1;
}
myLocalSO.data.counter++;
View Replies !
View Related
Help With SharedObject
I have script to check reminder.cfm for text and if found, start the movie. What I want is once a user has seen the movie that it would not play again until the next day?
I have been using SharedObject but I jest cant get it to work.
e.g.
I have a text field on the scene Dynamic Text ,Instance name:txtName
Script also in frame 1:
myOjbect = SharedObject.getLocal("test");
myObject.data.myName = "Mark";
myObject.flush();
myOjbect = SharedObject.getLocal("test");
txtName.text=data.myName
But when I "test movie" it return "undefined" in the text box.
View Replies !
View Related
SharedObject, How?
Hi, I am trying to use the SharedObject, but I do not obtain, he is following, I have this menu, and when I click in some item and to call the next page, it he has that to continue with the selected menu, I do not obtain to make this, it always comes back to the normal one, I tried to read in help of the flash, but I did not understand.
View Replies !
View Related
SharedObject Help
Trying to set up a shared object for storing a language choice variable. I thought the following code should save a test.sol file to my hard drive, but I can find no such file. The trace(myObject.data.language); returns undefined. Can some one tell me what I'm missing?
Code:
var langSel = "en";
var myObject:SharedObject = SharedObject.getLocal("test");
myObject.data.language = langSel;
trace(myObject.data.language);
trace(langSel);
ps - Can some one also please tell me, and I feel pretty stupid asking because it's probably right in front of my face, how do you post your code with actionscript formating (not PHP or CODE as I have used)?
View Replies !
View Related
SharedObject From Swf To Swf
happy new year!
I have two swf's in the same domain.
one writes a user's preferences, and the other should pick them up.
trouble is, the one that should pick them up, doesn't.
this code writes the SharedObject:
PHP Code:
user_details = SharedObject.getLocal('avdetails_djcobblers');
user_details.data._me = prefs;
user_details.flush();
and this code in a different swf from the same domain should pick it up, shouldn't it?
PHP Code:
user_details = SharedObject.getLocal('avdetails_djcobblers');
details = user_details.data._me;
trace( "user_details._me=" + details);
But it doesn't, the trace returns a blank. But I don't know why.
Maybe someone out there does, please?
View Replies !
View Related
SharedObject Help
Hi all,
I am currently working on a cd-rom presentation, where on autorun
load up i have an .exe that pops up that is a form that writes to the
users default email client (outlook...etc).
My question is .... Can i use some script, I have been reading up on
the sharedObject stuff, that will recognise that the end user has
played the CD-rom before and thus the CD-rom will skip launching the
form.exe and just go to the main presentation.
Any help, advice, or "luke your a fool for trying this!!!" would be
great.
cheers
luke
View Replies !
View Related
SharedObject
I have been reading a chapter about creating a SharedObject, and the author says, "When the SWF session ends...all the information under the data property of your shared object is automatically written to the shared object file ready to be retrieved usitng the getLocal() method..."
The example given is:
var myObject:SharedObject=SharedObject.getLocal("file_ name");
To save to the object you write:
myObject.data.userName=userName_txt.text;
I have followed the example verbatim, but notice that when I exit the .swf and re-open it, the information that I wanted to save did not save. The author mentions myObject.flush(); to "force" the object to be written, but I would like to have this happen upon exit rather than asking the user to click a button or the like. Am I missing something?
Thanks in advance -
View Replies !
View Related
SharedObject
Hi all,
I am trying to create a smarter nav swf for some asp.net pages. The navs are separate to the content, i.e., the whole page is not a swf just the navs and some other smaller things.
I thought i would use a SharedObject to store the current page so if the user clicks a nav link it would only getURL if this wasn't the current page.
But it appears the SharedObject doesn't persist data between requests. Is this correct?
If I click a nav link it redirects me to another .net page with the same swf in it, but the page.currentPage is always undefined.
Is there a way to do this using pure flash? otherwise i will have to utilise .net session data.
this is my code.
Code:
function GetPage(pageToLoad)
{
var page = SharedObject.getLocal("page_kookie");
//
if (page.currentPage == pageToLoad)
{
// do nothing, stay at this current page
return;
}
else // if (page.currentPage == undefined || page.currentPage != pageToLoad)
{
page.currentPage = pageToLoad;
getURL(pageToLoad);
}
}
thanks
g00fy
View Replies !
View Related
[F8] SharedObject (between 2 .swf)
ok i JUST started working with sharedObjects and i can get them to work just fine, but my knowldge of them is very small, i was hoping there was a way 1 "sharedobject" can be "shared" between 2 swf files. for example, in test_1.swf lets say every time you hit a button it adds 1 to "cash" and test_2.swf file has a button that subtracts 1 from "cash". both store "cash" in the sharedObject. is there a way both can use the same object.
[Edit] Ok after much reading, i now know ("test", "/") allows all .swf files in the same directory to share the object. HOWEVER, the 2 swfs wont be in the sam directory, what i am going to have is, one is going to be an .exe file (the projecter thing) this will store their "cash" then, when they long onto my site (which is all flash) the site needs to be able to read that SharedObject and display the ammount of cash they have.
View Replies !
View Related
SharedObject
I've been reading off this page:
http://www.adobe.com/support/flash/a...ionary648.html
and I'm trying to figure out how to use sharedObject to save a person's stats so when they come back they can continue where they left off.
The only problem is... i really dont understand this at all. Could someone please help me my leading me in the right direction. I cant figure out how to write a script for my game.
Thanks,
DC
View Replies !
View Related
Sharedobject
Howdy,
I am trying to make the SharedObject attribute "isunique" a variable i can load in from my embed code.
Essentially I have 10 videos, each on its own page, I want to autoPlay only to new visiters.
Here is the line from my embed code:
Code:
so.addVariable("cat", "photo");
With the above example and the code below for reference, I would like "playMovie.data.isunique" to be read by flash as "playMovie.data.photo". Is this possible?
Code:
var playMovie:SharedObject = SharedObject.getLocal("visited");
var category:String = this.loaderInfo.parameters.cat;
var isunique:String = category;
function readyHandler(event:VideoEvent):void
{
// Pause until the video can play till the end
thevideo.myFLVPlayback.pause();
pausenplay.gotoAndStop("play");
if(playMovie.data.isunique == null) {
thevideo.myFLVPlayback.playWhenEnoughDownloaded();
//textbox.text = playMovie.data.isunique;
playMovie.data.isunique = true;
playMovie.flush();
}
if (volumelevel.data.volumeset == true) {
thevideo.myFLVPlayback.volume = volumelevel.data.vol;
volume_mc.slider_mc.y = volumelevel.data.slidery;
}
else {
thevideo.myFLVPlayback.volume = .5;
}
}
thevideo.myFLVPlayback.addEventListener(VideoEvent.READY, readyHandler);
Thanks!
View Replies !
View Related
SharedObject Help
I need to create a game and i need to do out a high score chart for local use only. I know i should use SharedObject.getLocal to do it but i need to do the highscore with name of the person who is in the top score. Moreover, i think i should do it in array so that i can arrange them from largest to smallest score. To keep things short i will summarise what help i need.
1. How to save the score together with the name into the local system using SharedObject. Provide code if possible.
2. How do i arrange them from Highest to lowest highscore when i retrieve the score from the system
Code:
var soGameScore:SharedObject = SharedObject.getLocal(“GameData”);
soGameScore.data.highestScore = score;
soGameScore.flush();
Thanks
Regard,
Prism
View Replies !
View Related
SharedObject
Hi all,
I used SharedObject to save data.
Code:
so=SharedObject.getLocal("save")
if(!so.data.dataSave)trace(undefined)
else trace(defined)
so.data.dataSave=true
When i run this code in first time, output "undefined", but in the second, output still "undefined". I don't know how to get the "dataSave". Please, help!
// I not good in E
View Replies !
View Related
SharedObject
Hi,
I've created a file containing a SharedObject which saves a single bit of data and another SharedObject file which reads the data. It works perfectly well and as expected. However, when I upload to my server it refuses to work. Any ideas?
Thanks in advance
View Replies !
View Related
SharedObject
I'm getting an Unhandled AsyncErrorEvent when I click on my button to update the chat. What do I need to do? I have two text fields on the stage. The user types in chatInput and user sees the results in chatBox. I can see my results that I type locally but it does not send to all those looking at the swf.
ActionScript Code:
var nc:NetConnection;
var myRemoteSO:SharedObject;
nc = new NetConnection();
nc.connect("rtmp://domain.com/oflaDemo");
myRemoteSO = SharedObject.getRemote("mo", nc.uri, false);
nc.client = this;
myRemoteSO.connect(nc);
sendBtn.addEventListener(MouseEvent.CLICK, sendToChat);
function sendToChat(event:MouseEvent):void {
myRemoteSO.data.userInput = chatInput.text;
chatBox.text = chatInput.text;
myRemoteSO.send(myRemoteSO.data.userInput, chatInput.text);
}
View Replies !
View Related
SharedObject
I wanted to create a shareed object to keep track of a when an AIR app was installed and set an expiration date.
i was hoping to control where this sharedObject is created.. but it seems that flash will put it somewhere secret.. is it possible to change where the LSO is created? and where it is looked for?
ActionScript Code:
var firstRun:SharedObject = SharedObject.getLocal("/firstRun");
//firstRun.clear();
if(firstRun.data.userInfo==undefined){
trace("this is the first time you are here");
firstRun.data.userInfo="BAM!"
}else{
trace(firstRun.data.userInfo);
}
View Replies !
View Related
|