ActionScript 2.0 :: Creating A Live Page Counter In Flash

Jun 28, 2004

I have followed the tutorial on creating a live page counter in flash and somehow run into a problem to which i don't seem to be finding the solution. Perhaps someone here might be able to offer his/her generous help in solving this issue. Problem: The page counter works just fine the first time i load the page. After doing a refresh using the Ctrl & F5 key or just by clicking on the refresh button in my browser the count keeps going up (which as far as i understood from the tutorial is not supposed to happen).

When i do the same kind of refresh on the tutorial page the count stays unchanged though! I also downloaded the finished fla file but for some reason or other flash MX doesn't let me open it, giving me the error: "unexpected file format". Here is my code of the php file that i wrote for the counter.

[Code]...

View 6 Replies


Similar Posts:


ActionScript 2.0 :: Live PHP And Flash Hit Counter

Jan 28, 2007

I am using flash 8 and actionscript 2.0 to build this application. I am trying to compile a page hit counter that is only activated when the timeline hits a certain position. I thought I had it with the following script. But the count would randomly get reset back to zero.

Here is the PHP script:
PHP Code:
<?php
//Reading the file
$count = file_get_contents("main_counter.txt");
//Increasing the count
$count = explode("=", $count);
Code] .....

With this attempt I used the "loadVaribales" method to communicate with the PHP and TEXT files. Here is the code in the first frame of the timeline:
Code:
this.loadVariables("counters/main_counter.txt?num="+random(999999));

Here is the code in the second frame:
Code:
this.loadVariables("counters/main_counter.php?num="+random(999999));

It works awesome for a few weeks then the count gets reset to zero. Why the contents of the text file are randomly getting deleted.

View 7 Replies

ActionScript 2.0 :: Page Counter Into Flash?

May 27, 2007

Can I have a counter in flash? I don't know if it's possible in ActionScript. What about a Javascript version?

View 1 Replies

Flash Ad - Creating Click Tracker / Counter?

Oct 6, 2010

I have a flash ad on my site that cycles through about about 8-10 products each with their own buy button that adds the item to the shopping cart and takes them to the shopping cart page. What I want to do is create some kind of counter or tracker that keeps track of how many times each product was clicked on. I would prefer an external file to be generated and updated per new click. Is this possible?

View 1 Replies

ActionScript 3.0 :: Make A 'live Update' Visit Counter?

Dec 14, 2009

Whats the best way to make a 'live update' visit counter? For example: One person opens the site with the visit counter, and as soon as another one visits, the counter updates on the first users screen.

View 14 Replies

ActionScript 2.0 :: Creating A Counter That Goes Up All The Time?

Dec 6, 2009

have an odometer type thing, that would go up 9 times a second, and it would go up whether you are on the site or not.So if I started it now, and checked back in on the site in a couple of days it would be at say 300,000, and then I would check back in a couple days later and it might be at 600,000.How would I go about doing this. I have an mc with the actual digit animations..

View 1 Replies

ActionScript 3.0 :: Creating A Counter That Goes Up All The Time

Dec 5, 2009

I need a counter to tick off 9 times per second....and it continually adds up weather you are on the site or not. How would i do this?

View 8 Replies

ActionScript 3.0 :: Creating A Counter That Goes Up All The Time?

Dec 6, 2009

if I started it now,and checked back in on the site in a couple of days it would be at say 300,000,and then I would check back in a couple days later and it might be at 600,000.I have an mc with the actual digit animations...

View 3 Replies

ActionScript 3.0 :: Creating A Enemies Killed Counter?

Mar 20, 2009

Everytime a monster dies, I want the monsters killed dynamic text field to increase the number by 1. I gave it a good shot but it feels like im missing something basic, Im fairly new to this still but picking it up quickly. The following code is inside of a movieClip dealing with the monsters. The second block of code is on my main timeline.

Quote:

import fl.motion.Animator;
import fl.motion.MotionEvent
var this_xml:XML = <Motion duration="30" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
<source>

[code]....

View 2 Replies

ActionScript 1/2 :: Hit Counter - How Many Times Page Loaded

Dec 8, 2010

I've a little static portal, with guides, no server side support. All of it is local content (shared hdd). I'd like to make a page hit counter to know which one is the most useful, and wich isn't used at all. I've browsed the net for a long time today, but everything contains php. Though it's rare, that the swf is not on a webserver. I think there's an easy way to do, just don't know how. So I'd like make a flash that can count how many times the page (or itself) has been loaded.

View 5 Replies

Actionscript 3 :: Creating An MCQs Exam And Have An Error With The Counter Of The Score?

Oct 24, 2010

I'm going to make a counter that will count the correct answers of an exam questions.The counter will collect only the correct answers from each frame.

Here is the first frame:
var counter:Number = 0;
var correctAns:Number;
correctAns = ans1_mc.alpha;
function clicked1(event:MouseEvent):void

[Code]...

View 1 Replies

Javascript :: Creating A Persistent Life Counter For A Facebook Game

Mar 20, 2012

i am currently working on a facebook game and i have a problem concerning the integration of a life counter which regenerates over time for a facebook game. The game is a simple Flash/AS3 shooter in which users are competing for the highest score. For monetary reasons every game costs one life and users should only be able to start a new game, if said life counter is >=1. To clear things up, i submitted a link to Popcap's facebook game "Zuma Blitz": ZUMA Blitz I can think of a few ways to do this, but i don't know which is the best/easiest approach. Would it be best to:

[Code]....

View 2 Replies

ActionScript 3.0 :: Creating A Persistent Life Counter For A Facebook Game

Mar 20, 2012

i am currently working on a facebook game and i have a problem concerning the integration of a life counter which regenerates over time for a facebook game.The game is a simple Flash/AS3 shooter in which users are competing for the highest score.For monetary reasons every game costs one life and users should only be able to start a new game, if said life counter is >=1.To clear things up, i submitted a picture of the life counter of Popcap's facebook game "Zuma Blitz":

I can think of a few ways to do this, but i don't know which is the best/easiest approach.Would it be best to:Make it in AS3 with server communication via php?Or do it in JavaScript and communicate the count back to AS3?Another maybe related question is, how do i tell my database that the data from the life counter should be stored when the game is closed (for example by closing the browser).Can i do this from Flash or do i have to apply a html/JavaScript method?

View 1 Replies

ActionScript 3.0 :: Creating A Counter That Will Influence Movie Clips In Final Scene?

Nov 1, 2010

I want to create some kind of counter that goes up as the buttons in several different scenes are clicked.In the final scene, I want an "if" statement that will use the number in the counter to determine which movie clips are visible and which are not.a.k.a,

If Counter.value == 1
onething.visible = true
else if Counter.value == 2

[code].....

View 2 Replies

ActionScript 1/2 :: Global Counter - Put An Animation In A Page And Call Or Use The Function?

Mar 17, 2009

I downloaded a free fla file open source for pageflip. It uses a global function which is this:

_global.mcnt = 0; //counter (used on a page where is an animation).

So now I want to put an animation in a page and i assume that i have to call or use this function. the problem is that i don't know how.

View 4 Replies

Creating A Live Poll?

Jul 14, 2009

I need to create a website that has only one question on it, and then displays the poll results automatically after a user makes a selection, showing the overall results updated in real timepoint me in the right direction on where to get started with this.I imagine I will need some php and possibly mysql to make this guy go.

View 5 Replies

IDE :: Creating Login Page In Flash CS3 / CS4

Sep 10, 2009

I am trying to create a simple login page, once the user has logged in successfully they will be taken to another site which contains their photos. I have created the login page already, it has a Username and password plus the Submit button. I guess 2 things need to happen here:

1. I would like to be able to access an xml document which contains the Username and Password in order to validate the details.
2. Upon successful validation, the user is directed to another page which contains their gallery, I guess I need to add a navigateToURL here in actionscript where the URL is passed from the XML file to the code (the URL needs to come from an the same XML file, if possible).

I am trying to design this site so I don't need to keep accessing the actionscript in flash to add user details and URL links.

View 3 Replies

Flash :: Creating A Full Screen Page

May 1, 2009

Im looking for any help on creating a full screen flash page, which will be activated by a button Such as this tut [URL] However I have tried this but cant seem to get it to work. Would this be something to do with my publishing settings (currently on flash 9 - which it states is recommended) or the code in the HTML which again I have followed the tut and have added the additional code...

View 1 Replies

ActionScript 3.0 :: Flash - Creating Preloaders For A Basic Page

Jan 14, 2010

I've had no problem creating preloaders for a basic page. I have a gallery with a preloader on the main page. It works fine. You can click thumbnails to see large photos that are on separate swf files. Everything worked fine when there were no preloaders on the individual swfs. But later I added preloaders to each individual swf file and now they do not load - just a big fat "0% Loaded" screen.

I'm doing something wrong. Perhaps the preloader should be contained within the loader that is displaying the individual swf files? Maybe the individual swfs do not need their own preloaders? I'm over my head in AS 3.0

View 1 Replies

Flash:: Button (Creating A Menu Page With Flash Buttons To Open SWF Files)?

May 17, 2011

Good day to everyone. I'm here today to seek help about Flash CS4 and ActionScript 3.0. The story starts when one day, my boss asked me to make a flash presentation about their upcoming user training for a newly developed software. I was enthusiastic and excited about it because it's been a long time that I did not use Flash (note that I don't have any experience in ActionScript 3.0). At first, everything was a bit rough as I need to recall how to properly use the frames to create a successful animation. As I was about to finish the project, my boss approached me again and asked if I could insert a menu page in front so that the users won't have to replay the whole thing again just to look for a little something on that part of the movie. So yea, at first I was abit hesitant to accept. I said that it will work with Powerpoint. But she's a total pusher and I was forced to say yes. Now I'm having this problem about how to make a flash button load a swf movie.I've tried searching all over the net for tutorials but most of the times the "getUrl" and other stuff are said to be outdated.

View 1 Replies

ActionScript 2.0 :: CS4 Creating A Random Image Generator From A Live Feed

Oct 28, 2009

i am wondering if it is possible, and if someone would be so kind to help me code a scene where two thumbnails, side by side, are flipped up and down, and back up, each time revealing a new random image culled from a feed such as a flickr feed (or any others available, is there a random google image search feed that i dont know about?).if this is possible, i would need assistance in coding the script so that the flash movie is dynamic and pulls image data in real time from the feed, displays it within the two thumbnail cells, and for added headache pain, i would hope to also learn how to code a random image to be selected based on a visitors date/time stamp.i am a graphic designer with rudimentary knowledge of action script 2.0 (yikes!) so please, go slowly / explain yourself. i have searched the forum, but i cannot find any previous threads that combine the random image generator idea with a live feed (unless if i missed it, please point it out to me if you can find such threads).

View 1 Replies

ActionScript 3.0 :: Creating Menu Populated With Data From Live XML Feed

Aug 19, 2010

I am building a menu that is to run on a mobile device.. the menu is populated with data from a live xml feed. and then suppose to be both dragable and "throwable" - meaning if you swipe up or down fast is scrolls with a little velocity physics slowing down over time. I wanted this menu to use as little processor power as possible so I am using scrollRect along with all my menu items being set to
cachAsBitmap= true;
Its working for the most part except once it stops scrolling and the user mouse downs on it again to start dragging, it tends to jump up or down like 20-100 pixels.

ActionScript Code:
menu.addEventListener(MouseEvent.MOUSE_DOWN, menuDrag);
menu.scrollRect = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
addEventListener(MouseEvent.MOUSE_UP, menuStopDrag);
function menuDrag(e:MouseEvent):void{
isDragging = true;
[Code] .....

View 1 Replies

Flex :: Creating Simple Live Drawing / White Board Application?

Jul 9, 2010

How do I create a simple live drawing board/whiteboard functionality using flash as3, and flash media server 3.5.

View 1 Replies

Media Server :: Creating Webpage With Embedded Player To Show Live Stream

Sep 23, 2009

I'm new on FMS, but I've managed to create a web page with an embedded player that shows a live stream that I capture with a webcam and FMS. What I need is to be able to pause the live stream from the web page player and to play it again from the point I've paused it. I thought to stream a live video and save it to a file on the server as well, but I don't know how to tell the player to start from the end of the file rather than the begining of it. The client should connect to the page and see the live stream, but he can pause it and continue watching it later from that point, but if a different client connects, he should see the live stream.

View 1 Replies

Creating A Dynamic Home Page Background?

Oct 5, 2010

I would like to know if its possible to create a background flash that is dynamic while keeping the bars static?for an example checkI would like someone to build a home page for me to be exactly like the samsung site above except using my images. Is this possible?

View 1 Replies

ActionScript 3.0 :: Creating 'print This Page' Button?

Jan 29, 2009

I need to create a button, or at least a movie clip that functions like a button that will print a page when clicked. Ideally I would like to have the button as part of the flash application, which will be online embedded into a web page as a .swf. on click the print page dialog box will appear, and the user will be able to print out the web page. What is the best way to code this?

View 3 Replies

ActionScript 1/2 :: Creating Page Curl Effect?

Mar 8, 2011

I am trying to create an interative catalog for my small business.( I would like to do something similar to the online catalog that Kohls department store has [URL]... When the user goes to the corner, I would like the page to curl and give them the ability to turn it like a book.  I would also like to keep all of my interactive scripting on each page (ie small popup box when the user rolls over an item, larger popup box when they click on an item) I am currently using Flash Pro CS5 to create the rollover/popup boxes, but do not know how to create the page curl effect. I  know that InDesign can apply this effect to my pages, but am having issues with this working completely. 

I have placed my flash pro cs5 .swf file (which contains my invisible buttons and scripting.) into my InDesign doc.  I then export this InDesign doc as a .swf  and also generate an html file.  When I open the swf or html file, there is a big grey flash logo on the page.   If I click on it, the page loads and I am able to interact as I would like and also turn the page with the curl effect.  The problem is that every time I turn the page it loads the gray flash logo and I have to click on it again to load the page. An even bigger problem is when I embed the InDesign swf file to my webpage the gray flash logo is still there and even when I click on it,  it doesnt load the page.  Is there a way to get both interactivity (ie rollover/popupboxes) and the page curl effect I want? Is there a program that will make it easy for me to do both? 

View 1 Replies

ActionScript 2.0 :: Creating Asp Files Using Front Page?

Jul 23, 2002

creating asp files using front page 2002. i have created some pages and I am able to enter data in to the form. But, when I try to display the data from the database, its giving the below error:

FirstName LastName Address
Database Results Error

The database connection named 'connDatabase' is undefined.This problem can occur if:

* the connection has been removed from the web

* the file 'global.asa' is missing or contains errors

* the root folder does not have Scripting permissions enabled

* the web is not marked as an Application Root.

View 1 Replies

ActionScript 3.0 :: Creating A Multi Page Imae Gallery?

Nov 15, 2010

creating an image gallery for my site. Please see my photo link:I want all the thumbnail btns on the left to load the large photos on the right. For 3 of the thumbnails, I need to show more than 1 image so I created numeric btns underneath the large images that will load photo 1, photo 2 etc. The issue that I can only get this to work on layer 1 and 2, when I try to do this for another thumbnail I get this error:"TypeError: Error #1009: Cannot access a property or method of a null object reference.t press2_fla::MainTimeline/frame1()"This is the basic script that I am using for all my thumbnails:

ezo1.addEventListener(MouseEvent.CLICK,playezomag) ;
function playezomag(event:MouseEvent):void{
gotoAndStop("fefe1");

[code].....

View 1 Replies

Flash :: IE And Mozilla For Asp.net Page With Master Page And Content Page?

Jul 1, 2010

I have a master page and a child page and have placed the javascript code inside the child page for flash movie.

The problem is the movie seems working when there is a alert on, without at least one alert msg, the code does not work, I am sure you people can solve, I can see that the following code works well in both Mozilla and IE, but only if the alert is ON, if I put it off, then the code does not work. Can anybody tell me what is the workaround :

[Code]...

View 2 Replies







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